I do not know if you want exactly this stuff,
buy this is working logic sheet, not completely implemented.
It is writing security roles to the System.out .......
Oskar Werewka
>I wish to factor out common stuff from my XSP pages to put in a common
>library.
>I'm under the impression that this is best done with logicsheets. I've
>failed
>to make this work. Cocoon adds a node to the document tree but does nothing
>with the XSP I'm trying to generate. I use a processing directive to call
>the
>sheet, and I'm probably doing something stupid ;-). I don't have time right
>now to read and undestand the source code. In lieu of documentation, perhaps
>someone has a toy example to be added to the samples.
>
>Once we have some way of undersanding this stuff ourselves we might be able
>to contribute to the docmentation effort ;-)
>
>- Torsten Ek
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]>
--
Ile zarabiasz? Wypelnij ankiete,
dowiesz sie jak zarabiac wiecej [ http://listaplac.onet.pl ]
<?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:security="http://www.helpdesk.desy.de/security"
>
<xsl:template match="xsp:page">
<xsp:page>
<xsl:apply-templates select="@*"/>
<xsp:structure>
<xsp:include>java.util.Hashtable</xsp:include>
</xsp:structure>
<xsp:logic>
void pupa(String role)
{
System.out.println("You role: " + role);
}
</xsp:logic>
<xsl:apply-templates/>
</xsp:page>
</xsl:template>
<!-- encloses the elements to be included if parameters are valid -->
<xsl:template match="security:roles">
<xsl:for-each select="security:role">
<xsp:logic>
pupa("<xsl:value-of select="."/>");
</xsp:logic>
</xsl:for-each>
</xsl:template>
<!-- default taglibrary template -->
<xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="esql.xsl"?>
<?xml-logicsheet href="/WEB-INF/taglibs/check.xsp.xsl"?>
<?xml-logicsheet href="/WEB-INF/taglibs/cbox.xsp.xsl"?>
<?xml-logicsheet href="/WEB-INF/taglibs/security.xsp.xsl"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<!--<?cocoon-format type="text/loose"?>-->
<xsp:page
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:request="http://www.apache.org/1999/XSP/Request"
xmlns:util="http://www.apache.org/1999/XSP/Util"
xmlns:session="http://www.apache.org/1999/XSP/Session"
xmlns:security="http://www.helpdesk.desy.de/security"
create-session="true"
>
<page>
<security:roles>
<security:role>administrator</security:role>
<security:role>worker</security:role>
<security:role>extendedworker</security:role>
</security:roles>
</page>
</xsp:page>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>