Re: can you nest xsl:if with in xsl:choose/when?
<xsl:template match="text"> <xsl:choose> <xsl:when test="contains(//image/@attribute,'value')"> <xsl:if test="contains(@attribute1,'value1')"> THIS this says that for each text element if the first image in the document (not necessarily under the text element) has an attribute 'attribute' containing 'value' then if this text element has an 'attribute1' attribute with value containing 'value1' do THIS is that what you wanted? //image/@attribute, seems particularly strange thing to test for, and expensive unless the system optimises it away. You are asking, on each text element, to search the entire document for every image element with an attribute attribute, then because you use that node set in a string context, every node except the first is discarded, and you take the string value of the first attribute in the document, and then you do the same calculation, and get the same result again on each text element. David 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