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

Re: select more than one value of element 'package'

Subject: Re: select more than one value of element 'package' attribute 'name'
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 1 Sep 2005 14:56:44 +0100
returning more than one value
> 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
________________________________________________________________________

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.