top ancestor value
My data is structured so that only the top level of the tree has the folder for the url. but I want to include that folder in the url for all of the files (including itself). Based on stuff I've read I thought that would be "ancestor-or-self::section[last()]/folder," but that gives me nothing. (full xsl below)
I tried using youth:ancestor-or-self::section[last()]/folder, but that gives me a validation error.
The data is here: http://rafb.net/paste/results/dyNo4Q36.html for reference
Am I completely misunderstanding ancestor? And in general, how does one debug this kind of thing?
Thanks again Joelle
I've got this: <?xml version="1.0" encoding="ISO-8859-1"?>
<li><xsl:value-of select="youth:id" />: <a>
<xsl:value-of select="concat('../', ancestor-or-self::section[last()]/folder,'/', youth:url)"/>
<xsl:value-of select="youth:title" /></a></li>
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