cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Nuetzel - inglobo" <peter.nuet...@inglobo.de>
Subject Re: [C2] XSP after generation?
Date Thu, 26 Apr 2001 17:49:17 GMT
I'm also curious about this. But their must be a way to do this. (perhaps
add your XSP-XSL to the <builtin-logicsheet>s in the cocoon.xconf?).
I will tell you if I know more.

- peter


-----Urspr√ľngliche Nachricht-----
Von: Sean <jakarta@wideasleep.com>
An: cocoon-users@xml.apache.org <cocoon-users@xml.apache.org>
Datum: Donnerstag, 26. April 2001 17:52
Betreff: Re: [C2] XSP after generation?


>My problem is that the first page is just an xml document, it is after
that
>that I want to apply the dynamic pieces to that page during one of the
>transformations.  I am looking to do something like this:
>
><map:match pattern="**.html">
>  <map:generate src="docs/{1}.xml"/>
>  <map:transform src="sometransformations.xsl">
>  <map:transform type="xinclude"/>
>  <map:transform type="serverpages"/>          **********
>  <map:transform src="somemoretransformations.xsl"/>
>  <map:serialize type="html"/>
></map:match>
>
>It is the ****** which I don't think or know how to do.  Taking the output
>from a transformation, applying some "dynamic" XSP against it to add
dynamic
>pieces, and then spitting that back out into the pipeline.  I have yet to
>see an example on how to do this, XSP is only ever used in the generate
>phase of the map.
>
>Any ideas?  I think I am going to have to resort to using
JSP&StrutsTomcat4
>and write a Filter to do XSLT transformations on the output before it is
>sent to the client.  This will be a significant change to my architecture
>but I cannot seem to get XSP to do what I need.
>
>Sean
>
>----- Original Message -----
>From: "Peter Nuetzel - inglobo" <peter.nuetzel@inglobo.de>
>To: <cocoon-users@xml.apache.org>
>Sent: Thursday, April 26, 2001 10:06 AM
>Subject: Re: [C2] XSP after generation?
>
>
>> Hi Sean,.
>>
>> if your source document already contains the Xinclude statement (with
>> dynamic randomizer) you can use the XIncludeTransformer to include an
XML
>> fragment:
>>
>> add the XIncludeTransformer to the transformer section in your sitemap:
>>    <map:transformer     name="xinclude"
>> src="org.apache.cocoon.transformation.XIncludeTransformer"/>
>>
>> add your example to the pipeline section in your sitemap:
>>
>>    <map:match pattern="pagewithrandomquote">
>>     <map:generate type="serverpages"
>> src="pagewithrandomxpointertoquote.xsp"/>
>>     <map:transform src="sometransformations.xsl">
>>     <map:transform type="xinclude"/>
>>     <map:transform src="somemoretransformations.xsl"/>
>>     <map:serialize type="html"/>
>>    </map:match>
>>
>>
>> hope that helps - peter
>>
>> PS:
>> if you have a recently checked out of cocoon2 you may comment out the
>> following line in the cocoon.xconf file:
>> <sax-connector
>> class="org.apache.cocoon.components.saxconnector.XIncludeSAXConnector"/>
>> (see my "XInclude trouble" email)
>>
>> you may also experience some URL resolving problems using the
>> XIncludeTransformer
>>
>>
>>
>> -----Urspr√ľngliche Nachricht-----
>> Von: Sean <jakarta@wideasleep.com>
>> An: Cocoon Users <cocoon-users@xml.apache.org>
>> Datum: Donnerstag, 26. April 2001 07:52
>> Betreff: [C2] XSP after generation?
>>
>>
>> >I am trying to use an XSP after the generation of some XML content and
am
>> >running into a lack of documentation and a whole lot of confusion.
Here
>> is
>> >what I am trying to do:
>> >
>> >1. Load some source document (xml)
>> >2. Perform a few transformations
>> >3. Load some random quote from a certain xml file and insert it into
the
>> >source document
>> >4. Perform a few transformations
>> >5. Display the output as html
>> >
>> >The optimal way to do this would be to generate some random number
after
>> the
>> >source document has been loaded, and then only load a subsection of the
>> >quote document using a xpath query with that random number that we
>> generate
>> >with something like this:
>> >
>> ><xinclude:include
>> >href="quotes.xml#xptr(quotes/quote[count(quotes/quote)*RANDOM])"/>
>> >
>> >Now comes the problem, I have been trying to implement this doing some
>> type
>> >of XSP to generate the random number but I am completely lost.  Every
>> >example I see has the XSP in the generation stage of the <map:match
where
>> as
>> >this would happen after a transformation has occured so it is a bit
>> >different.
>> >
>> >Can ANYONE point me to some examples or maybe help me with this
>particular
>> >problem?  I am trying to do basic dynamic functionality of a subsection
>of
>> a
>> >web page and it seems to be hidiously complex yet I know it cannot be
as
>> >hard as I am making it.  Please, point me to some resources I can
disect
>> to
>> >help me generate a way to do this.  I would appreciate any and all help
>> that
>> >you can give.
>> >
>> >Sean
>> >
>> >
>> >---------------------------------------------------------------------
>> >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: <cocoon-users-unsubscribe@xml.apache.org>
>> >For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>> >
>>
>>
>> ---------------------------------------------------------------------
>> 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: <cocoon-users-unsubscribe@xml.apache.org>
>> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>
>
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message