Hi,

The issue with logicsheet XSLs is that they should translate what they
understand and pass through what they don't. This in effect is how the
embedded tags are resolved, when all logic sheets are run against the XSP
file. Any tags that are left over are output in the resulting Document
(logically).

To make this happen, there are two minimum requirements for your logicsheet.

Firstly, provide a template that processes the <xsp:page/> element, which in
turn creates an <xsp:page/> element as a root context for the follow-on
logicsheets. For example:

  <xsl:template match="xsp:page">
    <xsp:page>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
    </xsp:page>
  </xsl:template>


and Secondly, to ensure that all unprocessed elements are copied, include
the following template in your logicsheet:

  <!-- copied from [C2] util.xsl  -->
  <xsl:template match="@*|*|text()|processing-instruction()">
    <xsl:copy>
      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
  </xsl:template>


Hope this helps,
Adrian

----- Original Message -----
From: Aurelien <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 8:52 PM
Subject: nested stylesheets


> Hi,
>
> (sorry if this kindof a repost, I didn't see the message on the list,
> and neither did it show in my sent items...)
>
> I've already managed to have some ejb's basically exposed as taglibs.
> Now, I'd like to be able to nest custom tags:
>
> I have a method that checks if a user has certain rights (I do this in
> order to have a centralized session/roles mechanism so as to be able to
> have several servlet engines sharing a common set of users), for example
> with a tag like this:
>
> <gatekeeper:checkUser sessionId="..." requestId="..."/>
>
> And I have another bean that provides information about sport events:
>
> <infokiosk:getSoccerScore matchId="..."/>
>
> I'd like to be able to nest tags, so I can delegate basic logic to XML
> authors that don't want to hear about programming. They'd do something
> like this (in an xsp document):
>
> <infokiosk:getSoccerScore matchId="...">
>    <infokiosk:checkAccess>
>      <gatekeeper:checkUser sessionId="..." requestId="..."/>
>    </infokiosk:checkAccess>
> </infokiosk:getSoccerScore>
>
> Has someone already tried this ?
>
> I looked into util.xsl, but I couldn't understand how they implement a
> similar example which is documented in cocoon2's online help.
>
> Any help is greatly appreciated !
>
> Aurélien
>
>
> ---------------------------------------------------------------------
> 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]>
>
>



---------------------------------------------------------------------
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]>

Reply via email to