xsl:value-of select="/x:index/@userid"
However, the root node is not always same, so the absolute path doesn't work. I tried the xpath axes; however, I'm always getting syntax error, for example:
xsl:value-of select="parent::attribute::@userid"
It seems the xslt doesn't like it with I use axis more than once. I suppose perhaps I should use a node right after parent:: ? But I need to access the parent's attribute, there's no node below for me to use. What to do? I still don't know how to use the xpath axes. I'm using a lazy method for now, but it might become problematic:
xsl:value-of select="/x:*/@userid"
Update:
Oh! It's stupid!! After all the bloody searches and trials i gone through, the solution is stupidly simple. -_-# The xPath also works, in case, like dos, like normal directory - all I needed was two dots and a slash to tell it to search one level up, so:
xsl:value-of select="../@userid"... ... ...


No comments:
Post a Comment