Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] select more than one value of element 'package' attribute 'name'

From: David Carlisle <davidc@--------->
To:
Date: 9/1/2005 1:58:00 PM
> What is the difference between 'matching' and 'selecting'?

Consider

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

and

<xsl:value-of select="a/b"/>

in the first you may use a match pattern  in the second you may use an
XPath expression, a/b is legal in both but


<xsl:value-of select="ancestor::x"/>
<xsl:value-of select="1+2"/>
<xsl:value-of select="sum(item)"/>

are all XPath expressions (so legal in select="" that are not XSLT
patterns (so not legal in match="").

The way they are used is different: if you evaluate a/b as an expression
then starting at the current node you first evaluate a (returning the
set of a children) then for each of those you evaluate b (returning the
set of b grandchildren.

match patterns are not directly evaluated in the same way. If (for any
current node) you do

<xsl:apply-templates select="something">

and a node _selected_ by "something" _matches_ "a/b" then the template
will be executed.

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent