cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viktors Rotanovs <vikt...@riga.nu>
Subject Re: get-nested-content & get-parameter question
Date Fri, 22 Sep 2000 01:08:27 GMT
Hi,

I had the same problem - see previous messages.
No answer yet.
Probably this is the Frequently-Asked-Never-Answered-Question :-)
There should be some explanation on how Cocoon converts
tags and strings to method calls.

On Fri, 22 Sep 2000, you wrote:
> Hi,
>
> I see the template 'get-nested-content' used all over the place in
> the built-in tag libs... Can someone explain its motivation and use?
> Why is it needed?
>
> I have an XML page and two tag libs (see below). The first tag lib
> works fine. The second one gives me a compile error (in the String
> assignment because the get-parameter name="def" simply substitutes an
> empty string). I'm not using 'get-nested-content'. Should I be?
> Anyone have any ideas why the substitution for get-parameter
> name="def" wouldn't substitute in the same one the other one ("abc")
> substitutes?
>
> Sorry for the complex question -- hopefully someone has seen and
> solved a similar problem...
>
> Chris
>
> ------------------------------------
> <?xml version="1.0"?>
> <?xml-stylesheet href="index.xsl" type="text/xsl"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="xslt"?>
>
> <xsp:page
>    language="java"
>    create-session="true"
>    xmlns:sql="http://www.apache.org/1999/SQL"
>    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>    xmlns:request="http://www.apache.org/1999/XSP/Request"
>    xmlns:mytaglib1="http://mystuff.com/mytaglib1"
>    xmlns:mytaglib2="http://mystuff.com/mytaglib2"
>
>
> <content>
>    <mytaglib1:dosomething>
>      <parameter><request:get-parameter name="abc"></parameter>
>    </mytaglib1:dosomething>
>
>    <mytaglib2:dosomethingelse>
>      <parameter2><request:get-parameter name="def"></parameter2>
>    </mytaglib2:dosomethingelse>
> </content>
> ------------------------------------
>
> I also have tag libs that look like this:
>
> ------------------------------------
> <?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/XSP/Core"
>    xmlns:mytaglib1="http://mystuff.com/mytaglib1"
>
>
> <xsl:template match="xsp:page">
>    <xsp:page>
>      <xsl:apply-templates select="@*"/>
>      <xsl:apply-templates/>
>    </xsp:page>
> </xsl:template>
>
> <xsl:template match="mytaglib1:dosomething">
>    <xsp:logic>
>    {
>    String xx = <xsl:value-of select="parameter"/>;
>    }
>    </xsp:logic>
> </xsl:template>
>
> <xsl:template match="@*|*|text()|processing-instruction()">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
>    </xsl:copy>
> </xsl:template>
>
> </xsl:stylesheet>
> ------------------------------------
>
> and
>
> ------------------------------------
> <?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/XSP/Core"
>    xmlns:mytaglib2="http://mystuff.com/mytaglib2"
>
>
> <xsl:template match="xsp:page">
>    <xsp:page>
>      <xsl:apply-templates select="@*"/>
>      <xsl:apply-templates/>
>    </xsp:page>
> </xsl:template>
>
> <xsl:template match="mytaglib2:dosomethingelse">
>    <xsp:logic>
>    {
>    String yy = <xsl:value-of select="parameter2"/>;
>    }
>    </xsp:logic>
> </xsl:template>
>
> <xsl:template match="@*|*|text()|processing-instruction()">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
>    </xsl:copy>
> </xsl:template>
>
> </xsl:stylesheet>
> ------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 
Best Wishes,
Viktors Rotanovs
I create websites that attract more clients. http://riga.nu/
Riga Latvia +371, Phone 7377-142, GSM 9173-000, FAX 7377-472

Mime
View raw message