- From: Ian Hickson <ian@hixie.ch>
- Date: Thu, 20 Jan 2005 12:49:37 +0000 (UTC)
- To: Norman Walsh <Norman.Walsh@Sun.COM>
- Cc: public-xml-id@w3.org
On Wed, 5 Jan 2005, Norman Walsh wrote: > | | 4 Processing xml:id Attributes > | | > | | Each xml:id attribute is processed in the following way: > | > | It is unclear whether this processing is intended to change the DOM > | (or the infoset, for that matter) or not. If one has the following > | document: > | > | <test xml:id=" test "/> > | > | ...what would be returned by: > | > | document.documentElement.getAttributeNS('http://www.w3.org/XML/1998/namespace', 'id'); > | > | Should it be " test " or "test"? > | > | I think it should be made clear that the processing mentioned in this > | section is merely internal to the xml:id processor and does not affect > | the infoset or the DOM. (This comment obviously doesn't apply to the > | "ID Assignment" phase, where you definitely do want the infoset and > | the DOM to be updated, but that's another matter.) > > On the contrary, I think the purpose of attribute value normalization is > so that down-stream processes will see the normalized value. This causes a backwards-compatibility issue. A document processed by a DOM-aware XML processor will create a different DOM than one processed by a DOM-aware XML processor with XML ID support. I think this is a very bad situation to be in. Scripts frequently trip over this kind of problem already, and I feel quite strongly that we should not make it worse. > I think the result of processing your example with an xml:id Processor > should be the same as the result of processing this document with a > standard parser: > > <!DOCTYPE test [ > <!ATTLIST test xml:id ID #IMPLIED> > ]> > <test xml:id=" test "/> The difference being that such a document would always be processed that way, whereas xml:id introduces a new difference that not all XML processors will be aware of. Thus I disagree with this resolution. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 20 January 2005 12:49:38 UTC