|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: possible usage of variables
> <xsl:when test="@requiredknowledge=
> number(preceding::chunk_name1_knowledge) ">
>
> The problem now that I want to iterate the <xsl:when>
> condition because I have got in the xml resource
> chunk_name1_knowledge, chunk_name2_knowledge,
> chunk_name3_knowledge,
> chunk_name4_knowledge, etc.
>
It's bad XML design to use structured element names in this way. That's what
attributes are for:
<chunk_name_knowledge nr="1">
But if you can't change the XML, you can use
preceding::*[local-name()=concat('chunk_name', $n, '_knowledge')]
Don't expect it to be fast.
Michael Kay
http://www.saxonica.com/
|
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
|

Cart








