cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Schneider" <volker.schnei...@danet.de>
Subject RE: message Stylesheet directed termination
Date Sun, 26 May 2002 11:45:05 GMT
Hi Hans,

this means, that you have a typo in your sitemap.

Best regards
- Volker -
  -----Original Message-----
  From: HansRupp@aol.com [mailto:HansRupp@aol.com]
  Sent: Sonntag, 26. Mai 2002 11:01
  To: cocoon-users@xml.apache.org
  Subject: message Stylesheet directed termination


  Hi

  I get an error

  --------------------------------------------------------------------------
-

  type fatal

  message Stylesheet directed termination

  description java.lang.RuntimeException: Stylesheet directed termination

  sender org.apache.cocoon.servlet.CocoonServlet

  source Cocoon servlet

  stack-trace

  java.lang.RuntimeException: Stylesheet directed termination
  at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231)
  at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:436)
  at org.xml.sax.helpers.XMLFilterImpl.endDocument(XMLFilterImpl.java:518)
  at org.xml.sax.helpers.XMLFilterImpl.endDocument(XMLFilterImpl.java:518)
  at org.apache.xerces.parsers.SAXParser.endDocument(SAXParser.java:1230)
  at
org.apache.xerces.validators.common.XMLValidator.callEndDocument(XMLValidato
r.java:1146)
  at
org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher.dispatch
(XMLDocumentScanner.java:1499)
  at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
  ....

  with a stylesheet which I developed with XMLSpy. In XMLSpy the
transformation works perfectly well.

  xsl stylesheet:
  --------------------------------------------------------------------------
------------------------------------------------------
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="UTF-8" />

  <xsl:variable name="lang.pageTitle" select="'Ihre Emails'" />
  <xsl:variable name="lang.youHave" select="'Sie haben '" />
  <xsl:variable name="lang.newEmails" select="' neue E-mails'" />
  <xsl:variable name="lang.searchEmails" select="'Suche in Ihren E-Mails'"
/>
  <xsl:template match="/">
  <html>
  <head>
  <title> <xsl:value-of select="$lang.pageTitle" /></title>
  <meta name="generator" content="Sausage Software HotDog Professional 5" />
  </head>
  <body>
  <table>
  <tr>
  <td>
  <form>
  <table>
  <tr>
  <td> <xsl:value-of select="$lang.youHave" /> <xsl:value-of
select="count(mails/mail[new='true'])" />  <xsl:value-of
select="$lang.newEmails" /></td>
  </tr>
  <tr>
  <td> <xsl:value-of select="$lang.searchEmails" /><br />

  <input type="TEXT" /></td>


  </tr>
  <tr>
  <td><input type="submit" /></td>
  </tr>
  </table></form>
  </td>
  <td>My Office Konfiguration</td>
  </tr>
  </table>
  <table>
  <tr>
  <td><img src="pics/mail_reiter_eingang_akt.gif" width="90" height="15"
border="0" alt="mail_reiter_eingang_akt.gif - 137 Bytes" /><img
src="pics/mail_reiter_ausgang.gif" width="89" height="15" border="0"
alt="mail_reiter_ausgang.gif - 139 Bytes" /></td>
  </tr>
  <tr>
  <td><img src="pics/mail_but_verschieben.gif" width="120" height="16"
border="0" alt="mail_but_verschieben.gif - 199 Bytes" /><img
src="pics/mail_but_kopieren.gif" width="119" height="16" border="0"
alt="mail_but_kopieren.gif - 184 Bytes" /></td>
  </tr>
  <tr>
  <td>
  <table>
  <xsl:apply-templates select="mails/mail" />
  </table></td>
  </tr>
  </table>
  </body>
  </html>
  </xsl:template>

  <xsl:template match="mail">
  <tr>
  <td><input type="checkbox"/></td>
  <td> <xsl:if test="Body/attachment">
  <img src="pics/mail_icon_attach.gif" alt="attachment" />
  </xsl:if>
  </td>
  <td><xsl:value-of select="Header/Sender" /></td>
  <td><xsl:value-of select="Header/Subject" /></td>
  <td><xsl:value-of select="Header/Date" /></td>
  </tr>
  </xsl:template>
  </xsl:stylesheet>

  --------------------------------------------------------------------------
------------------------------------
  sitemap:

  <?xml version="1.0" encoding="UTF-8"?>
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:generators default="file">
  <map:generator name="file"
src="org.apache.cocoon.generation.FileGenerator"/>
  </map:generators>
  <map:transformers default="xslt">
  <map:transformer name="xslt"
src="org.apache.cocoon.transformation.TraxTransformer"/>
  </map:transformers>
  <map:readers default="resource">
  <map:reader name="resource"
src="org.apache.cocoon.reading.ResourceReader"/>
  </map:readers>
  <map:serializers default="html">
  <map:serializer name="xml" mime-type="text/xml"
src="org.apache.cocoon.serialization.XMLSerializer"/>
  <map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerializer"/>
  <map:serializer name="svg2png"
src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/>
  <map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf"/>
  </map:serializers>
  <map:matchers default="wildcard">
  <map:matcher name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  </map:matchers>
  <map:pipelines>
  <map:pipeline>
  <map:match pattern="index.html">
  <map:read src="static/index.html" mime-type="text/html"/>
  </map:match>
  </map:pipeline>
  <map:pipeline>
  <map:match pattern="content/*.html">
  <map:generate src="content/{1}.xml"/>
  <map:transform src="content/mail.xsl"/>
  <map:serialize type="html"/>
  </map:match>
  </map:pipeline>
  </map:pipelines>
  </map:sitemap>
  --------------------------------------------------------------------------
-----------
  xml file:
  --------------------------------------------------------------------------
-----------
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Hans Michael
Rupp (danet Internet Solutions GmbH) -->
  <?xml-stylesheet type="text/xsl" href="mails_englisch.xsl"?>
  <mails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="mails.xsd">
  <mail>
  <Header>
  <Sender>Hans M. Rupp</Sender>
  <To>hmrupp@mercedes-benz-portal.de</To>
  <Date>25.5.02</Date>
  <Subject>black hole </Subject>
  </Header>
  <Body>
  <text>We'll travel faster than light to a black hole and discover a
doorway in time</text>
  </Body>
  <new>true</new>
  </mail>
  <mail>
  <Header>
  <Sender>Dilbert</Sender>
  <To>hmrupp@mercedes-benz-portal.de</To>
  <Date>25.5.02</Date>
  <Subject>black hole </Subject>
  </Header>
  <Body>
  <text>We'll travel faster than light to a black hole and discover a
doorway in time</text>
  <attachment>dilbert.gif</attachment>
  </Body>
  <new>false</new>
  </mail>
  </mails>
  --------------------------------------------------------------------------
--------------

  I use Windows 2000, Tomcat 4.04b3, JDK 1.3.1_03, Cocoon 2.0.2
  and XMLSpy 4.3

  Many thanks,

  Hans


Mime
View raw message