Re: QName in DynamicAttributeNS

2006-06-14 Thread Steve Loughran
Dominique Devienne 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. aah. this explains why I had got echoxml to work doing namespaced stuff.

Re: QName in DynamicAttributeNS

2006-06-14 Thread Steve Loughran
Igor Peshansky wrote: Peter, You just got lucky because d.e.f is a valid XML name. If you try a full URL (e.g., "http://d.e.f";), you'll get a nasty exception. Technically, DOM keeps the actual namespace URI for all attributes, so if ant keeps the prefix for all the elements, you can probably

Re: QName in DynamicAttributeNS

2006-06-14 Thread Steve Loughran
Peter Reilly wrote: I guess that it only got exercises with simple examples: I tried the echoxml: world and got: world Which has two problems 1 no mapping of prefix to uri 2 def:b gets reformed as d.e.f:b yeah, I knew echoxml didnt handle xmlns properly

Re: QName in DynamicAttributeNS

2006-06-13 Thread Igor Peshansky
Peter, You just got lucky because d.e.f is a valid XML name. If you try a full URL (e.g., "http://d.e.f";), you'll get a nasty exception. Technically, DOM keeps the actual namespace URI for all attributes, so if ant keeps the prefix for all the elements, you can probably look up the appropriate

Re: QName in DynamicAttributeNS

2006-06-13 Thread Peter Reilly
I guess that it only got exercises with simple examples: I tried the echoxml: world and got: world Which has two problems 1 no mapping of prefix to uri 2 def:b gets reformed as d.e.f:b Peter On 6/13/06, Igor Peshansky <[EMAIL PROTECTED]> wrote: Steve Lo

Re: QName in DynamicAttributeNS

2006-06-13 Thread Peter Reilly
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 retaine

Re: QName in DynamicAttributeNS

2006-06-13 Thread Igor Peshansky
Steve Loughran wrote on 06/13/2006 06:24:45 AM: > I'm now looking at the namespace aware dynamic attribute stuff > > The qname parameter for this is built up as follows: > String qName = ("".equals(uri) > ? localName : (uri + ":" + localName)); >

Re: QName in DynamicAttributeNS

2006-06-13 Thread Dominique Devienne
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

Re: QName in DynamicAttributeNS

2006-06-13 Thread Peter Reilly
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.. Peter On 6/13/06, Steve Loughran <[EMAIL PROTECTED]> wrote: Peter Reilly wrote: > Internally in ant the :

Re: QName in DynamicAttributeNS

2006-06-13 Thread Steve Loughran
Peter Reilly wrote: Internally in ant the : 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("http://example.com"

Re: QName in DynamicAttributeNS

2006-06-13 Thread Peter Reilly
Internally in ant the : 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("http://example.com";, "abc:hello", "hell

Re: QName in DynamicAttributeNS

2006-06-13 Thread Stephane bailliez
I would say DOM is a bit 'flexible' about that as this was not very much specified, so implementation more or less allow it and try to do some kind of magic later one to try to make sense of it. But my understanding is that you are correct. You have some info about it though: http://www.w3.o

QName in DynamicAttributeNS

2006-06-13 Thread Steve Loughran
I'm now looking at the namespace aware dynamic attribute stuff The qname parameter for this is built up as follows: String qName = ("".equals(uri) ? localName : (uri + ":" + localName)); this is not how, say, Qname.toString() presents qnames, whi