Hi,
I am trying to get the example "greeting3.xml" from
http://xml.apache.org/cocoon2/logicsheet-guide.html
to work with cocoon2.
On the page it says:
There is another way to apply a logicsheet, which doesn't require a
processing instruction for each file that uses the logicsheet. The
second way to use a logicsheet depends on whether you are using
Cocoon 1 or Cocoon 2. For Cocoon 2, take a look at the Cocoon 2 Site
The Link "Cocoon 2 Site" points to http://xml.apache.org/cocoon/cocoon2/
which doesn't exist. I suppose it's supposed to be
http://xml.apache.org/cocoon2/ but I couldn't find the way to do it
there either; nor did I find anything appropriate in the FAQ.
I see two possible solutions:
(1) remove the PIs from greeting3.xml and configure the sitemap (or
maybe cocoon.xconf) to first do the xsp-processing and then the
xslt- processing
(2) make cocoon2 behave like cocoon1, so you can just access
greeting3.xml and all the PIs will be processed. I tried
configuring this in the sitemap, but didn't succeed. [ This
isn't really the solution I want, I only tried it because I
couldn't figure out how to do (1) ]
My efforts trying it like in (1), I removed the PIs and added rules to
the sitemap.
This is what I used in sitemap.xmap to tun "greeting.xml" and it works
(all files are in test/):
<map:match pattern="test/greeting.html">
<map:generate src="test/greeting.xml"/>
<map:transform src="test/greeting.xsl"/>
<map:serialize type="html"/>
</map:match>
With this I can run "greeting2.xml":
<map:match pattern="test/greeting2.html">
<map:generate type="serverpages" src="test/greeting2.xml"/>
<map:transform src="test/greeting.xsl"/>
<map:serialize/>
</map:match>
[ But this wouldn't work until I changed
<xsp:page
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
to
<xsp:page
xmlns:xsp="http://apache.org/xsp"
>
in "greeting2.xml". Same change applied to "greeting3.xml". ]
This applies the logic-sheet on "greeting3.xml":
<map:match pattern="test/greeting3.html">
<map:generate src="test/greeting3.xml"/>
<map:transform src="test/logicsheet.greeting.xsl"/>
<map:serialize/>
</map:match>
and the resulting file contains the correct xsp code. So I'd only have
to execute the xsp code and do the final xslt, but It won't work like
this:
<map:match pattern="test/greeting3.html">
<map:generate src="test/greeting3.xml"/>
<map:transform src="test/logicsheet.greeting.xsl"/>
<map:generate type="serverpages"/>
<map:transform src="test/greeting.xsl"/>
<map:serialize/>
</map:match>
as cocoon won't run two generators.
I have no idea on how to do "greeting3.xml" with the logicsheet.
Could someone provide me with an example on how to do this in cocoon2?
Thanks in advance,
Kester.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>