cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Calling, a, tag, library, within, a, tag, Library, possible?
Date Tue, 17 Oct 2000 11:45:52 GMT
Matthew Cordes <mcorde61@maine.edu> wrote:
>Is it possible to place library tags ( e.g. <request:get-parameter ...> )
>inside a tag library.

Yes.

>  Here is an example:
>
><xsl:stylesheet
>	xmlns:myLib="http://mylib"
>	xmlns:myLib2="http://mylib2"
>	...
> >
>
><xsl:template match="xsp:page">
>   <xsp:page create-session="true"
>	xmlns:myLib2="http://mylib2"
> >
>	<xsl:apply-templates>
></xsl:template>
>
>
><xsl:template match="myLib:do-stuff">
><xsp:logic>
>
>	<!-- this is the part I'm curious about
>		I want to use a second taglib within 1
>	-->
>	if ( <mylib2:this-tag-writes-the-word-true-or-false/> )
>	{
>		...
>	}
>
></xsp:logic>
></xsl:template>
>
>...
>
></xsl:stylesheet>
>
>
>If I use myLib2 from an xml file it works fine, but using is from
>within a tag library i get the following java:
>
>if (
>		xspParentNode = xspCurrentNode;
>     xspNodeStack.push(xspParentNode);
>     xspCurrentNode =
>       
>document.createElement("mylib2:this-tag-writes-the-word-true-or-false");
>     xspParentNode.appendChild(xspCurrentNode);
>)
>
>which of course doesn't compile.
>
>Any ideas?

You need to specify the mylib2 namespace in your original XML file which 
calls the logicsheet. I know, this breaks separation of concerns, but it 
will be better in C2. Eventually.

>
>Also I've heard the term logicsheet.  Is that the same thing as
>including an *.xsl file in cocoon.properties and using its namespace
>elsewhere ( a taglib, I think )?  If not, how do they differ?

A logicsheet is an XSLT sheet which works with logic. A taglib is a 
logicsheet which confines itself to converting substituting logic for tags 
(and maybe inserting an xsp:page tag to get it to compile). You could have a 
logicsheet that other things than that, but basically, they're 
interchangeable words.



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message