Hi Wong,
No, it shouldn't be necessary, just try this XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:copy-of select="MyPre" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output generated using your XML "as-is":
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
</head>
<body><MyPre><p>Hello<br>this is a <a href="http://www.google.com"
alt="nothing">test</a></p></MyPre></body>
</html>
This renders correctly in IE6 on Windows 2003 Server.
If you want to output XML (or better said XHTML) then this also works:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="no"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:copy-of select="MyPre" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I have tested this in Xselerator 2.6.
HTH,
<prs/>
-----Original Message-----
From: Wong Chin Shin [mailto:publicbbs(_at_)nascencetech(_dot_)com]
Sent: Tuesday, November 30, 2004 5:11 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] skip formatting ala <pre>?
Hi,
Let's say for example an XML file contains the following element:
<MyPre><p>Hello<br />this is a <a href="http://www.google.com"
alt="nothing">test</a></p></MyPre>
Is there a way for me to output the contents of <MyPre> "as-is" including
the tags contained within?
Do I need to convert all "<" to "<" and so on in order to accomplish what
I want?
Thanks
Wong
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--