You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ray Martin <ra...@aci-hq.com> on 2003/02/01 01:01:30 UTC

handing an XML doc (in memory) to the sitemap

Using the SunRise instructions found at
http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
s.html

The example has a pipeline named foo-authuser
In this pipeline, i call an action named checkCredentials.  This action
accesses several tables in a database.  If a match is found, for username
and password, a vector of roles available to that user is created.  Then an
XML document is produced in the action that conforms to the Sunrise
example's authentication XML.

Now i want to hand that XML to the sitemap in place of foo-user.xml and
foo-user.xsl

Please help me.

I will be glad to share how this entire process works after i bridge this
final gap.  I will provide the action and all info how to set the database.
You would be able to modify this process to meet your data store needs.

Would anyone be so kind as to give me some assistance? please.



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: handing an XML doc (in memory) to the sitemap

Posted by Geoff Howard <co...@leverageweb.com>.
I have zero knowledge (well, very little) of the Sunrise process you're
trying to use, but it sounds like you should be able to place the
xmldocument into the session as a session attribute, and call the
SessionAttributeGenerator on it.  The javadocs are pretty good for that one.
For the xsl you may need to call it via cocoon:/ pseudo protocol from
another pipeline set up to use the same generator.  pretty sure that
protocol preserves all session info and attributes.

Be sure to let me know what happens.

By the way, I seem to recall that you are local to DC - did you notice the
DC CHUG information brewing earlier today?  Would you be interested in that
if it gets off the ground?

Geoff

> -----Original Message-----
> From: Ray Martin [mailto:raymartin@aci-hq.com]
> Sent: Friday, January 31, 2003 7:02 PM
> To: cocoon-users@xml.apache.org
> Subject: handing an XML doc (in memory) to the sitemap
>
>
> Using the SunRise instructions found at
> http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunris
> eComponent
> s.html
>
> The example has a pipeline named foo-authuser
> In this pipeline, i call an action named checkCredentials.  This action
> accesses several tables in a database.  If a match is found, for username
> and password, a vector of roles available to that user is
> created.  Then an
> XML document is produced in the action that conforms to the Sunrise
> example's authentication XML.
>
> Now i want to hand that XML to the sitemap in place of foo-user.xml and
> foo-user.xsl
>
> Please help me.
>
> I will be glad to share how this entire process works after i bridge this
> final gap.  I will provide the action and all info how to set the
> database.
> You would be able to modify this process to meet your data store needs.
>
> Would anyone be so kind as to give me some assistance? please.
>
>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: handing an XML doc (in memory) to the sitemap

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi Ray,

may I ask why you chose to write an action? The reason for my asking is that
it is difficult for an action to return anything to the pipeline - apart
from a Map. In particular (and in this case) sunRise needs an XML
representation streamed through the pipeline.

And from what I read you are "only" accessing a database - so the
SQLTransformer would do the trick easily for you.

So, one way to do this would be to write an XML file containing the SELECT
stuff. Use a stylesheet to insert userid and password and then the
SQLTransformer to do the select and then a stylesheet to format the rows to
what sunRise needs.

Matthew

--
Open Source Group       Cocoon { Consulting, Training, Projects }
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
-----------------------------------------------------------------
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
Weblogs:
  http://radio.weblogs.com/0103021/
  http://www.oreillynet.com/weblogs/author/1014
=================================================================


> -----Original Message-----
> From: Ray Martin [mailto:raymartin@aci-hq.com]
> Sent: Saturday, February 01, 2003 1:02 AM
> To: cocoon-users@xml.apache.org
> Subject: handing an XML doc (in memory) to the sitemap
>
>
> Using the SunRise instructions found at
> http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunris
> eComponent
> s.html
>
> The example has a pipeline named foo-authuser
> In this pipeline, i call an action named checkCredentials.  This action
> accesses several tables in a database.  If a match is found, for username
> and password, a vector of roles available to that user is
> created.  Then an
> XML document is produced in the action that conforms to the Sunrise
> example's authentication XML.
>
> Now i want to hand that XML to the sitemap in place of foo-user.xml and
> foo-user.xsl
>
> Please help me.
>
> I will be glad to share how this entire process works after i bridge this
> final gap.  I will provide the action and all info how to set the
> database.
> You would be able to modify this process to meet your data store needs.
>
> Would anyone be so kind as to give me some assistance? please.
>
>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>