We are doing this with XSPs to provide the XML, rather the the SQL transformer. But we 
are
actually part way through replacing all of the file-based pipelines for these 
componenets with XSP
driven database equivalents. so far, only a few problems have cropped up....
> Hi Matthew,
>
> If I understand it right, I have to change the sunrise-newrole.xml into something 
>that the sql
> transformer would understand and remove the cinclude and writesource transformer on 
>the
> pipeline?
>
> In this case...
>
> Whats the advantage of using transformer than an action?
>
> In the end of this map:match pattern it is returning an xml like this...
>
> <?xml version="1.0" encoding="UTF-8" ?>
>    - <!--  $Id: sunrise-newrole.xml,v 1.1 2002/06/03 11:45:54 cziegeler Exp $  
>Description: Add
>    a new role -->  - <addrole xmlns:source="http://apache.org/cocoon/source/1.0";
>    xmlns:session="http://cocoon.apache.org/session/1.0";> - <sourceResult>
>      <execution>success</execution>
>      <message>content inserted at: roles</message>
>      <behaviour>insert</behaviour>
>      <action>overwritten</action>
>      
><source>file:/C:/ApacheGroup/Tomcat4.1/webapps/cocoon/myportal/resources/sunrise-roles.xml</source>>
>       <serializer>xml</serializer>
>      </sourceResult>
>      </addrole>
> If I'd use an action, do I have to serialized these kinds of xml?
>
> And can you tell me where the sunrise-newrole resource is being called and returned 
>to?
>
> Thanks again.
> Richard
>
>  ----- Original Message -----
>  From: Matthew Langham
>  To: [EMAIL PROTECTED]
>  Sent: Tuesday, November 12, 2002 8:16 PM
>  Subject: RE: Cocoon Portal - User Roles
>
>
>  >>
>  Since the the "new role" function in the portal sample is mapped to <new-role
>  uri="cocoon:raw:/sunrise-newrole"/> uri, it is using this sitemap snippet right?
>
>          <map:match pattern="sunrise*">
>              <map:generate src="resources/sunrise{1}.xml"/>
>              <map:transform type="session"/>
>              <map:transform type="cinclude"/>
>              <map:transform type="write-source"/>
>              <map:transform src="styles/portal.xsl"/>
>              <map:serialize type="xml"/>
>          </map:match>
>
>  and the documentations says that
>
>  The new-role resource creates a new role in the system. It gets the parameters 
>"type" with the
>  value "role" and "role" with the new rolename.
>
>  Where is the "type" and "role" parameter?
>  and why does it have to serialized in an xml type in the end?
>  <<
>
>  You need to take a look at the file sunrise-newrole.xml. That file contains most of 
>the dirty
>  work. The transformers session, cinclude and writesource act on the information 
>contained in
>  there. Because sunrise-newrole.xml also flows through the pipeline it is then 
>formatted by the
>  stylesheet and returned to the browser. It is serialized to xml because it is being 
>used
>  inside the portal (in this case).
>
>  If you wanted to write this to a database you would need to change the 
>sunrise-newrole.xml and
>  use the sqltransformer instead of cinclude and write-source. In all this should 
>take you
>  around 5 minutes or less to adapt. :-)
>
>  So it really is quite simple really.
>
>  Matthew
>  --
>  Open Source Group       Cocoon { Consulting, Training, Projects }
>  ================================================================  Matthew Langham, 
>S&N AG,
>  Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30  [EMAIL PROTECTED] -
>  http://www.s-und-n.de 
>----------------------------------------------------------------- Cocoon
>  book:
>    http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
>  Weblog:
>    http://radio.weblogs.com/0103021/
>  ================================================================
>    -----Original Message-----
>    From: Richard Reyes [mailto:seyer_drahcir@;hotmail.com]
>    Sent: Tuesday, November 12, 2002 12:53 PM
>    To: cocoon-users
>    Subject: RE: Cocoon Portal - User Roles
>
>
>
>
>    Hi Matthew / Guys,
>
>    Just want to confirm some things....
>
>    Since the the "new role" function in the portal sample is mapped to <new-role
>    uri="cocoon:raw:/sunrise-newrole"/> uri, it is using this sitemap snippet right?
>
>            <map:match pattern="sunrise*">
>                <map:generate src="resources/sunrise{1}.xml"/>
>                <map:transform type="session"/>
>                <map:transform type="cinclude"/>
>                <map:transform type="write-source"/>
>                <map:transform src="styles/portal.xsl"/>
>                <map:serialize type="xml"/>
>            </map:match>
>
>    and the documentations says that
>
>    The new-role resource creates a new role in the system. It gets the parameters 
>"type" with
>    the value "role" and "role" with the new rolename.
>
>    Where is the "type" and "role" parameter?
>    and why does it have to serialized in an xml type in the end?
>
>    Also, for the sunrise-newrole resource, the only thing this pipeline does is save 
>a new role
>    in the xml file ( sunrise-roles.xml )? whose responsible for displaying the next 
>page after
>    saving the new role?
>
>    And since this sitemap snippet is called inside a map:pipeline internal only 
>clause I think
>    it is being called by the portal generator or action.
>
>    If in case I'd used custom actions over this pipeline, How would I know the 
>parameters that
>    have been passed and are being expected by the caller of this pipeline?
>
>    Thanks a lot
>    Richard


-- 
"The heights of genius are only measurable by the depths of stupidity."



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