You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Diogo Bacelar Quintela (JIRA)" <co...@jakarta.apache.org> on 2005/07/07 01:00:30 UTC
[jira] Updated: (JELLY-213) Generating xml nodes with attributes in diferente namespaces (for schemas..)
[ http://issues.apache.org/jira/browse/JELLY-213?page=all ]
Diogo Bacelar Quintela updated JELLY-213:
-----------------------------------------
Attachment: jelly-xml.patch
<?xml version="1.0" encoding="UTF-8"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl">
<x:element URI="http://java.sun.com/xml/ns/j2ee" name="ejb-jar">
<x:attribute URI="http://www.w3.org/2001/XMLSchema-instance"
name="xsi:schemaLocation" trim="true">
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd
</x:attribute>
<x:attribute name="version" trim="true">
1.2
</x:attribute>
</x:element>
</j:jelly>
Works as expected generating
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="1.2">
</ejb-jar>
> Generating xml nodes with attributes in diferente namespaces (for schemas..)
> ----------------------------------------------------------------------------
>
> Key: JELLY-213
> URL: http://issues.apache.org/jira/browse/JELLY-213
> Project: jelly
> Type: Bug
> Reporter: Diogo Bacelar Quintela
> Attachments: jelly-xml.patch
>
> I tried to find some info googling around and in the faq and couldn't find
> the answer, so here it goes.
> I need to generate the following xml (it's a sample off course), to support
> schemas.
> ------------------------------------------------
> <NodeName
> xmlns="http://blah/bleh"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema"
> xsi:schemaLocation="http://blah/blehSchemaLocation">
> <!-- Other content here -->
> </NodeName>
> ------------------------------------------------
> After several tries and some inconsistent behaviour, I thought the following
> jelly excerpt should be close to the solution, however "xml:attribute"
> doesn't support namespaces values.
> ------------------------------------------------
> <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
> <x:element URI="${myns}" name="NodeName">
> <x:attribute
> name="xsi:schemaLocation"
> URI="${myxsins}"
> trim="true">
> ${myschemaloc}
> </x:attribute>
> <!-- Other content here -->
> <x:element>
> </j:jelly>
> Where
> "myns" is for example http://blah/bleh
> "myschemaloc" is for example http://blah/blehSchemaLocation
> "myxsins" is for example http://www.w3.org/2001/XMLSchema
> ------------------------------------------------
> Is there any known solution for this problem? Even if working only for
> schemas?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org