Netskimmer
Programmer
Hi all,
I’m new to xml and I’m trying to learn it from a book I picked up awhile back called XML and Java from Scratch by Nicholas Chase. I have gotten to the point where he begins to discuss XSL but I can’t seem to get my browser to accept the code. He writes to create two files:
Test.xml
<?xml version='1.0'?>
<?xml:stylesheet type="text/xsl" href=test.xsl"?>
<document>
<message>
It worked!
</message>
</document>
And
Test.xsl
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body>
<h1><xsl:value-of select="//message"/></h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Then open test.xml in the browser. If the browser is properly set up it should show “It worked” in large letters as if you had used a css file but all I get is an element tree and a message that the xml document appears to have no style information. If this happens he writes to install MSXML3. I have done this but it still does not display properly. Any idea what I an doing wrong?
I’m new to xml and I’m trying to learn it from a book I picked up awhile back called XML and Java from Scratch by Nicholas Chase. I have gotten to the point where he begins to discuss XSL but I can’t seem to get my browser to accept the code. He writes to create two files:
Test.xml
<?xml version='1.0'?>
<?xml:stylesheet type="text/xsl" href=test.xsl"?>
<document>
<message>
It worked!
</message>
</document>
And
Test.xsl
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body>
<h1><xsl:value-of select="//message"/></h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Then open test.xml in the browser. If the browser is properly set up it should show “It worked” in large letters as if you had used a css file but all I get is an element tree and a message that the xml document appears to have no style information. If this happens he writes to install MSXML3. I have done this but it still does not display properly. Any idea what I an doing wrong?