cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Som...@realTech.de
Subject <util:include-expr expr="javafunction()"/>
Date Mon, 11 Dec 2000 12:20:40 GMT
What's the problem with it? I used the xsp example "lib-page.xml" (included
in cocoon) and just added a a few  lines to test the "<util:include ..." -
Funktionality (a java-function returns a tag), but I only get
"org.xml.sax.SAXException: The markup in the document preceding the root
element must be well-formed. [FATAL ERROR] [File: "null" Line: 1 Column: 1]
..."


lib-page.xml:
==========

<?xml version="1.0"?>

<!-- Author: Stefano Mazzocchi "stefano@apache.org" -->
<!-- Version: $Id: lib-page.xml,v 1.5 2000/03/01 16:05:40 stefano Exp $ -->

<?cocoon-process type="xsp"?>

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="page-html.xsl" type="text/xsl"?>

<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
  xmlns:util="http://www.apache.org/1999/XSP/Util"
>

<!-- NEW -->
<xsp:logic>
	private String getit()
	{
		return "&lt;stringtag&gt;Es funktioniert&lt;/stringtag&gt;";
	}
</xsp:logic>


<page>
 <title>First XSP Page</title>
 <author>
  <name>Stefano Mazzocchi</name>
  <address>stefano@apache.org</address>
 </author>


<!-- NEW -->
 <p>Hallo<util:include-expr expr="getit()"/>Hallo</p>
.....
 
</page>
</xsp:page>


page-html.xsl:
===========
...
<xsl:template match="stringtag">
	<h2>asasa</h2>
</xsl:template>
...

Mime
View raw message