Hi Matthew,
It looks like you're on the right track.
I assume
<map:match pattern="*.xls">
Will be followed with something like
<map:generate type="file" src="content/{1}.xml" />
So the wildcard is being used.
I don't know what your xml file looks like, but if it's only replacing
one lookup value for your SQL query, try using the JX Generator [1].
Your generator may look like:
<map:generate type="jx" src="content/query.xml">
<map:parameter name="record" value="{1}" />
</map:generate>
[1] http://cocoon.apache.org/2.1/userdocs/jx-generator.html
Regards,
Jasha Joachimsthal
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646
> -----Original Message-----
> From: Matthew Monkan [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 30 mei 2008 18:02
> To: [email protected]
> Subject: Database to Excel Spreadsheet
>
>
> Windows XP / Cocoon 2.1.11 / running inside Cocoon's
> build\webapp folder
>
> As an elementary user of Cocoon, I am still have trouble
> dealing with the sitemap and being confident with it. I'm
> always scared that I've messed up some syntax. My ultimate
> goal is to do some simple selects to an Oracle DB and put it
> on an Excel spreadsheet, which I feel should be really simple.
> But before I get into the XML and XSLT, I simply want to
> design the most optimal sitemap, and at the same time get a
> better concept of what's going on with it. From what I
> understand, I need the file generator, SQLTransformer, XSLT
> transformer, and HSSF Serializer. (If there is anything
> easier that I do not know, feel free to let me know.)
>
> Today I tried writing one from scratch:
>
> <?xml version="1.0"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>
> <map:components>
>
> <map:generators default="file"/>
>
> <map:transformers default="xslt">
> <map:transform type="sql">
> <map:parameter name="use-connection" value="acuworld_test">
> <map:parameter name="show-nr-of-rows" value="true">
> <map:parameter name="clob-encoding" value="UTF-8">
> </map:transform>
> </map:transformers>
>
> <map:readers default="resource" />
>
> <map:serializers default="html">
> <map:serializer
> name="xls"
> src="org.apache.cocoon.serialization.HSSFSerializer"
> locale="us" />
> </map:serializers>
>
> <map:selectors default="browser" />
>
> <map:matchers default="wildcard" />
>
> </map:components>
>
> <map:pipelines>
> <map:pipeline>
>
> <map:match pattern="*.xls">
> <map:generate type="file" src="content/MYCONTENT.xml" />
> <map:transform type="sql">
> <map:parameter name="use-connection"
> value="CONNECTIONNAME" />
> </map:transform>
> <map:transform type="xslt" src="style/MYSTYLE.xsl" />
> <map:serialize type="xls" />
> </map:match>
>
> </map:pipeline>
> </map:pipelines>
>
> </map:sitemap>
>
> Am I on the right track? I just want to have peace of mind
> with the sitemap so I'm not going back and forth between
> different files later trying to debug my little application.
>
> Any help and recommendations are appreciated. :-)
> --
> View this message in context:
> http://www.nabble.com/Database-to-Excel-Spreadsheet-tp17562564
p17562564.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]