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

xpath for getting file version

Subject: xpath for getting file version
From: Antony Suryadinata <antony.suryadinata@xxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 09:42:05 +1000
getting file version
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


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.