<xsl:call-template name="Blanks">
<xsl:with-param name="NumPop" select="$NoOfBl oggs"/>
<xsl:with-param name="Required" select="10"/>
<xsl:with-param name="FileName" select="'fred.x ml'"/>
<xsl:with-param name="BlankTags " select="'/Fred/Bloggs'"/>
</xsl:call-template>
<xsl:template name="Blanks">
<xsl:param name="NumPop"/>
<xsl:param name="Required"/>
<xsl:param name="FileName"/>
<xsl:param name="BlankTags "/>
<xsl:variable name="vtestPass ed">
<xsl:if test="$NumPop < $Required">
<xsl:text>tru e</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:if test="$vtestPas sed='true'">
<xsl:copy-of select="documen t($FileName, $BlankTags)"/>
<xsl:call-template name="Blanks">
<xsl:with-param name="NumPop" select="$NumPop + 1"/>
<xsl:with-param name="Required" select="$Requir ed"/>
<xsl:with-param name="FileName" select="$FileNa me"/>
<xsl:with-param name="BlankTags " select="$BlankT ags"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
If I substitute the node set $BlankTags for "/Fred/Bloggs" in the document() function it works, but if I try and use a variable ($BlankTags) I get the following error
XSLT 1.0 Debugging Error:Error in function document, Not a node set
Any ideas how I can make this work please?
<xsl:with-param name="NumPop" select="$NoOfBl oggs"/>
<xsl:with-param name="Required" select="10"/>
<xsl:with-param name="FileName" select="'fred.x ml'"/>
<xsl:with-param name="BlankTags " select="'/Fred/Bloggs'"/>
</xsl:call-template>
<xsl:template name="Blanks">
<xsl:param name="NumPop"/>
<xsl:param name="Required"/>
<xsl:param name="FileName"/>
<xsl:param name="BlankTags "/>
<xsl:variable name="vtestPass ed">
<xsl:if test="$NumPop < $Required">
<xsl:text>tru e</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:if test="$vtestPas sed='true'">
<xsl:copy-of select="documen t($FileName, $BlankTags)"/>
<xsl:call-template name="Blanks">
<xsl:with-param name="NumPop" select="$NumPop + 1"/>
<xsl:with-param name="Required" select="$Requir ed"/>
<xsl:with-param name="FileName" select="$FileNa me"/>
<xsl:with-param name="BlankTags " select="$BlankT ags"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
If I substitute the node set $BlankTags for "/Fred/Bloggs" in the document() function it works, but if I try and use a variable ($BlankTags) I get the following error
XSLT 1.0 Debugging Error:Error in function document, Not a node set
Any ideas how I can make this work please?
Comment