From: Nat Pryce Date: 2001-11-14T00:43:18+09:00 Subject: [ruby-talk:25018] Re: XML support in the standard lib; what exactly? The DOM is a pretty awkward API to both use and implement. An API based on Ruby-isms, such as dynamic typing and blocks for traversal, and XPath for lookups would be much more convenient. Cheers, Nat. ________________________________ Dr. Nathaniel Pryce B13media Ltd. 40-41 Whiskin St, London, EC1R 0BP, UK http://www.b13media.com XP Day, London, UK. 15th December 2001. http://xpday.xpdeveloper.com/ ----- Original Message ----- From: "Tobias Reif" To: "ruby-talk ML" Sent: Tuesday, November 13, 2001 2:56 PM Subject: [ruby-talk:25014] Re: XML support in the standard lib; what exactly? > P.S. > > The DOM is a model to represent an XML document. The DOM API recs build > on the DOM data model. > > There are other models to represent XML documents: XPath uses one that's > different than the DOM for example. > > 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." > > Other models could declare the sequence of attributes relevant, etc. > > 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. > > 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/ > > Tobi > > > > -- > Tobias Reif > http://www.pinkjuice.com/myDigitalProfile.xhtml > > go_to('www.ruby-lang.org').get(ruby).play.create.have_fun > http://www.pinkjuice.com/ruby/ > >