You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kristofer Eriksson <Kr...@techmar.de> on 2004/08/06 14:16:45 UTC
RE: [jelly] problem outputing xml namespaces
Hi,
I just came a cross below described problem that was discussed about a year
ago. Was wondering if someone have found a solution alt workaround. I am
currently using the latest 1.4 release of dom4j.
Regards
Kristofer Eriksson
I've taken a closer look at the problem.
>
> I just noticed a rather awkward problem when Jelly outputs
> XML elements with
> namespace attributes. Somehow it doesn't output a
> doublequote after the
> namespace URI (attribute value). Take this script for example:
>
> <j:jelly xmlns:j="jelly:core" trim="false">
> <foo x="y" xmlns=""/>
> <foo:foo xmlns:foo="urn:foons"/>
> </j:jelly>
>
> The output generated by Jelly is:
>
> <foo xmlns=" x="y"></foo>
> <foo:foo xmlns:foo="urn:foons></foo:foo>
>
> For both namespace declarations the doublequote after the
> namespace URI is
> missing. Is this a problem in Jelly or dom4j even? Either
> way: Should
> Jelly bugs be reported using JIRA or BugZilla?
>
It actually does seem to be a problem in dom4j (version bundled with Jelly).
Executing the following snippet:
XMLWriter w = new XMLWriter(System.out);
w.startDocument();
w.startPrefixMapping("j", "jelly:core");
w.startElement("jelly:core", "jelly", "j:jelly", new
AttributesImpl());
w.endElement("jelly:core", "jelly", "j:jelly");
w.endPrefixMapping("j");
w.flush();
yields:
<?xml version="1.0" encoding="UTF-8"?>
<j:jelly xmlns:j="jelly:core></j:jelly>
So, when using dom4j by itself the problem is present as well. Which I
guess, in a way, is good news for Jelly ;-)
Cheers,
--
knut
Kristofer Eriksson
Re: [jelly] problem outputing xml namespaces
Posted by Paul Libbrecht <pa...@activemath.org>.
At least this one I can help right away...
Sorry for my silence on other topics you raised, I just didn't find the
time...
> I just came a cross below described problem that was discussed about a
> year
> ago. Was wondering if someone have found a solution alt workaround. I
> am
> currently using the latest 1.4 release of dom4j.
Yes, this has been fixed in all 1.5 pre-releases of dom4j I know
therefore Jelly's current CVS depends on dom4j-1.5-beta-2. Sadly a
weird CDATA output test-failure makes it that we haven't updated yet to
the release candidate.
There's also some unit-tests in dom4j to protect this and another quite
buggy behaviour which mostly shows up in jelly where text elements can
come very numerous.
From some of your mails, I seem to see you are not using the latest CVS
tree... you definitely should, Jelly is lacking releases quite much!
paul
Le 6 août 04, à 14:16, Kristofer Eriksson a écrit :
> Hi,
>
> I just came a cross below described problem that was discussed about a
> year
> ago. Was wondering if someone have found a solution alt workaround. I
> am
> currently using the latest 1.4 release of dom4j.
>
> Regards
>
> Kristofer Eriksson
>
> I've taken a closer look at the problem.
>
>>
>> I just noticed a rather awkward problem when Jelly outputs
>> XML elements with
>> namespace attributes. Somehow it doesn't output a
>> doublequote after the
>> namespace URI (attribute value). Take this script for example:
>>
>> <j:jelly xmlns:j="jelly:core" trim="false">
>> <foo x="y" xmlns=""/>
>> <foo:foo xmlns:foo="urn:foons"/>
>> </j:jelly>
>>
>> The output generated by Jelly is:
>>
>> <foo xmlns=" x="y"></foo>
>> <foo:foo xmlns:foo="urn:foons></foo:foo>
>>
>> For both namespace declarations the doublequote after the
>> namespace URI is
>> missing. Is this a problem in Jelly or dom4j even? Either
>> way: Should
>> Jelly bugs be reported using JIRA or BugZilla?
>>
>
> It actually does seem to be a problem in dom4j (version bundled with
> Jelly).
> Executing the following snippet:
>
> XMLWriter w = new XMLWriter(System.out);
> w.startDocument();
> w.startPrefixMapping("j", "jelly:core");
> w.startElement("jelly:core", "jelly", "j:jelly", new
> AttributesImpl());
> w.endElement("jelly:core", "jelly", "j:jelly");
> w.endPrefixMapping("j");
> w.flush();
>
> yields:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <j:jelly xmlns:j="jelly:core></j:jelly>
>
> So, when using dom4j by itself the problem is present as well. Which I
> guess, in a way, is good news for Jelly ;-)
>
> Cheers,
>
> --
> knut
>
>
>
>
>
> Kristofer Eriksson
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org