cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Applying custom style sheets before logicsheets [HELP!]
Date Sat, 15 Dec 2001 20:34:37 GMT

This question may seem very simple, but bear with me as I am quite new to cocoon.

I am using Cocoon 2.  I have an XSP page [testdb.xsp], and want to pass this through a stylesheet
[testdb.xsl], then apply the built-in cocoon 2 logic sheets [particularly the esql], apply
a xml to html stylesheet and then serialize as html.  What do I have to do to make this work?

I have started by placing using esql from the testdb.xsp directly - this works as expected.
 Trouble is, I want the SQL queries to be "generated" by the testdb.xsl stylesheet, so removing
the esql from testdb.xsp and making the testdb.xsl generate them instead does not "execute"
them - they stay as <esql:...> even in the outputted html.

I have tried many things, such as adding/removing the esql namespace from the start of the
original xsp document, the xsp generated from testdb.xsl, etc, the files below are what are
"known" to not work.  I think it is just something very simple that I am missing...

Here is the relevant part of the sitemap:
   <map:match pattern="testdb">
     <map:generate type="serverpages" src="testdb.xsp"/>
     <map:transform src="testdb.xsl"/> 
     <map:transform src="table.xsl"/> 
     <map:transform src="stylesheets/dynamic-page2html.xsl"/> 

<?xml version="1.0" encoding="ISO-8859-1"?>


<xsl:template match="/">

  <xsl:template match="data-display">
        <xsl:apply-templates select="query"/>
        <xsl:apply-templates select="display"/>

  <xsl:template match="query">
	  <xsl:value-of select="."/>

  <xsl:template match="display">

  <xsl:template match="display-table">
        <xsl:for-each select="column">
	      <xsl:value-of select="title"/>

      <!-- header finished, now the data -->

            <xsl:for-each select="column">
	        <!-- make a reference to the action here -->
                  <xsl:value-of select="action/@name"/> <xsl:value-of select="action/@key"/>
                  <xsl:value-of select="data/@source"/>
		  <xsl:value-of select="text"/>

  <xsl:template match="@*|node()" priority="-1">
      <xsl:apply-templates select="@*|node()"/>


<?xml version="1.0"?>

<xsp:page language="java"

      <query>SELECT uid, userid, password FROM users</query>
	    <data source="userid"/>
	    <action name="view" key="uid"/>
	    <data source="password"/>
	    <action name="delete" key="uid"/>

thanks for any help,

Never pay another Internet phone bill!
Freeserve AnyTime, for all the Internet access you want, day and night, only £12.99 per month.
Sign-up at

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message