This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]