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

[no subject]

[no subject]
Either you can select the nodeset like:
<xsl:apply-templates select="a[b='7']"/>

<xsl:template match="a">
..
</template>

Here you would usually have a mode on the template so that the
template does not get accidently invoked with other a elements.

Here, you can also use a for-each loop:
<xsl:for-each select="a[b='7']">
..
</xsl:for-each>


The other one is to be used if you want to do different things
depending on the value.
<xsl:apply-templates select="a"/>

<xsl:template match="a">
  <!-- Default matching a elements. Will be invoked if no template
matches overrule this one -->
..
</xsl:template>

<xsl:template match="a[b='7']">
  <!-- This template will overrule the more general one, provided that
the predicate is true (that the child element b has a string value of
'7') -->
..
</xsl:template>

Regards,
Ragulf Pickaxe :-)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.