Subject: Re: [xsl] 'apply-templates' on parameter of 'call-template' From: Angus McIntyre <angus@xxxxxxxxx> Date: Sat, 10 Apr 2004 11:17:10 -0400 |
... address the nodes in the stylesheet using the document function. In outline form:
<xsl:stylesheet xmlns:myns="my-namespace" exclude-result-prefixes="myns"
<myns:data1> <p>This is my body</p> <matchable id="123"/> </myns:data1>
... <xsl:with-param name="body" select="document('')/*/myns:data1/node()"/>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:myns="my-namespace" exclude-result-prefixes="myns">
<myns:data1> <p>This is some text</p> <matchable id="123"/> </myns:data1>
<xsl:template match="/"> <xsl:call-template name="test"> <xsl:with-param name="body" select="document('')/*/myns:data1/node()"/> </xsl:call-template> </xsl:template>
<xsl:template name="test"> <xsl:param name="body">no body</xsl:param> <xsl:apply-templates select="$body"/> </xsl:template>
<xsl:template name="matchable"> <p>The value is <xsl:value-of select="@id"/></p> </xsl:template>
<xsl:template name="p"> <p><xsl:apply-templates/></p> </xsl:template>
<p>This is some text</p> <p>The value is 123</p>
-- Business: http://www.nomadcode.com/ Personal: http://www.raingod.com/angus/ Political: http://www.gollum2004.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] 'apply-templates' on para, Wendell Piez | Thread | Re: [xsl] 'apply-templates' on para, G. Ken Holman |
Re: [xsl] match all attributes exce, Mark Lundquist | Date | Re: [xsl] 'apply-templates' on para, G. Ken Holman |
Month |