cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Werewka <...@priv4.onet.pl>
Subject XSP tag-library simple problem ;)
Date Tue, 10 Apr 2001 12:59:31 GMT

When I want to insert class level declaration like (see below in bold).
The result is that the definition of getMyDate() is not found, when I look 
in the
generated Java code i see that neither xsp:structure or xsp:logic
didn't take effect in the result code, but the <helpdesk:date/> tag
is expanded correctly.

Why?

Thank you for help !

<?xml version="1.0"?>

<xsl:stylesheet
         version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:xsp="http://www.apache.org/1999/Core"
         xmlns:helpdesk="http://www.helpdesk.de"
 >

   <xsl:template match="xsp:page">
     <xsp:page>
       <xsl:copy>
         <xsl:apply-templates select="@*"/>
       </xsl:copy>

       <xsp:structure>
         <xsp:include>java.util.Date</xsp:include>
         <xsp:include>java.text.SimpleDateFormat</xsp:include>
       </xsp:structure>

       <xsp:logic>
                 private static String getMyDate()
                 {
                         return (new 
SimpleDateFormat("MM/dd/yyyy")).format(new Date());
                 }
       </xsp:logic>

       <xsl:apply-templates/>
     </xsp:page>
   </xsl:template>

    <xsl:template match="helpdesk:date">
         Date: <xsp:expr>getMyDate()</xsp:expr>
   </xsl:template>

   <xsl:template match="@*|*|text()|processing-instruction()">
     <xsl:copy>
       <xsl:apply-templates
            select="@*|*|text()|processing-instruction()"/>
     </xsl:copy>
   </xsl:template>

</xsl:stylesheet>

Mime
View raw message