From: Bob Hutchison Date: 2001-11-14T01:09:59+09:00 Subject: [ruby-talk:25023] Re: XML support in the standard lib; what exactly? On 01/11/13 9:56 AM, "Tobias Reif" wrote: > Then there's the Infoset: > http://www.w3.org/TR/2001/REC-xml-infoset-20011024/ > says: > "* [attributes] An unordered set of attribute information items, one for > each of the attributes (specified or defaulted from the DTD) of this > element. Namespace declarations do not appear in this set." This is referring to the attributes like 'xmlns' and 'xmlns:xx'. They are in a separate unordered set. > > Other models could declare the sequence of attributes relevant, etc. Not in XML, the order of attributes are specifically unordered -- there can be no meaning to the order. > > IMHO, any RubyWay API should use 'The Document Object Model 's model' as > a basis to build its' API on top. This way, it could perhaps use a DOM > parser. Or it could adhere to the Infoset. As long as you also provide an event model that does NOT require the whole tree to be in memory. > > A clear choice would be very beneficial for POLS. A varying, unstable > mix of DOM, XPath, and Infoset data models would confuse. > > If none of them is a fit, the Ruby Way could define a new data model, > and publish it as a stable spec. > > The infoset spec seems to represent what a new RubyWay XML tree API needs. > http://www.w3.org/TR/xml-infoset/ The infoset spec defines the information contained in an XML document, it does not say how to implement it. For example, when it talks about 'sets' it means the mathematical kind. You can implement this set with an array for instance, but you should not assume that the ordering of the array is information actually provided by the XML document. Cheers, Bob > > Tobi > >