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

apply-templates and Ful XML Path

Subject: apply-templates and Ful XML Path
From: Matthew Cordes <mcorde61@xxxxxxxxx>
Date: Tue, 16 May 2000 13:25:51 -0400
apply templates path
Hello all.

Does anyone know why I must specify the full path in an apply-templates
instruction inside the root template?  Here is an example:


<xsl:template match="/">

	<!-- ** this doesn't work, but it should, right? ** -->
	<xsl:apply-template select="ChildOfRoot"/>

	<!-- ** This does work ** -->
	<xsl:apply-template select=/ROOTNODE/AnotherChildofRoot"/>
</xsl:template>

<xsl:template match="ChildOfRoot">
	...
</xsl:template>

<xsl:template match="AnotherChildOfRoot">
	...
</xsl:template>


Is this the correct behavior?  I was under the impression that once 
inside a template any node I refer to w/o a complete path would be 
relative to the node matched by that template.  Inside of a template 
that does not match "/" the relative way seems to work fine.  Could 
this be a bug in my parser?  Anyone else experiencing this?  I'm using 
Xalan 1.0.1.

-matt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.