xsl-list
[Top] [All Lists]

RE: possible usage of variables

2005-05-12 00:44:58
<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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>