cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <cocoonge...@yahoo.com>
Subject [SUMMARY] Re: using get-string-parameter from logicsheet-util.xsl
Date Mon, 18 Nov 2002 23:01:56 GMT
it works fine: if you have the right syntax.  Two
different places in the docs give misleading ideas
about what that syntax is which is what caused the
problems I was seeing.  

The correct syntax is 
<ns:tag><ns:param name="paramName">literal or dynamic
value</ns:param></ns:tag>

so, in the example given below I needed to use: 

<port:areas><port:param
name="image-id">22</port:param></port:areas>

I just don't have time to submit a doc patch right now
to make this clearer to future would-be users but
hopefully the archive will help.

Geoff

--- Geoff Howard <cocoongeoff@yahoo.com> wrote:
> Are the templates in logicsheet-util.xsl current and
> usable from custom logicsheets?
> 
> When trying to use passing in parameters to my
> logicsheet using get-string-parameter
> logicsheet-util.xsl I am getting "Stylesheet
> directed
> termination" which unless I am misunderstanding
> indicates that the required parameter was not
> successfully found.  Relevant snippets are below.
> 
> Snippets (2.1 dev by the way):
> In my xsp: 
>
<port:areas><port:image-id>22</port:image-id></port:areas>
> which fails, but 
> <port:areas image-id="24"></port:areas>
> works.
> 
> In "port.xsl":  
> <!-- Namespace URI for this logicsheet -->
> <xsl:param
>
name="namespace-uri">http://leverageweb.com/port/1.0</xsl:param>
> <!-- Include logicsheet common stuff -->
> <xsl:include href="logicsheet-util.xsl"/>
> 
> and the template: 
> <xsl:template match="port:areas">
>   <xsl:variable name="image-id">
>     <xsl:call-template name="get-string-parameter">
>     <xsl:with-param
> name="name">image-id</xsl:with-param>
>     <xsl:with-param
> name="required">true</xsl:with-param>
>     </xsl:call-template>
>   </xsl:variable>
> 
> ... <xsl:copy-of select="$image-id"/>
> </xsl:template>
> 
> The reason I wonder about the status is that I see
> from digging through the archives that this was
> originally introduced as a part of another
> logicsheet,
> and doesn't seem to be used very much in the
> built-ins
> or the hello example - these each have their own
> (very
> similar) methods for accessing parameters.
> 
> Geoff Howard
> 
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email:
> cocoon-dev-help@xml.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message