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 [EMAIL PROTECTED]
> Lead Developer Java, XML, MacOS X, XP, etc.
> ADOLOS <http://www.adolos.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]