Hi Sebastien

I am new to C2 but am trying to do something similar as well.
Try looking at 
http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html

I haven't used it yet - but it looks promising.

Luke



-----Original Message-----
From: Sebastian Mäder [mailto:[EMAIL PROTECTED]] 
Sent: 05 December 2001 15:58
To: [EMAIL PROTECTED]
Subject: Xinclude for Dummies

Hola,

We want to separate XML Content in different Files. Specially we have a
Menu, which is in every XML Content File. And we want this menu dynamic
change with java. 

So we want this XML Content of the menu in only one File, and insert it
into all the other XML Content Files "on the fly".

Like XSL:Include, but for XML!

Now we have it so:

Sitemap: (menu.xml, is the file, where the Content for the menu is
located)

<map:match pattern="menu.xml">
        <map:generate src="menu.xml"/>
        <map:label name="menu"/>
        <map:transform type="xinclude"/>
</map:match>

Any XML Content File:

<menu xmlns:xinclude="http://www.w3.org/1999/XML/xinclude";>
        <xinclude:include parse="xml" href="file:menu.xml" /> 
</menu>

Menu. XML File:

<?xml version="1.0" encoding="iso-8859-1"?>
        <link id="0">
                <text>News</text>
                <url></url>
                <target>_self</target>
                <status>Interssante News</status>
                <sublink id="0">
                        <text>Archive</text>
                        <url></url>
                        <target>_self</target>
                        <status>News Archive</status>
                        </sublink>
                <sublink id="1">
                        <text>Suche</text>
                        <url></url>
                        <target>_self</target>
                        <status>Suchen im Archiv</status>
                </sublink>
        </link>

With this configuration, nothing happens! 

Please Help.
We will send a rose to You :o)

Sebastian & Hendrik




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to