You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/05/07 08:04:34 UTC

Re: Newbie: Generating XML before rendering HTML

Its unusual to want to store a file before processing it;
perhaps you can expand more on this statement:

" I want to understand what is the content of the XML
being used , so that I can write my . xsl file correctly."

In the meantime, have a look at:
http://cocoon.apache.org/2.1/userdocs/transformers/sourcewriting-transformer.html

(and note the warning at the end!)

Derek

>>> anand.vasudevan@wipro.com 2004/05/06 07:48:31 PM >>>

Hi,

I have the sitemap.xmap configured as below.



What we are tyring to do is to get data from the database, store it
into
session and render it as HTML.



I would like to know how we can generate a  xml file to a local
directoy
before it gets rendered to the brower.

I need this , as I want to understand what is the content of the XML
being used , so that I can write my . xsl file correctly.



Would appreciate if some one can tell me how to achieve this or throw
some pointer to achieve the same.



Thanks in advance.

Have a nice day.

Regards,







<map:pipeline>

    <map:match pattern="test/*/ ">

      <map:aggregate element="page" label="page-content">

        <map:part src="cocoon:/test-contents/" />

        <map:part src="cocoon:/actions" />

        <map:part src="cocoon:/test-meta/{1}" strip-root="true" />

      </map:aggregate>

      <map:call resource="convertTo-html">

        <map:parameter name="action" value="./act" />

      </map:call>

    </map:match>





<map:match pattern="test-contents/">

      <map:generate type="session-attr">

        <map:parameter name="attr-name" value="{1}" />

        <map:parameter name="root-element" value="content" />

      </map:generate>

      <map:transform type="paginate"
src="cocoon:/test-prefs/pagination">

      </map:transform>

      <map:serialize type="xml" />

    </map:match>



<map:resource name=" convertTo-html ">

      <map:transform src="stylesheets/test-framed.xsl">

      </map:transform>

      <map:call resource="show-page" />

   </map:resource>



   <map:resource name="show-page">

     <map:act type="locale">

       <map:transform type="i18n">

         <map:parameter name="locale" value="{locale}" />

       </map:transform>

     </map:act>

     <map:transform type="abs" src="abs-config.xml" />

     <map:serialize type="xhtml" />

   </map:resource>



Confidentiality Notice

The information contained in this electronic message and any
attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or privileged information. If
you are not the intended recipient, please notify the sender at Wipro
or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org