- From: Michael Kay <mhk@mhk.me.uk>
- Date: Thu, 4 Nov 2004 14:41:40 -0000
- To: "'Mukul Gandhi'" <mukul_gandhi@yahoo.com>, "'Michael Rys'" <mrys@microsoft.com>, <public-qt-comments@w3.org>
If you (the stylesheet author) want the attributes in a particular order, you can sort them, e.g. by name. You can't reproduce the original lexical order of the attributes because the information is not available from the XML parser (more formally, from the InfoSet). Michael Kay > -----Original Message----- > From: Mukul Gandhi [mailto:mukul_gandhi@yahoo.com] > Sent: 04 November 2004 14:18 > To: Michael Kay; 'Michael Rys'; public-qt-comments@w3.org > Subject: RE: [DM]Relative order of Attribute Nodes > > I agree with you.. From XML's point of view it > certainly makes sense (as you have explained). > > But I still do have a feeling(from XSLT point of view, > and not XML), that making output of @*[n] "consistent > across XSLT implementations" would be useful for some > classes of problems.. i.e. @*[1] should return the 1st > attribute, @*[2] the 2nd one and so on.. > > Is it worth debating about this feature, and if found > useful be made part of the "XQuery 1.0 and XPath 2.0 > Data Model".. > > Regards, > Mukul > > --- Michael Kay <mhk@mhk.me.uk> wrote: > > > > > > Thanks for the answer. I am now curious, why XML > > > attributes have this characteristic.. > > > > That's a historical question: you might get a better > > answer from the SGML > > folks on xml-dev. There is, I think, a very strong > > consensus in the XML > > world that elements are ordered but attributes are > > not - though I don't > > think there is anything in the XML spec itself that > > says so. However, you > > will find this consensus reflected in most > > processing models and APIs for > > XML. It derives, I think, from the traditional use > > of elements to represent > > the visible text in a document and attributes to > > represent its typographical > > properties. > > > > Michael Kay > > > > __________________________________ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > >
Received on Thursday, 4 November 2004 14:42:20 UTC