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

Re: Sorting and attributes

Subject: Re: Sorting and attributes
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Dec 2001 18:44:50 +0000
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>&#x20;&#x20;&#x20;&#x20;&#x20;:&#x20;</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


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.