commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristofer Eriksson <Kristofer.Eriks...@techmar.de>
Subject RE: [jelly] problem outputing xml namespaces
Date Fri, 06 Aug 2004 12:16:45 GMT
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



 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message