The following works for me. It actually picks some information out of the session (put there by the authentication framework) and writes it out to a file called "writeTest.{sessionid}" (used for authentification in a different cocoon-independent environment). The xsl-Transformer just collects the sessionid again plus the output of the sourceWritingTransformer for further usage.

the sitemap fragment:

<map:match pattern="writePHPSession">
  <map:generate src="content/writePHPSession.xml"/>
  <map:transform type="session"/>
  <map:transform type="write-source"/>
  <map:transform src="stylesheets/writePHPSession.xsl"/>
  <map:serialize type="html"/>
</map:match>


and the writePHPSession.xml

<?xml version="1.0" ?>

  <page xmlns:session="http://apache.org/cocoon/session/1.0";>

<sessionid><session:getxml context="authentication" path="/authentication/data/sessionid"/></sessionid>

    <source:write xmlns:source="http://apache.org/cocoon/source/1.0";>

<source:source>writeTest.<session:getxml context="authentication" path="/authentication/data/sessionid"/></source:source>

<source:fragment>
<AUTHENTICATION>
<ID><session:getxml context="authentication" path="/authentication/ID"/></ID>
<ROLE><session:getxml context="authentication" path="/authentication/role"/></ROLE>
<DATA>
<BROWSER><session:getxml context="authentication" path="/authentication/data/browser"/></BROWSER>
</DATA>
</AUTHENTICATION>
</source:fragment>


    </source:write>

  </page>


Has anyone got a working example of SourceWritingTransformer? I can't
get a peep out of it.


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

-- Hobsons GmbH Wildunger Straße 6 60487 Frankfurt am Main Deutschland

Tel: +49 (69) 255 37-140
Fax: +49 (69) 255 37-159

http://www.hobsons.de
http://www.hobsons.ch

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



Reply via email to