This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xpath for getting file version
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl]xpath for getting file version
- From: Antony Suryadinata <antony dot suryadinata at spike dot com dot au>
- Date: Wed, 15 Aug 2001 09:42:05 +1000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi All,
The XML:
<?xml version="1.0"?>
<files>
<file name="a">
<versions>
<version day="01" month="03" year="2001' name="test - B"/>
<version day="03" month="12" year="2000' name="test - A"/>
<version day="31" month="03" year="2001' name="test - C"/>
</versions>
</file>
</files>
What is the xpath for getting the latest version? I have tried:
<xsl:value-of select="versions/version[number(concat(@year, @month,
@day)) > number(concat(../version/@year, ../version/@month,
../version/@day))]/@name"/>
but it doesn't seem to give the right result
I need it to be an xpath because I want to use it in a <xsl:key>. i.e:
<xsl:key name="file-version' match="file" use="the correct xpath here"/>
Thank you,
Antony
<FONT SIZE=1 FACE="ARIAL" >
<p>_____________________________________________________________________________
This e-mail (and any attachment) is intended only for the addressee and
may contain confidential information. If you are not the intended recipient
you must not use, copy, print or distribute this e-mail. If you receive this
e-mail in error, please contact the sender and destroy the original.</p>
<p>This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
_____________________________________________________________________________</p>
</FONT>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list