cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Frye <d...@greatsky.us>
Subject Re: AW: two generators in one pipeline
Date Thu, 21 Jul 2005 19:48:39 GMT
I'm a bit confused. You can't just append one XML file to another. It 
would not be a valid XML document. There can only be one root node and 
appending them together would create two root nodes. Either one has to 
include the other (using CInclude or XInclude) or both must be included 
in another xml file (it could contain just one node that would become 
the root node of the two documents). This is (in essence) what aggregate 
does. In either case you may have to write some glue XSL that converts 
it into the format needed for the existing XSL. Most likely the glue XSL 
would be pretty simple.

Stefan Pietschmann wrote:

>Thanx for the quick reply,
>
>I actually tried that out before, but I didn't write those xslt
>transformations and they are well complicated and only work with the pure
>files, not if both are aggregated. That's my problem :(
>
> 
>  
>
>>-----Ursprüngliche Nachricht-----
>>Von: Dale Frye [mailto:dale@greatsky.us]
>>Gesendet: Donnerstag, 21. Juli 2005 19:49
>>An: users@cocoon.apache.org
>>Betreff: Re: two generators in one pipeline
>>
>>How about something like this? (Please forgive spelling and missing
>>attributes.)
>>
>><map:match pattern="**/*.coc">
>>
>><map:aggretate> <!-- There are some attributes to set , I'm working from
>>memory -->
>>
>><map:part src="cocoon:/{1}/{2}.ccia"/>
>>
>><map:part src="{1}/{2}.coc"/>
>>
>></map:aggretate>
>>
>><map:transform …/>
>>
>><map:transform …/>
>>
>><map:serialize type="text"/>
>>
>></map:match>
>>
>>
>><!-- You may want to put this in a seperate pipeline that is not public --
>>    
>>
>><map:match pattern="**/*.ccia">
>>
>><!—transform and save the first file -->
>>
>><map:generate src="{1}/{2}.ccia"/>
>>
>><map:transform …/>
>>
>><map:transform type="foto" ../>
>>
>><map:serialize type="xml"/>
>>
>></map:match>
>>
>>
>>Stefan Pietschmann wrote:
>>
>>    
>>
>>>Howdy,
>>>
>>>i need your help, urgently J
>>>
>>>I need to write a matcher which processes two files. I should look
>>>something like this:
>>>
>>><map:match pattern="**/*.coc">
>>>
>>><!—transform and save the first file -->
>>>
>>><map:generate src="{1}/{2}.ccia"/>
>>>
>>><map:transform …/>
>>>
>>><map:transform type="foto" ../>
>>>
>>><!—now transform the second file which needs the first one -->
>>>
>>><map:generate src="{1}/{2}.coc"/>
>>>
>>><map:transform …/>
>>>
>>><map:transform …/>
>>>
>>><map:serialize type="text"/>
>>>
>>></map:match>
>>>
>>>Thanx,
>>>
>>>Stefan
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>


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


Mime
View raw message