|
Re: [xmlc] 2.3beta getElementById() behavior: msg#00027java.enhydra.xmlc
At 05:59 PM 1/25/2007, you wrote: On Jan 25, 2007, at 10:08 PM, Jacob Kjome wrote: Keep in mind that the discussion here is XML-centric. Because there is no inherent "id" attribute in XML (people have proposed a standard "xml:id" attribute), there is no fallback like there is in the HTML DOM, where it can simply recurse the DOM for elements with the "id" attribute and see if they match the desired value. I like what Elliotte Rusty Harold had to say about it and agree that the ID'ness of attributes should be carried over. And it sounds like it's simply an issue with the cloneNode(). Which might make sense if the original implementors of cloneNode() decided that if they cloned ID'ness and someone cloned a node with an attribute of type "ID", then there's be duplicate ID's, creating an invalid DOM. However, there's lots of ways for a user to mess up a DOM and make it invalid. What's one more, especially when user's are likely to know what they are doing and avoid doing bad things. But again, that's just my opinion as an end-user outside the DOM black box. I'm pretty sure that javascript DOM behaves the way I've described. But then javascript is out there in Anything Goes Land without DTDs to respect. The javascipt DOM is HTML-centric and treats "id" attributes as of type "ID". You said it yourself. There's no "DTDs to respect". As such, it must make assumptions about what is an Id. They simply don't have to face the issues that Xerces (or any parser) has with XML. HTML is easy. Which of these issues do you have control over and which do you have You mean the HTML DOM interfaces, right? Keep in mind that I originally thought you were using plain old HTML documents, not XHTML documents. If you use the dom="xerces" or dom="lazydom" options for something with an XML format, then you will get the generic DOM, not the HTML DOM or the XHTML DOM. When you choose dom="xhtml", then you get the XHTML DOM, which implements the HTML interfaces (as well as its own XHTML interfaces). Try using dom="xerces" along with documentFormat="html". You should end up with HTMLElementImpl as the DOM implementation, which, of course, implements the HTML DOM interfaces. Jake Erik -- You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list. To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [xmlc] 2.3beta getElementById() behavior, Erik Rasmussen |
|---|---|
| Next by Date: | Re: [xmlc] 2.3beta getElementById() behavior, Jacob Kjome |
| Previous by Thread: | Re: [xmlc] 2.3beta getElementById() behavior, Erik Rasmussen |
| Next by Thread: | Re: [xmlc] 2.3beta getElementById() behavior, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |