cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2] serverpages doesn't like auto-generated xsp?
Date Sat, 21 Jul 2001 08:40:09 GMT
On Fri, 20 Jul 2001, Stuart Roebuck wrote:

> I've been trying to produce a sitemap where the XSP for serverpages is
> generated by an XSLT transformer on an XML input file.  I want to generate
> an ESQL query tailored to the fields of a number of different database
> tables.
>
> In other words, if you request "select-test.xml" it should return the
> content of the 'test' table, by generating ESQL to query the database
> (obtained from 'select-test.xsp') and processing it with the serverpages
> generator.
>
> Here's a mock up of the code:
>
>      <map:match pattern="select-*.xml">
>        <map:act type="request">
>          <map:parameter name="parameters" value="true" />
>          <map:generate type="serverpages" src="cocoon:/select-{1}.xsp">

Should this be:

       <map:generate type="serverpages" src="cocoon:/select-{../1}.xsp">

to reference the matchers match?

Giacomo

>            <map:parameter name="id" value="{table}" />
>          </map:generate>
>        </map:act>
>        <map:serialize type="xml" />
>      </map:match>
>
> 	<map:match pattern="select-*.xsp">
> 	  <map:generate src="data/database_descriptions.xml" />
> 	  <map:transform src="transform/create_select_xsp.xslt">
> 	    <map:parameter name="table" value="{1}" />
>        </map:transform>
>        <map:serialize type="xml" />
>      </map:match>
>
> I tried this out and the XSLT appeared to generate the correct XSP, but
> the result of the "select-text.xml" request was incorrect.  If I took the
> result of a request for "select-test.xsp" and saved it to a file, then
> changed the first match to take the fixed file as the serverpages source,
> everything worked fine.  I can only imagine that the problem lies in the
> passing of the SAX stream between the components.  Could the "cocoon:/"
> protocol be loosing or getting confused by namespaces?
>
> Stuart.
>
> -------------------------------------------------------------------------
> Stuart Roebuck                                  stuart.roebuck@adolos.com
> Lead Developer                               Java, XML, MacOS X, XP, etc.
> ADOLOS                                           <http://www.adolos.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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


Mime
View raw message