xsl-list
[Top] [All Lists]

RE: Collapsing run-on tag chains not working in saxon or xa lan

2004-11-02 11:35:22
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(_at_)Graphisoft(_dot_)hu] 
Sent: Tuesday, November 02, 2004 12:02 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Collapsing run-on tag chains not working in saxon or xa
lan

Hi,

-----Original Message-----
From: Pieter Reint Siegers Kort 
[mailto:pieter(_dot_)siegers(_at_)elnorte(_dot_)com]
Sent: 2004. november 2. 18:49
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] 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.


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--


<Prev in Thread] Current Thread [Next in Thread>