Hi (using cocoon 2.03)
I want to transform an XML File generated by a map:read with DatabaseReader.
But It seems that I cannot use a <transform/> inside the same
<map:match></map:match> as the <map:read>. I've read that <map:read>
serializes my XML so I cannot transform it.
So I would like to use the cocoon:/ to call my <map:read> but it doesn't
work. To be clear look at these two examples:

This is OK can access
"http://localhost:8088/cocoon/borneo/formate2pdf/courrier-10.pdf"; :
 <map:pipeline>
  <map:match pattern="formate2pdf/courrier-*.xml">
   <map:read type="databasereader" src="{1}"
    mime-type="text/xml">
    <map:parameter name="table" value="courrier"/>
    <map:parameter name="key" value="id_courrier"/>
    <map:parameter name="image" value="data"/>
   </map:read>
  </map:match>
  <map:match pattern="formate2pdf/courrier-*.pdf">
   <map:generate
src="http://localhost:8088/cocoon/borneo/formate2pdf/courrier-{1}.xml"/>
   <map:transform src="xsl/BorneoLettreML.xsl"/>
   <map:serialize type="fo2pdf"/>
  </map:match>
 </map:pipeline>


This NOT OK cannot access
"http://localhost:8088/cocoon/borneo/formate2pdf/courrier-10.pdf"; :
 ( Attempted to process incomplete pipeline )

 <map:pipeline>
  <map:match pattern="formate2pdf/courrier-*.xml">
   <map:read type="databasereader" src="{1}"
    mime-type="text/xml">
    <map:parameter name="table" value="courrier"/>
    <map:parameter name="key" value="id_courrier"/>
    <map:parameter name="image" value="data"/>
   </map:read>
  </map:match>
  <map:match pattern="formate2pdf/courrier-*.pdf">
   <map:generate src="cocoon:/formate2pdf/courrier-{1}.xml"/>
   <map:transform src="xsl/BorneoLettreML.xsl"/>
   <map:serialize type="fo2pdf"/>
  </map:match>
 </map:pipeline>

Is this normal?
If yes is there a way to avoid writting my server url
"http://localhost:8088";.

Also is there a way to define my own parameters inside sitemap.
eg.
<map:user-parameters>
    <map:user-parameter name="URL1" value="http://www.toto.com"/>
</map:user-parameters>
[...]
<!-- and inside pipelines -->
<map:generate src="{URL1}/test.xml"/>

This should be usefull for very big and redundant sitemap.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to