This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Multiple .xsp?




I am trying to create a ( what I thought was fairly simple ) database
access using Cocoon 1.8.2 and XSP.  My database contains multiple tables
holding employee information, phone numbers, pager numbers, etc.  At
the moment, all I'm trying to do is create a table listing the employee
entries, along with their associated data ( pager, phone, etc ).

My problem occurs when I try to pull the data out of the DB.  I can
get the rows out using one query in my XSP.  Unfortunately, I can't
seem to use the information pulled from that query in a separate template
( in the same file ), to run a second query.  I could probably nest
the queries, but I *really* want to avoid that ( harder to read, not
as reusable, etc ).

My second attempt was to pull all the employee rows out of the database,
then send that information to a second XSP.  Unfortunately, I can not
seem to make Cocoon process/compile that second sheet consistently. 
Sometimes it recompiles, sometimes it doesn't.  I have tried every
combination of pi's that I could think of.  Currently, I have this in
the first XSP:

<?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:esql="http://apache.org/cocoon/SQL/v2";
>

  <xsl:template match="page">

    <xsl:processing-instruction name="cocoon-process">type="xsp"</xsl:processing-instruction>
    <xsl:processing-instruction name="cocoon-process">type="xsp"</xsl:processing-instruction>
    <xsl:processing-instruction name="xml-logicsheet">href="test-sql2.xsl" type="text/xsl"</xsl:processing-instruction>

    <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core";
                              xmlns:esql="http://apache.org/cocoon/SQL/v2";>

      
      <xsl:copy>
        <xsl:apply-templates/>
      </xsl:copy>

    </xsp:page>
  </xsl:template>

 
 

Can anyone tell me how to get Cocoon to reliably process the second
XSP ( test-sql2.xsl )?  Does anyone have a better way to do this?
I can provide more info on the DB Schema, or the other XSP/XML files,
if needed.

tnx
-m


======================================================================
Matt Sabourin				Voice: 313.845.2529
Systems Engineer			Fax:   313.317.6060
Structural Dynamics Research Corp. 	Pager: 313.201.7741
1555 Fairlane Dr., Suite 300		Email: Matt.Sabourin@sdrc.com
Allen Park, MI 48101			

AlphaPage: matt.sabourin@myairmail.com
AlphaPage: http://www.myairmail.com
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]