Preserving entity references when transforming XML with XSLT?

后端 未结 5 678
旧巷少年郎
旧巷少年郎 2020-11-30 15:06

How can I preserve entity references when transforming XML with XSLT (2.0)? With all of the processors I\'ve tried, the entity gets resolved by default. I can use xsl:

5条回答
  •  無奈伤痛
    2020-11-30 15:53

    If you use a Java implementation of an XSLT 2.0 processor (like Saxon 9 Java) you might want to check whether http://andrewjwelch.com/lexev/ helps out, you can preprocess your XML with entity and character references that way to get them marked up as XML elements you can then transform as necessary.

提交回复
热议问题