Re: [xsl] XSLT 1.0 serializer for XML

Subject: Re: [xsl] XSLT 1.0 serializer for XML
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Date: Fri, 20 Aug 2010 00:05:54 +0200
David,

> ah it depends what you are doing, if you are doing an in-browser display
> of the xml source, the msxml parser will have removed all white space
> from the source (rather than from the result) before xslt starts, in
> which case you need to "manually" indent the result, adding white space
> (or nbsp). To test if this is the problem ass xml:space="presrve" to
> your test document that you are serialising.

I added xml:space="preserve" to the <a> node (see below), no change in
the IE8 display.

In Firefox I can use "View Page Source" to inspect the input XML file.
And I can mark a selection, right-click and do "View Selection Source"
which then displays the HTML generated by the stylesheet referenced in
the XML file.

I googled, but IE8 seems not to support this feature.
I found a bookmarklet which should do the same:
http://pclancey.com/tutorial/selectsrc/

But this does not work for stylesheet generated HTML ...


<?xml-stylesheet type="text/xsl" href="serialize-demo2.xsl"?>
<?some-PI testing?>
 <!-- comment1 -->
<a xml:space="preserve">
<![CDATA[<greeting>Hello, world!</greeting>]]>
 <?another-PI test2?>
 <!-- comment1 -->
 <b n1="urn:a1" a2="x" xmlns:n1="urn:n1" xmlns:n2="urn:n2"/>
 <c>text1<d a2="a2" xmlns="urn:d"/></c>
</a>


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294



From:       David Carlisle <davidc@xxxxxxxxx>
To:         xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc:         Hermann Stamm-Wilbrandt/Germany/IBM@IBMDE
Date:       08/19/2010 06:42 PM
Subject:    Re: [xsl] XSLT 1.0 serializer for XML



On 19/08/2010 17:38, Hermann Stamm-Wilbrandt wrote:
> But the display in IE8 is as ugly as before ...

ah it depends what you are doing, if you are doing an in-browser display
of the xml source, the msxml parser will have removed all white space
from the source (rather than from the result) before xslt starts, in
which case you need to "manually" indent the result, adding white space
(or nbsp). To test if this is the problem ass xml:space="presrve" to
your test document that you are serialising.

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

Current Thread