|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Collapsing run-on tag chains not working in saxon
Thanx for the pointer Andras, I forgot about setting the encoding in the
stylesheet. We'll start again then :-)
Using this XML:
<html>
<head><title>test</title></head>
<body>
<b>this</b> <span>typical</span> <a href="">document</a>
<p>It was a <i>long</i> <i>hard</i> winter.</p>
</body>
</html>
and the follwing XSL:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes" encoding="utf-8"/>
<xsl:template match="/html">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
The output using msxsl.exe is now (copied 'as-is'):
C:\Documents and Settings\psiegers>msxsl -t -u 4.0 "E:\My
Documents\Marrowsoft\mySamples\2004\02nov04 - inter-word spaci
ng\iw.xml" "E:\My Documents\Marrowsoft\mySamples\2004\02nov04 - inter-word
spacing\iw.xsl"
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>test</title>
</head>
<body>
<b>this</b> <span>typical</span> <a href="">document</a>
<p>It was a <i>long</i> <i>hard</i> winter.</p>
</body>
</html>
Microsoft (R) XSLT Processor Version 4.0
Source document load time: 2.810 milliseconds
Stylesheet document load time: .627 milliseconds
Stylesheet compile time: .432 milliseconds
Stylesheet execution time: .321 milliseconds
It looks like MSXML, via msxsl.exe, takes in account the xsl:output. I think
this doesn't look bad anymore; any comments from the 'gurus' on the list?
Cheers,
<prs/>
-----Original Message-----
From: Babos, Andras [mailto:ababos@xxxxxxxxxxxxx]
Sent: Tuesday, November 02, 2004 12:02 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: Collapsing run-on tag chains not working in saxon or xa
lan
Hi,
> -----Original Message-----
> From: Pieter Reint Siegers Kort [mailto:pieter.siegers@xxxxxxxxxxx]
> Sent: 2004. november 2. 18:49
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: Collapsing run-on tag chains not working in saxon
or xa
> lan
> Well, it looks like msxsl.exe does make msxml work like it should; you
can
> make it work as if it was Saxon, from the command line at least.
Problem
> with mxsl.exe is that it shows the output with spaces inserted after
each
> outputted character, which I (carefully) removed in the above output.
> Don't
> know why they appear though, and appearently there's no option to just
get
> the output "as-is".
I think that's due to the default output encoding which is UTF-16 - and I
don't know how to set a different encoding for MSXSL.EXE.
AFAIK MSXSL.EXE ignores the output encoding set in the stylesheet.
Regards:
Andras Babos.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








