OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: 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äling" <boris@highscore.de>
To: "'Bob Stayton'" <bobs@sagehill.net>; <docbook@lists.oasis-open.org>
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:bobs@sagehill.net]
> Sent: Sunday, January 24, 2010 2:12 AM
> To: Boris Schäling; docbook@lists.oasis-open.org
> 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?


> [...]

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]