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]

Re: Applying templates within a variable


> <xsl:template match="test1">
>    <xsl:variable name="var1">
>      <xsl:call-template name="foo"/>   <!-- output copied properly -->
>      <xsl:value-of select="test2"/>    <!-- output copied properly -->
>      <xsl:apply-templates/>            <!-- has no effect !!????   -->
>    </xsl:variable>
>    <xsl:call-template name="fontstyle">
>      <xsl:with-param name="param1" select="$var1"/>
>    </xsl:call-template>
> </xsl:template>

As Mike said, the code is OK.  So the questions are: 1) what does your
processor provide by way of a default template for elements; 2) are you
explicitly giving templates to match the children that are not being
processed within the variable?; 3) is the variable being instantiated in
a context where it has no children (if 'test2' is really being
processed, then the answer to that is no); 4) what happens if you
explicitly select the elements to process with, say, xsl:apply-templates
select="*"?

 Steve


 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]