[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Getting all the attribute values


Subject: Re: Getting all the attribute values
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Fri, 07 Apr 2000 13:42:06 -0400

At 09:12 AM 4/7/2000 -0700, Selva, Francis wrote:
why my output looks like this if I run this xsl?

...[snip]...

xml

<years title="year" century="20th" month="April" Day="Thursday"/>

output

Thursday20thAprilyear

why it's not extracting in the right order?

For starters, I believe that according the the XML 1.0 Rec, attributes (unlike elements) can't be depended on to be in any particular order once the document's been parsed. As to why your results are in *that* order in particular, as opposed to all the others, I'm guessing, but it may be that whatever parser is running is storing the attribute names in an array sorted on the attribute name, so the attribute/value pairs are (in order)
Day Thursday
century 20th
month April
title year
(Note that Day, unlike the other attribs, begins with an uppercase letter. For the above theory to be true, uppercase would have to sort before lowercase. Anyone know if that's true?)


If this is the case, you're seeing the result not of XSLT behavior, but of parser behavior.

================================================================
John E. Simpson          | "After they make styrofoam, what do
http://www.flixml.org    | they ship it in?" (Steven Wright)
simpson@xxxxxxxxxxx      |



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords