Re: [docbook] \r\n becomes 
 when generating XHTML (for ePub)

From
"Cob Rtayton"
Date
2010-01-24T17:25:32+00:00
ID
030e01ca9d1a$322f4670$6600a8c0@pazu
Thread
Re: [docbook] \r\n becomes 
 when generating XHTML (for ePub)
It isn't the stylesheet, it is the processor.  The serializer in the 
processor that generates the output bases its behavior on the "method" 
attribute in xsl:output.   It is the <xsl:output method="html"/> that makes 
the difference for the html stylesheet.  In the xhtml stylesheet, there is 
<xsl:output method="xml"/> instead.   In the case of "html", the output is 
actually SGML, which is what the original HTML was based on.

As I mentioned, it isn't that the html stylesheet removes the \r characters, 
it just presents them in the output differently.  The html stylesheet 
outputs "^M" (Ctrl-M) while the xhtml stylesheet outputs "&#13;", and those 
are treated differently by the epub browser, it seems.

Bob Stayton
Sagehill Enterprises


----- Original Message ----- 
From: "Boris Sch鄟ing" <>
To: "'Bob Stayton'" <>; <>
Sent: Sunday, January 24, 2010 6:04 AM
Subject: RE: [docbook] \r\n becomes &#13; when generating XHTML (for ePub)

> -----Original Message-----
> From: Bob Stayton [mailto:]
> Sent: Sunday, January 24, 2010 2:12 AM
> To: Boris Sch鄟ing; 
> Subject: Re: [docbook] \r\n becomes when generating XHTML (for ePub)

Hi Bob,

> [...]
> But that output is not suitable for epub, is it?  If you are generating
> content for epub, why are you using the plain html stylesheet?  What
> happens
> when you process your files with either the epub/docbook.xsl or
> xhtml/docbook.xsl stylesheets?  When I use either of those stylesheets,
> I
> see the &#13; characters on the text includes.

oh, you are right! I thought I had checked that. With these stylesheets I
see those &#13; characters, too. Then it's not the tool but the stylesheet?
The html stylesheet seems to remove those &#13; characters while the xhtml
stylesheet doesn't? It sounds strange though that the output is different -
is there a reason? And if the html stylesheet removes &#13; it should be
possible to customize the xhtml stylesheet to do the same?

Boris

> [...]