XML/XSLT problem

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">

<xsl:eek:utput 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 &gt; 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>
---------------------------------------------------------------
 
P

Peter Flynn

Kavok said:
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>
--^

Using Internet Explorer.
It works fine in Firefox here.

///Peter
 
A

Andy Dingley

End tag 'head' does not match the start tag 'META'. Error processing
resource 'file:///C:/Documents and Settings/User154/De...

Something (probably IE) is playing at web servers and deciding that your
HTML needs to have a <meta> element embedded in the head. It's sticking
a HTML-style <meta> in there, not even an XML-style <meta/> and so your
document stops being well-formed altogether.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top