admiral_grinder has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way to get XSLT ran through XML::LibXSLT preserve any entity references instead of it expanding them? I'm trying to do a XML-XML transform that has a ton of character entities defined in a external DTD that I need to show up in the output document.
  • Comment on Preserve Entity References in XSLT using XML::LibXSLT

Replies are listed 'Best First'.
Re: Preserve Entity References in XSLT using XML::LibXSLT
by Anonymous Monk on Nov 06, 2015 at 23:48 UTC

      Thanks, but I'm not seeing a solution in these. The 06entities test has the entity in the XSLT itself, but it looks like the engine is outputting the character instead of the entity.

      In the 15misc test, the first block is reading in a xml doc that has an entity, but the XSLT isn't outputing it. I'm not sure why this test exists though because it is not testing anything from the output of the transform.

      So the expand entities work when I'm trying to normalize my source xml for easier diffs, but I need the entities to show up in the output xml as is.