On Wed, Sep 13, 2006 at 11:06:36AM -0500, Don Adams wrote:
> 
> I am trying to use the JAXP Transformer in my Java code
> to translate valid docbook article XML 
> into valid XHTML and FO XML. I am having a major problem with
> the use of the non-breaking space code   in
> the docbook-xsl stylesheets. The cause of the problem 
> is perfectly described under "5. Be careful with 
> nonbreaking spaces" on this web page:
> 
> http://www.oreillynet.com/pub/a/oreilly/java/news/javaxslt_0801.html
> 
> To summarize, special characters in the docbook-xsl
> stylesheets are transformed into the actual special characters
> in the output of the transformation when the transformation
> method is selected as "xml".  So, for example, when
> a transformation is done into FO XML, a table title in the
> FO XML output contains "Table 1. xxxxx"; however, the spaces
> after the word "Table" and after "1." are not the ASCII space 
> character, they are a single character code 160
> (a non-breaking space) which is not valid in an XML file.

This sounds like an encoding problem. When your xml file has latin1
encoding (iso-8859-1), non-breaking space is a single character of
value A0. When your xml file has utf-8 encoding, non-breaking space
consist of two bytes. If you mix both, that is, when the xml file
declares utf-8 encoding but non-breaking space is written in the
latin-1 manner as a single byte A0, your XML file is not valid.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to