You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2002/11/09 03:56:59 UTC

Re: Using a parameter as source for the xml transformation

Not as parameter, but some other possibilities:

1. Sitemap aggregation
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html "Aggregating"

2. CInclude / XInclude
http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html
http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html

3. XSLT document()

I prefer them in the above order.

Regards,

Joerg

Lenis Angelos wrote:
> Hello,
> In the sitemap i have a parameter named fileList that has a value of:
> 
>     <?xml version="1.0" encoding="UTF-8"?>
> 
>     <dir:directory xmlns:dir="http://apache.org/cocoon/directory/2.0"
> name="Documents">
>         <dir:file name="doc1.txt"/>
>         <dir:file name="doc2.txt"/>
>     </dir:directory>
> 
> By using the DirectoryGenerator another xml doc is produced with a value of
> 
>     <?xml version="1.0" encoding="UTF-8"?>
> 
>     <dir:directory xmlns:dir="http://apache.org/cocoon/directory/2.0"
> name="OtherDocuments">
>         <dir:file name="file3.txt"/>
>         <dir:file name="file4.txt"/>
>     </dir:directory>
> 
> My question is how to combine the xml doc produced by the generator with
> the xsl:parameter
> as to produce xml that will look like the example below using one XSL
> stylesheet? (more generally how can
> i use xsl:parameters that have an xml value)
> 
>     <?xml version="1.0" encoding="UTF-8"?>
> 
>     <dir:directory xmlns:dir="http://apache.org/cocoon/directory/2.0"
> name="Documents">
>         <dir:file name="doc1.txt"/>
>         <dir:file name="doc2.txt"/>
>     </dir:directory>
> 
>     <dir:directory xmlns:dir="http://apache.org/cocoon/directory/2.0"
> name="OtherDocuments">
>         <dir:file name="file3.txt"/>
>         <dir:file name="file4.txt"/>
>     </dir:directory>


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