[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: can you nest xsl:if with in xsl:choose/when?

Subject: Re: can you nest xsl:if with in xsl:choose/when?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 4 Apr 2000 14:20:47 +0100 (BST)
xsl choose nest
<xsl:template match="text">
	<xsl:when test="contains(//image/@attribute,'value')">
		<xsl:if test="contains(@attribute1,'value1')">

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.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.