It's not reasonable to view the specification as prescribing syntax; what it specifies are the *semantics* of the DOM, and naturally, different languages and environments will implement these semantics differently.
Presumably, NodeType wasn't described as an enumeration in the document because neither IDL nor Java supported enumerations at the time. My question is, why does the answer matter? On Thu, Oct 30, 2008 at 5:05 PM, Seo Sanghyeon <[EMAIL PROTECTED]> wrote: > I am not sure to whom this mail should be addressed. Please help if you > know. > > I am considering the idea of using System.Xml as a Python DOM > implementation again. After some experimentation, one issue is this: > an idiomatic way to check for the type of DOM node in Python is: > > if node.nodeType == node.ELEMENT_NODE: > > nodeType is spelled NodeType with capital N in .NET, but that's fine. > I can translate naming convention. The problem is that .NET's XmlNode > type does not have attributes for DOM node types, that is, > ELEMENT_NODE, ATTRIBUTE_NODE, etc. Instead, these attributes ara > available under XmlNodeType enumeration, with wholly different names, > like Element, Attribute, etc. > > My question is, why is this blatant incompatibility? > > DOM level 1 Core standard > http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html > > seems to clearly say that Node interface should have constants like > ELEMENT_NODE, ATTRIBUTE_NODE, etc. defined. > > -- > Seo Sanghyeon > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com