cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SETIssl <s...@hlsw.org>
Subject Re: request parameter from sax stream/xml file to sitemap
Date Tue, 22 May 2007 08:37:25 GMT
"What makes this case really complicated is that you have a
two-step-processing of pipeline content. It would be much easier if you
could determine the norm_id directly"

Hm, thought this was, was actions are used for, among other things.
The Pipeline gets called from an HTML-Href-Link inside of an generated  
html-file:

<xsl:attribute name="href">dokumente/anzeigen/pdf/<xsl:value-of  
select="document-type"/>/<xsl:value-of select="userlogin"/>/<xsl:value-of  
select="document-name"/>?realpath=<xsl:value-of  
select="realpath"/></xsl:attribute>
	
<!-- Pipeline zur Anzeige von Dokumenten in PDF -->
     <!-- {1}=doctype; {2}=login; {3}=docname;-->
     <map:pipeline>
       <map:match pattern="dokumente/anzeigen/pdf/*/*/*">
         <map:select type="resource-exists">
           <map:when  
test="{request-param:realpath}/letterman/userfiles/{2}/docs/{3}.xml">
             <map:generate src="userfiles/{2}/docs/{3}.xml" type="file"/>
               ...

So, when i got the "docname" {3} in the pipeline, would it be so hard to  
insert a database select action there
and request the current norm_id for this document and use the response as  
a parameter for further select-operations?

Problem is, i'm not familiar with the hole flowscript-programming
and i wouldn't like to mix up the Sitemap/Pipeline with the old  
standard-elements
und the new flowscript-system, as it is an old programm which just
should be updated and expanded a little.


Am 29.04.2007, 12:31 Uhr, schrieb Joerg Heinicke <joerg.heinicke@gmx.de>:

> On 23.04.2007 17:27, SETIssl wrote:
>
>> I tried to implement a DatabaseSelectAction like its described in the  
>> docs and the api, but couldn't find any details or any kind of example  
>> on how the request/the sitemap pipeline action part actually should  
>> look like.
>
>  From rereading the thread I get your case is more complex. The actions  
> might not work or really complicate your sitemap a lot. I'd go with flow  
> script.
>
> To clarify let me rephrase your steps:
> 1. Get a document from the document system. (How is determined which  
> document?)
> 2. Parse it for whatever to retrieve norm_id with that information from  
> the database.
> 3. Switch pipeline depending on this norm_id.
>
> What makes this case really complicated is that you have a  
> two-step-processing of pipeline content. It would be much easier if you  
> could determine the norm_id directly from the "How is determined which  
> document?"-parameters without parsing pipeline content. Is that an  
> option?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message