[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Confused about entities


Subject: Re: [xsl] Confused about entities
From: "Gary Stewart" <the.stewarg@xxxxxxxxx>
Date: Tue, 14 Mar 2006 14:00:41 +0000

On 14/03/06, andrew welch <andrew.j.welch@xxxxxxxxx> wrote:
> On 3/14/06, Gary Stewart <the.stewarg@xxxxxxxxx> wrote:
>
> If you are outputting HTML and you want to re-transform it later, then
> you'll need to either convert that HTML into XML using something like
> Tidy, or don't output HTML in the first place.
>
> Ideally, if you know you are going to reparse the output of a
> transform then don't output HTML - use the XML output method if you
> are using XSLT 1.0 or the XHTML output method if you are using 2.0.
> Only ever use the HTML output method at the very end of the processing
> chain.

Thanks for the quick reply! I'm currently outputting as XML and it
should only be the last stage in the chain that outputs as XHTML. The
issue seems to be that the input includes declared entities that
nothing on the later part of the chain understands. Therefore I want
the unicode entity instead so &#xA0; rather than &nbsp; for example.
Should the stylesheet automatically do this? Is there some way I can
force a text() catch in the template to convert the characters for me?

Oh and since I forgot to mention I'm using Saxon 8 and XSLT 2.0.

Gary


Current Thread
Keywords