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

Re: Which patterns will select the root node?

Subject: Re: Which patterns will select the root node?
From: Oleg Tkachenko <oleg@xxxxxxxxxxxxx>
Date: Sun, 16 Oct 2005 14:42:18 +0200
Re:  Which patterns will select the root node?
Dimitre Novatchev wrote:

node() matches the root node, for example in the following XPath expression:

ancestor::node()

But again, not in a pattern. XSLT spec explicitly says


"node() matches any node other than an attribute node and the root node"
http://www.w3.org/TR/xslt#patterns

Btw, here is another pattern that matches root node :o)

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:key name="mykey" match="/" use="'root'"/>
  <xsl:template match="key('mykey', 'root')">
	...
  </xsl:template>
</xsl:stylesheet>	

--
Oleg Tkachenko
http://www.xmllab.net
http://blog.tkachenko.com

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.