cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Studley <Luke.Stud...@cerillion.com>
Subject RE: Xinclude for Dummies
Date Wed, 05 Dec 2001 16:19:32 GMT
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:maeder@fh-brandenburg.de] 
Sent: 05 December 2001 15:58
To: cocoon-users@xml.apache.org
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

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


Mime
View raw message