RE: [xsl] Supressing entity expansion during XSLT transform

Subject: RE: [xsl] Supressing entity expansion during XSLT transform
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 12 Jan 2008 08:42:04 -0000
Since entity expansion is done by the XML parser before the XSLT processor
gets any sight of the data, the only possible way you could stop it
happening would be at the XML parser level.

In practice the pragmatic solution is to preprocess entity references (at
the level of a text file, e.g. using Perl) to change &abc; to something like
#abc; where # is some sufficiently-rare character, and hten to postprocess
the transformation result to change it back.

Michael Kay


> -----Original Message-----
> From: Mukul Gandhi [mailto:gandhi.mukul@xxxxxxxxx] 
> Sent: 11 January 2008 10:05
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] Supressing entity expansion during XSLT transform
> On Jan 11, 2008 12:51 PM, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> > I am trying to use Saxon 9 extension, 
> saxon:character-representation 
> > (with value, entity). But I am having problem with getting 
> the output 
> > right. Could somebody, please help me with this.
> I am asking this question assuming that 
> saxon:character-representation can solve this problem. Is my 
> assumption correct?
> Or is this problem not possible to solve using XSLT (2.0) ? I 
> want to give other techniques (like DOM) as a final try if 
> it's not achievable using XSLT.
> --
> Regards,
> Mukul Gandhi

Current Thread