commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <knut.wannhe...@paranor.ch>
Subject RE: [jelly] problem outputing xml namespaces
Date Tue, 08 Apr 2003 07:11:04 GMT
Hi,

Now that dom4j 1.4 has been released, would it be possible to use that
version to fix the problem described below?

TIA,

--
knut

> > 
> > 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.
> 
> 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 ;-)
> 

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