ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: QName in DynamicAttributeNS
Date Tue, 13 Jun 2006 14:12:46 GMT
Peter Reilly wrote:
> Internally in ant the <uri>:<name> form is used (rather
> that {uri}name) for a stringized versions of xml namespaced names.
> In dom it seems that the prefix is used in the qualified name.
> so  e.setAttributeNS(uri, qName, value) should be of
> the form:
> e.setAttributeNS("", "abc:hello", "hello world")

exactly. Its like xsd:qname and not javax.xml.QName

So XmlFragment is mixing things up.

> (see:
> Unfortunally the ant code does not retain the prefix of the attribute
> (encoded
> in the qname) see ProjectHelper2:line 1048.

hmm. That is certainly a problem. at the very least, all xmlns 
declarations associated with a node should be retained (in Task?) so 
that you can work out the prefix for yourself, if you know how to 
resolve stuff. (that is actually why I hate xsd:qname, it can only be 
expanded if you know where it should be parsed from, and have the entire 
object graph to hand). Some representation like (uri,localname) makes 
much more sense.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message