xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kazi the P i R @ t {-" <k...@ewarna.com>
Subject xsl transfromation.
Date Tue, 31 Jul 2001 04:23:38 GMT
System: Win 98
Servlet Engine: Tomcat (standalone) 3.2.1
XML Framework: Cocoon 1.8.2
Trouble:
I was just trying out an xsl transformaiton of a static xml page i
created... but then when i called the page from the browser the following
error comes up -

'org.apache.cocoon.processor.ProcessorException: Could not associate
stylesheet to document:  error reading
C:\Tomcat\webapps\cocoon\newProd\guide-html.xsl:
org.xml.sax.SAXParseException: The element type "xsl:template" must be
terminated by the matching end-tag "</xsl:template>".'

I just checked the <xsl:template.. issue it mentions.. and it appears that
all the tags were closed properly.

The XSL file -

<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3c.org/1999/XSL/Transform"
version="1.0">
<html>
<head>
<title>A Guide to the Search Utility</title>
</head>
<body>
<xsl:template match="guide">
<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
<table width="100%" border="0">
<tr>
<td>
<xsl:apply-template select="buttons"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="guide">
<table width="100%" border="0">
<tr>
<td>
<xsl:apply-template select="how-to"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="guide">
<table width="60%" border="0" align="center" valign="middle">
<tr>
<td>
<xsl:apply-template select="contact"/>
</td>
</tr></table>
</body>
</html>
</xsl:template>
<xsl:template match="buttons">
<xsl:for-each select="buttons[*]"><p><img border="0" align="left"
valign="middle">
<xsl:attribute name="src"><xsl:value-of select="image"/></xsl:attribute>
</img>
<xsl:vlaue-of select="text"/></p>
</xsl:for-each>
</xsl:template>
<xsl:template match="how-to">
<p>
<xsl:apply-template select="description"/>
</p>
</xsl:template>
<xsl:template match="description">
<ol>
<xsl:for-each select=".">
<li>
<xsl:value-of select="."/>
<xsl:apply-template select="sub-point"/>
</li>
</xsl:for-each>
</ol>
</xsl:template>
<xsl:template match="subpoint">
<ul>
<xsl:value-of select="."/>
</ul>
</xsl:template>
<xsl:template match="contact">
<p><xsl:text>form more information contact the person below:</xsl:text></p>
<p>
<b><xsl:value-of select="name"/></b>
</p>
<p>
<b><xsl:value-of select="email"/></b>
</p>
</xsl:template>
</xsl:stylesheet>

My DTD -

<!ELEMENT guide (buttons,how-to,contact)>
<!ELEMENT buttons (search,view,sort,warning,respond)>
<!ELEMENT how-to (description+)>
<!ELEMENT contact (name,email)>
<!ELEMENT search (text, image)>
<!ELEMENT view (text,image)>
<!ELEMENT sort (text,image)>
<!ELEMENT warning (text,image)>
<!ELEMENT respond (text,image)>
<!ELEMENT text (#PCDATA)>
<!ELEMENT image (#PCDATA)>
<!ELEMENT description (#PCDATA|sub-point)*>
<!ELEMENT sub-point (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT email (#PCDATA)>


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message