cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <>
Subject [C2] serverpages doesn't like auto-generated xsp?
Date Fri, 20 Jul 2001 17:22:36 GMT
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 

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 

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">
           <map:parameter name="id" value="{table}" />
       <map:serialize type="xml" />

	<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:serialize type="xml" />

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 Roebuck                        
Lead Developer                               Java, XML, MacOS X, XP, etc.
ADOLOS                                           <>

To unsubscribe, e-mail:
For additional commands, email:

View raw message