This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Embedded Stylesheet
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Embedded Stylesheet
- From: Oleg Tkachenko <olegt at multiconn dot com>
- Date: Tue, 30 Oct 2001 11:48:03 +0200
- Organization: Multiconn International
- References: <008e01c160f1$9c3fdb60$da4ffea9@spi> <002901c160f4$95ff2e60$a4b332d4@orion>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Sean Kelly wrote:
> Thanks for the link, I already tried this example before posting. I only get
> a tree listing (no styling whatsoever) of the XML document using IE5, which
> defeats the object.
>
> The source code I provided in first post was used from the Wrox book
> Professional XML.
>
> Am I to assume that IE5 MSXML2 doesn't support embedding stylesheets?
The following works fine for me in ie5.5 with msxml3 in replace-mode:
<?xml version="1.0"?>
<?xml-stylesheet href="#newsStylesheet" type="text/xsl" media="screen"?>
<root>
<xsl:stylesheet version="1.0" id="newsStylesheet"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<html>
<head>
<title>Sample of an Embeded Stylesheet</title>
</head>
<body>
<p>NEWS</p>
<xsl:for-each select="news/day">
<p>
<xsl:value-of select="date"/>
<br/>
<b>
<xsl:value-of select="title"/>
</b>
<br/>
<xsl:value-of select="text"/>
</p>
</xsl:for-each>
</body>
</html>
</xsl:stylesheet>
<news>
<day>
<date>30 October 2001</date>
<title>Embedded Stylesheet Example</title>
<text>The following text is displayed using an embedded stylesheet</text>
</day>
</news>
</root>
Check your msxml3 installation (see
http://www.netcrucible.com/xslt/msxml-faq.htm)
--
Oleg Tkachenko
Multiconn International, Israel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list