[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: shortest way to write this xsl:if statement
On 15 June 2012 14:24, henry human <henry_human@xxxxxxxx> wrote: > sorry, but the resul with the xpath- query is the same. The if statement is ended after first finding of 'A' > > but there are at least for findings for B, C, D which should lead to creation of the code bellow of th if-statement > ?? Put the xpath in an apply-templates: <xsl:apply-templates select=" the xpath to select the elements goes here "/> and then add a template: <xsl:template match=" the match pattern "> </xs:template> Don't use for-each. You might need to add a mode if you already have templates matching the elements you are processing here. You don't need the if test because if the apply-templates selects nothing, nothing will get processed. -- Andrew Welch http://andrewjwelch.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
|