cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <>
Subject RE: A xsp simple question
Date Sun, 23 Oct 2005 08:06:23 GMT
Logicsheets are not defined in the sitemap but either in cocoon.xconf or in the XSP itself.
To start with, it is simpler to define it in the XSP.  Put in greeting3.xsp
<xsp:logicsheet location="logicsheet.greetings.xsl"/>
before <xsp:page> and remove the map:transform from the sitemap.
HTH, Alfred.
-----Original Message-----
From: Kerstin Nordqvist []
Sent: Samstag, 22. Oktober 2005 16:00
Subject: A xsp simple question


I have again a very simple question. I am trying to use the xsp-guide included in the cocoon-2.1.7.
The examples is without sitemap.xmap, but I am trying the make them work anyway.

Simple XSP Logicsheet Example:


<?xml version="1.0"?>

  xmlns:xsp="  <>"
  xmlns:greeting="  <>">





<?xml version="1.0"?>






<xsl:template match="xsp:page">


  <xsl:apply-templates select="@*"/>




<xsl:template match="greeting:hello-world">

  <!-- more complex XSLT is possible here as well -->


    // this could be arbitrarily complex Java code, JDBC queries, etc.

    String msg = "Hello, world!";




<!-- This template simply copies stuff that doesn't match other -->

<!-- templates and applies templates to any children.           -->

<xsl:template match="@*|node()" priority="-1">


  <xsl:apply-templates select="@*|node()"/>




<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="">
    <map:match pattern="*.xsp">
     <map:generate type="serverpages" src="{1}.xsp"/>
     <map:transform src="logicsheet.greeting.xsl">
      <map:parameter name="contextPath"
     <map:serialize type="html"/>


The result I will get in the web browser is:
// this could be arbitrarily complex Java code, JDBC queries, etc. String msg = "Hello, world!";

source code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<greeting xmlns:xsp="" xmlns:greeting="">
    <xsp:logic language="java">
    // this could be arbitrarily complex Java code, JDBC queries, etc.
    String msg = "Hello, world!";


It seams like the xsp code does not evolve. Why ? Can someone please help me.
When I am trying to use xsp in my xsl file, when transforming an xml file to a html file,
the same thing happens and all html coding disappears.
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

View raw message