Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
Difference between Xpath and XSLT?
December 11, 2010
Difference between Xpath and XSLT?
Posted Date: December 15, 2010 Points: 5
Check out this link for gettting the difference between XPATH and XSLT
Mark As Answer
" if this post help you.
Posted Date: February 15, 2015 Points: 20
Differences between XPath Expressions and XSLT Patterns
An Extensible Stylesheet Language Transformations (XSLT) pattern may appear in a number of places in a style sheet:
As the value of the match attribute of an <xsl:template> element. (This is the most common use of XSLT patterns.)
As the value of the match attribute of an <xsl:key> element.
As the values of the count and from attributes of an <xsl:number> element.
The purpose of a pattern is to restrict the set of candidate nodes in a node-set to just those nodes that meet a particular condition, or set of conditions. For instance:
restricts the candidate nodes for the template rule just to the element(s) with an invoice_num attribute whose value is "X00456". This works even though from any given context node, in theory all other nodes in the documents are reachable candidates.
All XSLT patterns are also XML Path Language (XPath) expressions. However, the reverse is not always true: not all XPath expressions are XSLT patterns. For instance:
is a legitimate XPath expression, which returns the value of the <sales> element rounded to the nearest integer. But:
is not a legitimate way to open an XSLT <xsl:template> element. Even though it refers to a node-set (sales) relative to the context node, taken as a whole the expression does nothing to constrain the universe of all possible candidate nodes at that point to a subset of them. Thus, such XPath expressions must always appear in a pattern in some other form, such as within a predicate.
For example, we could use the round(sales) expression in this way in an XSLT pattern:
<xsl:template match=".//*[round(sales) < 5000]">
This says to restrict the universe of possible candidate nodes to those which are descended from the context node (.//), with any name (*), whose <sales> children have a value less than 5000 ([round(sales) < 5000]).
To post reply
Related Questions Related Questions
difference between an EXE and a DLL
Difference Between console application and windows application?
Difference between Web Garden and Web Farm
Difference Between Response.Write and Response.Output.Write?
Difference between Language and package
Difference between JDK and SDK
Difference Between SDK and IDE
What is the difference between Get and Post method?
What's the difference between Response.Write() andResponse.Output.Write()?
Difference between Factory, Abstract Factory and Inheritance
Latest Forum Questions From The Same Category
Xamarin for Visual Studio 2010/2012 ?
How to attach Google Plus authentication system in Windows 8.1 phone using c#
Installing Visual Studio 2012 on Windows 7
Can anyone suggests me a laptop on which I can install any OS ?
Software freelancers who work from home, need a license?
help me problem instal graphique card on i5 intel fujitsu e752 hd4000
Extracting data from different websites to excelsheet
Please let me know the cost/exam fee associated with the Microsoft ASP.Net certification
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend