This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

apply-templates and Ful XML 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]