> From: Christophe Le Sa�c [mailto:[EMAIL PROTECTED]]
> 
> Hello,
> 
> I've just installed Cocoon yesterday and i read the doc. Then, i
> reproduce the greeting2 examples, that works well.
> 
> greeting2.xml
> <?xml version="1.0">
> <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core";>
>   <xsp:logic>String msg="Hello world!";</xsp:logic>
>    <greeting><xsp:expr>msg</xsp:expr></greeting>
> </xsp:page>
> 
> i modify the "sitemap.xmap" file, to add this in an existing pipeline
:
>      <map:match pattern="test/greeting.html">
>           <map:generate type="serverpages" src="test/greeting.xsp">
>           <map:serialize/>
>     </map:match>
> 
> Then, i obtain a good xml result :
> ... <greeting>Hello world!</greeting>
> 
> But, i don't know how to reproduce the "greeting3" example.
> 
> When i write <greeting><greeting:hello-world/></greeting> in an XML
file
> and then the XSL file to transform <greeting:hello-world/> to
> <xsp:expr>msg</xsp:expr>,  it  simply done
> "<greeting><xsp:expr>msg</xsp:expr></greeting>" where i expected
> <greeting>Hello world!</greeting>. the xsp process does not work.  May
> be the error comes from my sitemap.xmap, i don't know how to run XSP
> generator after a XSL transform.

Any generator (not only XSP generator) could not be run after transform
stage. Generator is always first stage.

>From your explanation, I see that you want to apply logicsheet to the
XML and process it as an XSP. That's achieved by different means than
simple XSLT transformation. Hence the different name - logichsheet, but
not stylesheet (also they have same syntax).

Logicsheets are applied by XSP generator, if they are correctly
referenced from the XSP page. Take a look at logicsheet.xsp, how it
references its logicsheet:

http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/docs/samples/xs
p/logicsheet.xsp?rev=1.3&content-type=text/vnd.viewcvs-markup

Ok, now about sitemap. Correct snippet should look like:

<map:match pattern="test/greeting.html">
  <!-- this will apply logicsheet, generate and compile serverpage,
       and execute it-->
  <map:generate type="serverpages" src="test/greeting.xml">

  <!-- any transforms you want here
  <map:transform src="test/style.xsl">
  -->

  <!-- use type="xml" for xml results -->
  <map:serialize type="xml"/>
</map:match>
 

Hope this will help you keep moving,

Regards,
Vadim


---------------------------------------------------------------------
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]>

Reply via email to