[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
getting attributes from array
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.