Re: [xsl] White space treatment issue

Subject: Re: [xsl] White space treatment issue
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 18:48:49 -0500
At 2011-01-17 16:20 -0700, Karl Stubsjoen wrote:
I can't figure out where/when white space is getting introduced, and
if it is introduced in the stylesheet or the xml document or I guess
maybe both.
I am using MvpXslTransform in a C# .NET application.
When I run the transformation straight with Saxon there is no issue.

I think Saxon is the gold-standard implementation, so if it works there your transformation is probably correctly written. Most likely a variant in the result from another engine is a fault with that engine.

When I run the same thing with MvpXslTransform, I get extra spaces in
the output.  There is linefeed-treatment set to true in the fo
document, but somehow extra lines are injected.

linefeed-treatment is interpreted solely by the XSL-FO engine, and not recognized by the XSLT engine, so that is not what is impacting your transformation.

Can you think of anything obvious that I can check.  I've walked
through the code and can't find the problem.  Perhaps I am not
honoring character encoding?

Not sure how you could be messing up in that area. As you say, it works fine in Saxon. A putative XML document isn't XML if the characters violate the character encoding rules, and a conformant XML processor should reject such.

I hope this helps.

. . . . . . . . . . Ken

-- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers:

Current Thread