How to use an expression in an xsl: include element in XSLT processing

I need to enable XSLT, which exists in 2 variants, depending on the value of the parameter. However, it seems impossible to write the expression in the href attribute of the xsl: include element. My last test looks like this:

<xsl: param name = "ml-fmt" select = "mono" / ">

...
<xsl: include href = "{$ ml-fmt} /format.xsl" / ">

Used XSLT engine - Saxon 9.2.0.6

Does anyone have an idea on how I can do something about this?

+3
source share
2 answers

Dimitre, , XSLT XSLT, node , .

+1

.

xslt , xsl:use-when . xsl:use-when . XSLT 2.0 Spec:

" XSLT use-when, XPath, ".

, XSLT:

(, # Java ... ), , DOM ( XML) XSLT href <xsl:import> URL.

+1

Source: https://habr.com/ru/post/1743950/