Re: [xsl] special character encoding, two problems

Subject: Re: [xsl] special character encoding, two problems
From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Oct 2014 18:26:41 -0000
On 15.10.2014 19:56, Jonina Dames jdames@xxxxxxxxx wrote:
Hi everyone,

Problem 1:
I'm having trouble figuring out why my special characters are converting
from numeric-hex unicode to numeric-decimal unicode, e.g. from &#x00A0;
in my input XML to &#160; in my output XML. My customer requires
numeric-hex unicode. I suspect I'm missing something really obvious, but
nothing that I've found via google has helped me solve the problem.

This is the xsl:output line I'm using:
         <xsl:output method="xml" encoding="us-ascii"
omit-xml-declaration="yes" indent="yes"/>

Is there something else I should use for the encoding attribute value?
Or am I missing something somewhere else?

If you are using Saxon, you may use the saxon:character-representation serialization parameter in the xsl:output declaration:
http://www.saxonica.com/documentation9.5/index.html#!extensions/output-extras/character-representation


Problem 2 has been addressed in-depth by Graydon already.

Gerrit

Current Thread