cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Woolford <stua...@newmail.net>
Subject RE: my inability to understand xsl:output?
Date Mon, 01 May 2000 22:06:37 GMT
On Tue, 02 May 2000, you wrote:
> Steven Maring <Steven.Maring@trcinc.com> wrote:
> 
> >This is a known issue with the currently released versions of Cocoon.  The
> >word on the street is that 1.7.3 will have the fix to allow the usage of
> >xsl:output to generate things like DOCTYPEs.
> >
> >-Steve M.
> 
> Although Cocoon is inflexible in what DOCTYPEs it will generate, that is not 
> the issue here. Cocoon can already do what you want, Stuart, just put in
> 
> <?cocoon-format type="text/xml" ?>
> into your XML source page after all the other PIs (not into your 
> stylesheet). This needs to be added to the docs, Stefano (i.e. the fact that 
> xsl:output will not work.)

Hmm, trying that ( in the base page, not the stylesheets) seems to make no
difference. the page still comes out exactly the same :( (I've tryied several
locations for this, and there are no other PI commands, but nothing seems to
have any effect).

The base page looks like: (please forgive any stuffed up xml in this, I'm new
at this..):

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?cocoon-format type="text/xml" ?>
<?xml-stylesheet href="xsl/genquery.xsl" type="text/xsl"?>
<!DOCTYPE main [
<!ENTITY dbconnection SYSTEM "../xmlf/connection.xmlf">
]>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<main>
    &dbconnection;
    <xsp:logic>
    String thename = request.getParameter("name");
    String thetable = request.getParameter("table");
    </xsp:logic>
    <genquery1>
    <name><xsp:expr>thename</xsp:expr></name>
    <table><xsp:expr>thetable</xsp:expr></table>
    <query connection="test" nullindicator="y">
        select * from struct where name='{@name}' and tableid='{@table}'
    </query>
    </genquery1>
</main>
</xsp:page>

This produces (for example):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
                      "http://www.w3.org/TR/REC-html40/strict.dtd">
<page>Inventory1<result><header>
    
    
    <field>One field</field><field>Another field</field>
    </header><query connection="test" null-indicator="y">
    select 
    
    
    field1, field2
     from test</query></result></page>

<!-- This page was served in 1140 milliseconds by Cocoon 1.7 -->
 -- 
------------------------------------------------------------
Stuart Woolford, stuartw@newmail.net
Unix Consultant.
Software Developer.
Supra Club of New Zealand.
------------------------------------------------------------

Mime
View raw message