|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting and attributes
Hi Mike, > Here is my xsl: > > <xsl:for-each select="//C02//PERSNAME"> > <xsl:sort select="."/> > <LI> > <xsl:value-of select="."/> > <xsl:text>     : </xsl:text> > <xsl:value-of select="./@ENCODINGANALOG"/> > </LI> > </xsl:for-each> > > I have over 3000 entries, I just want to know if I am getting the > output I think I am getting. Can't you tell by looking at the output whether you are getting the output you think you are getting?!? :) If not, perhaps you should try working on a sample file containing fewer entries to start with? All I can tell you is what the above does: It finds all the PERSNAME elements that are within a CO2 element within the document. It sorts the PERSNAME elements alphabetically by their string value (their content). It creates a <LI> element for each PERSNAME in sorted order. Within the LI element it gives the value of that PERSNAME element, followed by six spaces, followed by the value of the ENCODINGANALOG attribute on that PERSNAME element. The value of the ENCODINGANALOG attribute does not affect the order in which the PERSNAME elements are processed. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








