How to Import stylesheets in xslt conditionally?
问题 Is there any way to import stylesheets after checking some conditions? Like,if the value of variable $a="1" then import 1.xsl or else import 2.xsl. 回答1: Hi All, Is there any way to import stylesheets after checking some conditions? Like,if the value of variable $a="1" then import 1.xsl or else import 2.xsl. No, the <xsl:import> directive is only compile-time . In XSLT 2.0 one can use the use-when attribute for a limited conditional compilation. For example : <xsl:import href="module-A.xsl"