xsl-list
[Top] [All Lists]

xsl:include with parameter?

2004-06-18 15:32:08
Hi all,

I would like to be able to include a file with additional XSL 
templates in a primary XSL file. That's easy. However, I would like 
the URI for the "include" file to come from a field in the XML 
document being processed.


Example:

XML snippet:

<ROOT>
        <Parameters>
                <additional_xsl>/library/xsl/add_stylesheet.xsl</additional_xsl>
        </Parameters>
</ROOT>


XSL snippet:

<xsl:param name="additional_xsl" 
select="/ROOT/Parameters/additional_xsl"/>
<xsl:include href="{$additional_xsl}"/>


This doesn't work. It's occurred to me that the XSL document may need 
to be parsed in its entirety before the XML document is processed. Is 
that true? Or is there hope for me still? Does anyone have any other 
ingenious suggestions?

Thanks in advance,

Erik


<Prev in Thread] Current Thread [Next in Thread>