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

Sorting and attributes

Subject: Sorting and attributes
From: Mike Ferrando <mikeferrando@xxxxxxxxx>
Date: Mon, 17 Dec 2001 08:45:24 -0800 (PST)
ferrando piano company
Friends,
I am trying to add the attribute of every element that I am
outputting, without that attribute affecting the sort. But I am not
sure if I am getting the for each particular element.

Here is my xml:

<C01>
  <C02>
    <DID>
      <UNITTITLE>
        <PERSNAME ENCODINGANALOG="100$a">Abt, Franz</PERSNAME>
      </UNITTITLE>
    </DID>
    <C03>
      <DID>
        <CONTAINER TYPE="BOX">1</CONTAINER>
        <UNITTITLE ID="PV64">
          <TITLE>Golden chimes</TITLE>
          <GEOGNAME ENCODINGANALOG="260$a">New York</GEOGNAME>
          <CORPNAME ENCODINGANALOG="260$b">Wm. A. Pond &amp;
Co.</CORPNAME>
          <UNITDATE ENCODINGANALOG="260$c">[18--?]</UNITDATE>
        </UNITTITLE>
      </DID>
      <ODD><P><SUBJECT>Piano</SUBJECT></P></ODD>
    </C03>
    <C03>
      <DID>
        <CONTAINER TYPE="BOX">1</CONTAINER>
        <UNITTITLE ID="PV85">
          <TITLE>O ye tears! O ye tears!</TITLE>
          <GEOGNAME ENCODINGANALOG="260$a">Boston</GEOGNAME>
          <CORPNAME ENCODINGANALOG="260$b">Oliver Ditson &amp;
Co.</CORPNAME>
          <UNITDATE ENCODINGANALOG="260$c">1860</UNITDATE>
        </UNITTITLE>
      </DID>
      <ODD><P><SUBJECT>Piano</SUBJECT></P></ODD>
    </C03>
  </C02> 
</C01>

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.

Mike F.

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.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.