Content-Type: multipart/alternative; boundary="----=_NextPart_001_000E_01C84617.4FA896E0" ------=_NextPart_001_000E_01C84617.4FA896E0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sure. Two documents and a test transform are attached. The two test docs are the same document, one with the doctype declaration (dtds are still in use for some of our clients) and one without. Since the dtd does declare @xml:space for

I tested once as well-formed and one with the (test) paragraph set xml:space="default". Same result for both. The transform is just the old recursive identity transform I use to test stuff like this in isolation. See /WWPL/doc[1]/docBody[1]/p[1] for the paragraph that shouldn't indent on output. Probably turn out to be some stupid oversight on my behalf. Background: We work almost exclusively in a document world where mixed content is a way of life. After repairing a couple of whitespace debacles we adopted the paranoid approach of defining xml:space (set to 'preserve' by default) on almost any element with mixed content. Since it's up to an application what "default whitespace handling" means, it seemed the only surefire solution. Several circumstances have me revisiting this-it has some drawbacks. We've got a firm grip on default whitespace handling in the applications we use-SQL Server, XMetaL, oXygen-and you've nicely granted us this control in the only processor we use for transforms. TEI P5 recently eliminated xml:space from the att.global class, I'm told on the suspicion that no one was actually using it. . . . Hmmm. Am I a dinosaur? Ignorant? Overly paranoid? Time to figure that out. It seems a simple issue, but get it bunged up for 20K documents or so and you've got a problem.... Many thanks, and a very merry holiday to all. -Stephen _____ From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Michael Kay Sent: Sunday, December 23, 2007 7:22 PM To: stephen@dataformat.com; 'Mailing list for SAXON XSLT queries' Subject: Re: [saxon] xsl:output/@saxon:suppress-indentation working? I think the most likely explanation of this is that your

element is in a namespace. Could you provide a more complete source document and stylesheet that allow the problem to be reproduced? Michael Kay http://www.saxonica.com/ _____ From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Stephen Perkins Sent: 23 December 2007 18:07 To: saxon-help@lists.sourceforge.net Subject: [saxon] xsl:output/@saxon:suppress-indentation working? Hi, Is there a bug with support the new serialization attribute xsl:output/@saxon:suppress-indentation? Using 9.0.0.2, given a stylesheet with the attribute set as so: The input: ...

Some text where mixed content can be output fubar if I don't handle whitespace properly.

... is output as: ...

Some text where mixed content can be output fu bar if I don't handle whitespace properly.

... (indentation not suppressed, resulting in unwanted space being introduced between the two elements) Thanks for taking a look. -Stephen Stephen Perkins dataformat.com ------=_NextPart_001_000E_01C84617.4FA896E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Sure. Two documents and a test = transform are attached. The two test docs are the same document, one with the = doctype declaration (dtds are still in use for some of our clients) and one = without. Since the dtd does declare @xml:space for <p> I tested once as = well-formed and one with the (test) paragraph set xml:space=3D”default”. = Same result for both. The transform is just the old recursive identity transform I = use to test stuff like this in isolation.

 

See /WWPL/doc[1]/docBody[1]/p[1] = for the paragraph that shouldn’t indent on output. Probably turn out to be = some stupid oversight on my behalf.

 

Background: We work almost = exclusively in a document world where mixed content is a way of life. After repairing a = couple of whitespace debacles we adopted the paranoid approach of defining = xml:space (set to ‘preserve’ by default) on almost any element with = mixed content. Since it’s up to an application what “default = whitespace handling” means, it seemed the only surefire solution. Several circumstances have me revisiting this—it has some drawbacks. = We’ve got a firm grip on default whitespace handling in the applications we = use—SQL Server, XMetaL, oXygen—and you’ve nicely granted us this = control in the only processor we use for transforms. TEI P5 recently eliminated = xml:space from the att.global class, I’m told on the suspicion that no one was = actually using it. . . . Hmmm. Am I a dinosaur? Ignorant? Overly paranoid? Time = to figure that out. It seems a simple issue, but get it bunged up for 20K documents or so and you’ve got a = problem....

 

Many thanks, and a very merry = holiday to all.

 

-Stephen

 

 

 


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Michael Kay
Sent: Sunday, December = 23, 2007 7:22 PM
To: stephen@dataformat.com; 'Mailing list for SAXON XSLT queries'
Subject: Re: [saxon] xsl:output/@saxon:suppress-indentation = working?

 

I think the most likely explanation = of this is that your <p> element is in a namespace. Could you provide = a more complete source document and stylesheet that allow the problem to be reproduced?

 

Michael = Kay

http://www.saxonica.com/

 


From: = saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Stephen Perkins
Sent: 23 December 2007 = 18:07
To: saxon-help@lists.sourceforge.net
Subject: [saxon] xsl:output/@saxon:suppress-indentation = working?

Hi,

 

Is there a bug with support the new serialization = attribute xsl:output/@saxon:suppress-indentation?

 

Using 9.0.0.2, given a stylesheet with the attribute = set as so:

 

<xsl:output = method=3D"xml" indent=3D"yes" saxon:suppress-indentation=3D"p"/>

 <= /p>

The = input:

 <= /p>

...

=

     &n= bsp;      <p>Some text where mixed content can be output <render as=3D"italic">fu</render><render as=3D"underscore">bar</render> if I don't handle = whitespace properly.</p>

...

=

 <= /p>

is output = as:

 <= /p>

...

=

     &n= bsp;      <p>Some text where mixed content can be output <render as=3D"italic">fu</render>

=

     &n= bsp;      <render as=3D"underscore">bar</render> if I don't = handle whitespace properly.</p>

...

=

 <= /p>

(indentation not suppressed, resulting in unwanted = space being introduced between the two <render> = elements)

 

Thanks for taking a = look.

 

-Stephen

 

Stephen Perkins

dataformat.com

------=_NextPart_001_000E_01C84617.4FA896E0--