Using dynamic href in XSLT import/include?

后端 未结 2 1791
醉酒成梦
醉酒成梦 2021-01-23 03:59

The and elements seem to behave quite specific. What I am trying to do:



        
2条回答
  •  猫巷女王i
    2021-01-23 04:44

    What I am trying to do:

    
    

    This isn't allowed in any version (1.0, 2.0, or 3.0) of XSLT.

    In XSLT 2.0 (and up) one may use the use-when attribute, but the conditions that may be specified are very limited.

    One non-XSLT solution is to load the importing XSLT stylesheet as an XmlDocument and use the DOM API to set href attribute to the really wanted value -- only then invoke the transformation.

提交回复
热议问题