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

Re: xml-to-xml output does not show properly on IE5

Subject: Re: xml-to-xml output does not show properly on IE5
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Wed, 3 Oct 2001 08:59:21 -0400
xml to xml output
Your problem is that the output from the stylesheet does not start with a
root element, but instead it starts with your <xsl:text> , which is not an
XML element at all.  The fact that you tried to put an xml declaration in by
using an <xsl:text> element doesn't change anything.  The xsl processor will
put one in anyway unless you tell it not to.

So your output is undoubtedly not-well-formed XML, and Internet Explorer has
probably decided that it is just a text file.  In that case, it would render
only the element content.

Get rid of the <xsl:text> element at the beginning, make sure you have a top
level root element, and you should be all right.

Cheers,

Tom P

[Anne Honkaranta]

[...]
By "not show properly" I mean that the IE does not show the output document
with
it's fancy XSLT stylesheet it uses for showing XML documents. The output
document
shows as a junk of  text, from which the element tags have been rendered
off.
When using "show XSLT output" -tool to source document with PI, I see that
output document seems to be well-formed XML, xml tags are on the appropriate
places
 and the encoding declaration is OK.


Here are my example documents:

************************************************
Main template (a clip of the whole transformation) from  v2tov3.xsl in /Xslt

<?xml version='1.0' encoding='iso-8859-1'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"
omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;&#63;xml version="1.0"
encoding="iso-8859-1"&#63;&gt;</xsl:text>
 <xsl:apply-templates select="*" />
</xsl:template>

<xsl:template match="*">
...make identity transformation and add some attributes...
</xsl:template>
</xsl:stylesheet>

*************************************************************
A start of a source document with PI added to it for client-side
transformation (file Pinkku2.xml in /Runot/):

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="../Xslt/v2tov3.xsl" ?>
<!DOCTYPE RUNO SYSTEM "../Dtd/runo2.dtd"
[<!ENTITY Pinkku SYSTEM "../Kuvat/Penguin.gif" NDATA GIF>]>
<RUNO TYYPPI="LASTEN">
... some tagged text
</RUNO>
**********************************************************
.. when Pinkku2.xml is opened in IE 5 the tags disappear form screen view.
the appropriate xml tags are there when output is studied using Microsoft IE
XSLT Output viewer.
Source document is well-formed according to Microsoft Validate XML-tool (in
IE)




 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.