cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@rennes.jouve.fr>
Subject Re: Using built-in stylesheets tags in other built-in stylesheets
Date Fri, 18 Jul 2003 07:39:24 GMT
Hi Chris !

Thanks for your answer,
I finally found an answer in the cocoon-dev list : I missed an <xsl:copy> element in
the 
template that matches all other tags :

   <xsl:template match="@*|*|text()|processing-instruction()" priority="-2">
      <xsl:copy>  <-- this one
         <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
      </xsl:copy>
   </xsl:template>


Thanks again,

--
Olivier Billard



C Bram Dit Saint Amand wrote:

> If I understood your problem correctly, you're having a few difficulties
> using cocoon-specific taglibs (like esql) inside custom logicsheets?
> 
> I've done this quite easily, I just had to add the needed 'imports' (i.e.
> xmlns:WHATEVER) at the opening <xsl:stylesheet> tag of the custom
> logicsheet.
> 
> 
> Sample code from a custom logicsheet named 'chris-perso':
> ----
> <?xml version="1.0"?>
> 
> <xsl:stylesheet
>   xmlns:chris-perso="http://www.prs-ltsn.leeds.ac.uk/chris-perso"
>   xmlns:sql="http://www.prs-ltsn.leeds.ac.uk/sql"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:xsp="http://apache.org/xsp"
>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>   xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>   xmlns:xsp-session="http://apache.org/xsp/session/2.0"
>   create-session="true"
>   version="1.0">
> 
> 
>     <xsl:template match="chris-perso:last-viewed-docs">
> 
>     <!-- The following tag is another custom logicsheet, the name is quite
> badly chosen though... -->
>         <sql:generic-query>
> 
> 
>             <esql:query>SELECT DISTINCT C.AccessedRelativeURL,
> C.AccessDateTime, U.Reference FROM Connections C, UrlReference U WHERE
> C.AccessedRelativeURL = U.RelativeURL AND C.SessionID =
> '<xsp-session:get-id/>' ORDER BY C.AccessDateTime DESC;</esql:query>
>             <esql:results>
>               <rowset-last-viewed-docs>
>                 <esql:row-results>
>                   <row-last-viewed-docs>
>                     <esql:get-columns/>
>             	  </row-last-viewed-docs>
>                 </esql:row-results>
>               </rowset-last-viewed-docs>
>             </esql:results>
>         </sql:generic-query>
>     </xsl:template>
> 
> </xsl:stylesheet>
> ----
> 
> 
> I hope it helps...
> 
> 
> /Chris


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


Mime
View raw message