cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C Bram Dit Saint Amand <scs2c...@comp.leeds.ac.uk>
Subject Re: Using built-in stylesheets tags in other built-in stylesheets
Date Thu, 17 Jul 2003 23:31:22 GMT
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