I have a variable that holds the name of the stylesheet to apply next.
This does not work:
<p:variable name="filename" select="'/home/stylesheets/indent.xsl'"/>
<p:xslt>
<p:input port="stylesheet">
<p:document href="{$filename}"/>
</p:input>
</p:xslt>
I think I have to do somekind of URI or IRI function on $filename
, but I have not been able to figure it out.
UPDATE: I went to the link that grtjn provided and lifted the <p:declare-step type="ut:xslt" name="current">
wrapper.
Now applying the href from variable is very easy:
<ut:xslt>
<p:with-option name="href" select="$filename" />
</ut:xslt>
IMO it is not possible use variable in href attribute. I solved it using
<p:load>
step likeIn
<p:xslt>
I bind it to "xslt_from_variable" result port, likeI hope this attempt will work for you as well as for me.