This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Sort and Variable


You have numerous problems with your xsl - I don't know where
to start other than to say you need to pick up a book or look
over one of the on-line resources. The attached files accomplish
what you described.

Regards,

Dan
--------------------------------
File: AuthorSort.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="AuthorSort.xsl"?>
<Authors>
    <Author rank="2">
        <Name>Bar</Name>
    </Author>
    <Author rank="1">
        <Name>Foo</Name>
    </Author>
	 <Author rank="3">
        <Name>Baz</Name>
    </Author>
</Authors>

File: AuthorSort.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:template match="/">
  <xsl:apply-templates select="Authors"/>
 </xsl:template>
 <xsl:template match="Authors">
  <xsl:for-each select="Author">
   <xsl:sort select="@rank"/>
   <xsl:value-of select="Name"/><br/>
  </xsl:for-each>		
 </xsl:template>
</xsl:stylesheet>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]