The intention of DynamicAttribute.setAttributeNS() was to support namespaces in attributes - and it does not work!
Peter On 6/13/06, Dominique Devienne <[EMAIL PROTECTED]> wrote:
On 6/13/06, Peter Reilly <[EMAIL PROTECTED]> wrote: > The prefix for elements (as against attributes) are retained. > ProjectHelper2 called UE.setQName(qName) with the > name it receives from the sax. > > Something needs to be done for attributes.. Namespaces are used to avoid name collision, and in Ant to locate the right implementation class. That's necessary for top-level tasks, and for nested elements in tasks/types having add(Xyx) methods. Attributes in Ant OTOH, are always "resolved" relative to their element. Their can't be any ambiguity ATM for attribute. Ant doesn't support namespace'd attribute at all, AFAIK. Also, remember that attributes don't inherit the namespace of their element, and are always in the "" namespace, unless explicitly qualified with a prefix. As I write above, Ant doesn't support them for introspected class. Using namespace prefixes is dangerous, because they can change from element to element, depending on while namespaces are in scope, and we can have different prefixes for the same NS URI, or the same prefix for different NS URIs depending on the element (although this is evil, XML supports it). XmlFragment is already not "exact" XML, as all text nodes, even with nested element in between them, are merged together. I'm not sure it's worth it to be exact XML... --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]