You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthew Cordes <mc...@maine.edu> on 2000/10/16 18:02:55 UTC

Calling, a, tag, library, within, a, tag, Library, possible?

Hello all.

Is it possible to place library tags ( e.g. <request:get-parameter ...> )
inside a tag library.  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?

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?

-matt