You have declared the Saxon namespace incorrectly. It should be
 
xmlns:saxon="http://saxon.sf.net/"
 
For anyone else who is listening, this emphasizes the importance of submitting a complete working example. It's impossible in general to debug an XSLT stylesheet without seeing the whole thing.
 
Best wishes to all of you who have been celebrating Christmas, and indeed, to everyone else too.
 
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: 24 December 2007 15:26
To: 'Mailing list for SAXON XSLT queries'
Subject: Re: [saxon] xsl:output/@saxon:suppress-indentation working?

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=”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="xml" indent="yes" saxon:suppress-indentation="p"/>

 

The input:

 

...

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

...

 

is output as:

 

...

            <p>Some text where mixed content can be output <render as="italic">fu</render>

            <render as="underscore">bar</render> if I don't handle whitespace properly.</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