Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - RE: [xsl] select more than one value of element 'package' attribute 'name' [Thread Next] Re: [xsl] select more than one value of element 'package' attribute 'name'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 ________________________________________________________________________ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
