[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xpath for 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|