[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Line endings in Saxon

Subject: Line endings in Saxon
From: "Adam Schweitzer" <adam.schweitzer@xxxxxxxxxxxxx>
Date: Mon, 20 Aug 2007 15:40:18 -0400
 Line endings in Saxon
It appears as if Saxon does not output line endings "correctly" for
Windows systems (ie LF only instead of CR+LF).  This, as it turns out,
becomes a problem for me.

More detailed explanation:
I have Saxon generate XML, which is in turn used inside an internal web
application by MSXML to produce HTML output.  For some reason unknown to
me, MSXML treats text with line endings CR+LF differently from LF.  In
the latter case, it outputs new lines, while in the former, only
whitepace.

This becomes a problem when I have javascript code in the output html:
alert('this is a test');
becomes

alert('this is
a test');

the latter of which does not run.

There are two possible solutions I've considered:
1) Open the Saxon-generated XML file in wordpad, save.  This converts
the LF to CR+LF (I think), and I get the output desired.
2) Change my stylesheets to use normalize-space()

Both of which have drawbacks.  The ideal solution would be if I could
compel the Saxon processor to output Windows line endings.  Is this
possible?

Cheers,
Adam Schweitzer
Orenda Aerospace Corporation

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.