This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Sort and Variable
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Sort and Variable
- From: Dan Diebolt <dandiebolt at yahoo dot com>
- Date: Mon, 23 Apr 2001 06:20:04 -0700 (PDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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