K
Kavok
Im using Cooktop or Saxon to combine both of these into an xml file.
I would like the end product to be read by browsers are html, or xhtml.
However as soon as I open up the output.xml in say IE it gives me this
message:
------------------------------------------------------------------------------------------------------------------------------
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
End tag 'head' does not match the start tag 'META'. Error processing
resource 'file:///C:/Documents and Settings/User154/De...
</head>
--^
------------------------------------------------------------------------------------------------------------------------------
What am I doing wrong?
File Characters.xsl:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" />
<xsl:template match="/">
<html>
<head>
<title>TEST</title>
</head>
<body>
<h3>The recorded age is unusually high. Please check original data</h3>
<xsl:apply-templates select="/Characters/Character" />
</body>
</html>
</xsl:template>
<xsl:template match="Character">
<xsl:if test="@age > 110" >
<p><b><xsl:value-of select="." /></b>Is older than expected. Please
check if this character's age, <xsl:value-of select="@age" /></p>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------
File Characters.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Characters.xsl"?>
<Characters>
<Character age="99">Julius Caesar</Character>
<Character age="23">Anne Boleyn</Character>
<Character age="41">George Washington</Character>
<Character age="45">Martin Luther</Character>
<Character age="800">Methuselah</Character>
<Character age="119">Moses</Character>
<Character age="50">Asterix the Gaul</Character>
</Characters>
---------------------------------------------------------------
I would like the end product to be read by browsers are html, or xhtml.
However as soon as I open up the output.xml in say IE it gives me this
message:
------------------------------------------------------------------------------------------------------------------------------
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
End tag 'head' does not match the start tag 'META'. Error processing
resource 'file:///C:/Documents and Settings/User154/De...
</head>
--^
------------------------------------------------------------------------------------------------------------------------------
What am I doing wrong?
File Characters.xsl:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" />
<xsl:template match="/">
<html>
<head>
<title>TEST</title>
</head>
<body>
<h3>The recorded age is unusually high. Please check original data</h3>
<xsl:apply-templates select="/Characters/Character" />
</body>
</html>
</xsl:template>
<xsl:template match="Character">
<xsl:if test="@age > 110" >
<p><b><xsl:value-of select="." /></b>Is older than expected. Please
check if this character's age, <xsl:value-of select="@age" /></p>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------
File Characters.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Characters.xsl"?>
<Characters>
<Character age="99">Julius Caesar</Character>
<Character age="23">Anne Boleyn</Character>
<Character age="41">George Washington</Character>
<Character age="45">Martin Luther</Character>
<Character age="800">Methuselah</Character>
<Character age="119">Moses</Character>
<Character age="50">Asterix the Gaul</Character>
</Characters>
---------------------------------------------------------------