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

Re: [xsl] line breaks showing up with method="html"


Subject: Re: [xsl] line breaks showing up with method="html"
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Feb 2015 14:04:25 -0000

If you use indent="yes" and method="html" then the serializer is allowed to
insert whitespace anywhere that would not affect the rendered output in the
browser.

(Perhaps this is a little outdated, since it rather assumes the absence of
Javascript code in the browser that might be accessing the DOM
programatically).

In Saxon you can effectively suppress the line wrapping by setting
saxon:line-length to a very large value.

Michael Kay
Saxonica
mike@xxxxxxxxxxxx
+44 (0) 118 946 5893




On 10 Feb 2015, at 13:59, David Rudel fwqhgads@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I'm processing an XML document with text nodes that I need to put into
> a csv file that will later be used to create an html page.
>
> I'm using xsl:result-document with method="html" so I catch html
> entity references.
>
> Unfortunately, I'm finding line-breaks showing up in the output that
> do not correspond to any end-of-line character in the text nodes for
> the input file. These end-of-line characters do not show up when I
> switch to method="text" .
>
> Is there a rule about method="html" that attempts to break lines into
> chunks <100 characters each?
>
> -David
>
> --
>
> "A false conclusion, once arrived at and widely accepted is not
> dislodged easily, and the less it is understood, the more tenaciously
> it is held." - Cantor's Law of Preservation of Ignorance.


Current Thread
Keywords
xml