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

MSXML vs. Saxon: different handling of tabs & newlines

Subject: MSXML vs. Saxon: different handling of tabs & newlines
From: "Webber, Andrew" <WebbeA@xxxxxxxxxx>
Date: Fri, 3 Nov 2000 16:30:57 -0500
saxon tabs
I am observing an interesting difference in the way MSXML and Saxon are
treating tabs and newlines in my XML instance when viewing the resulting
HTML.

The XML instance looks much like this (I've put the whitespace characters in
[brackets]):

<X>[nl]
[tab]<Title>Text</Title>[nl]
</X>[nl]

Here are the rules that handles those two elements:

<xsl:template match="X"><xsl:apply-templates/></xsl:template>
<xsl:template match="Title"><h1><xsl:apply-templates/></h1></xsl:template>


When I transform using Saxon, I get newlines and tab characters in the HTML
(viewable only in the source, of course), which I believe is correct since
they are part of X's content (the instance is merely well-formed, so there's
no chance of "knowing" X is not mixed content).


When I transform using IE, XML Spy gives me two choices (text or XML
output).  When I specify "text", the result is this:

<?xml version="1.0" encoding="UTF-16"?><h1
xmlns:fo="http://www.w3.org/1999/XSL/Format">Text</h1>


When I specify "XML", the result is this:

<?xml version="1.0" encoding="UTF-16"?>[nl]
<h1 xmlns:fo="http://www.w3.org/1999/XSL/Format">Text</h1>[nl]


With IE, I can change the XML instance to the following and get exactly the
same results:

<X><Title>Text</Title></X>


Is this merely different (but correct) behaviour on the part of IE, or is it
wrong?


Thanks!

-- 
Andrew Webber
HoC PRISM project
WebbeA@xxxxxxxxxx
613-943-7887
cell:  613-797-8123


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.