[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xpath question
since your xsl:otherwise is empty you can use xsl:if rether than xsl:choose (but that is cosmetic) <xsl:value-of select="node()"/> do you really want to do that? node() selects all the child nodes of list1, but (in xsl1) value-of will discard all but the first one (which will be the white space used for indentation unless you have used xsl;strip-space, in which case it is the text element. then (if it does select the text element) it outputs all the character data of that element (not just the scene) ignoring any markup. If you know your scenes are allways at that level you can use what I suggested last time test="text/para/scene[set1=$set1 and set2=$set2]"> which avoids searching under list2, or if they can be at different levels you can use the test I suggested in teh first reply test=".//scene[not(ancestor::list2)]" but if all teh text you want to output is under scene ther is no need to first test if it is there and then process it, just process the scenes that match teh condition, then automatically nothing will happen if there is no match. ie <xsl:template match="list1"> <xsl:apply-templates select="text/para/scene[set1=$set1 and set2=$set2]"/> </xsl:template> <xsl:tempalte match="scene"> set1: <xsl:value-of select="set1"/> set2: <xsl:value-of select="set2"/> </xsl:template> David
|
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
|