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
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