Hi,

I tried to set-up a very simple example (but still does not work):

In the sitemap:
--------------------
<map:pipeline internal-only="false">
 <map:match pattern="test">
   <map:generate type="file" src="documents/tutorial/test.xml"/>
   <map:transform type="xinclude" label="links content"/>
   <map:serialize type="xml"/>
   </map:match>
</map:pipeline>

The text.xml:
------------------
<?xml version="1.0" encoding="UTF-8"?>
<book>
 <example xmlns:xi="http://www.w3.org/2001/Xinclude";>
   <xi:include  href="Example_box.txt">
     <xi:fallback >
       <p>Example currently unavailable</p>
     </xi:fallback>
   </xi:include>
 </example>
</book>

The Example_box.text content:
--------------------------------------------
test

The result is :
-------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<book>
<example xmlns:xi="http://www.w3.org/2001/Xinclude";>
<xi:include href="Example_box.txt" parse="text">
<xi:fallback>
<p>Example currently unavailable</p>
</xi:fallback>
</xi:include>
</example>
</book>

(So no transformation done ?)

An the sitemap log mentions:
-----------------------------------------

[sitemap.generator.file] (/test) HttpProcessor[8080][4]/FileGenerator: Source documents/tutorial/test.xml resolved to file:/C:/Program Files/Apache Tomcat 4.0/public_html/xmlmill/documents/tutorial/test.xml

[sitemap.transformer.xinclude] (/test) HttpProcessor[8080][4]/XIncludeTransformer$XIncludePipe: setDocumentLocator called file:/C:/Program%20Files/Apache%20Tomcat%204.0/public_html/xmlmill/documents/tutorial/test.xml

[sitemap] (/test) HttpProcessor[8080][4]/ResourceLimitingPool: Put a org.apache.cocoon.generation.FileGenerator back into the pool.

[sitemap] (/test) HttpProcessor[8080][4]/ResourceLimitingPool: Put a org.apache.cocoon.transformation.XIncludeTransformer back into the pool.

[sitemap] (/test) HttpProcessor[8080][4]/ResourceLimitingPool: Put a org.apache.cocoon.serialization.XMLSerializer back into the pool.

[sitemap] (/test) HttpProcessor[8080][4]/ResourceLimitingPool: Put a org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline back into the pool.

Any help would be appreciated.


Stefan







From: "Jan Hoskens" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Re: Aggregation and XInclude ?
Date: Tue, 2 Mar 2004 10:35:19 +0100

That would be very strange as normally you would generate an xml doc and
send it down the pipeline towards your xinclude, while a transformer just
takes an xml and outputs the xml to your xinclude:

<map:generate>        =>xml 1=>          <map:transform type="xinclude">
=>xml=>

<map:transform>        =>xml 2=>          <map:transform type="xinclude">
=>xml=>

If (1) and (2) are the same xml documents, it should give the same result,
so you should check that intermediate format.

Jan

----- Original Message -----
From: "Stephen Winnall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 02, 2004 12:13 AM
Subject: Re: Aggregation and XInclude ?


> I had a similar problem with both xinclude and cinclude. I haven't had > time to > isolate the problem, but I got the impression that neither xinclude nor > cinclude > would work on the output of a transformer. I worked around the problem > by using > a transformer which performed the include by using the document() > function. > > Steve > > On 1 Mar 2004, at 23:32, Stefan Geelen wrote: > > > Hi, > > > > I aggregate some content: > > > > ... > > <map:aggregate element="page"> > > <map:part element="topnavbar" > > ns="http://www.xmlmill.com/topnavbar"; src="documents/home/menu.xml"/> > > <map:part element="mainnavbar" > > ns="http://www.xmlmill.com/mainnavbar"; src="documents/{1}/menu.xml"/> > > <map:part element="content" > > ns="http://www.xmlmill.com/content"; src="documents/{1}/{2}.xml"/> > > </map:aggregate> > > <map:transform type="xinclude" label="links content"/> > > ... > > > > The xml file referenced by the src="documents/{1}/{2}.xml"/> also > > contains an include: > > ... > > <example> > > <xi:include href="Example_box.txt"> > > <xi:fallback> > > <p>Example currently unavailable</p> > > </xi:fallback> > > </xi:include> > > </example> > > ... > > > > The problem is that the include does not work. Is it possible to > > combine and include and aggregation ? > > > > If not , what is the solution to this problem ? > > > > Regards, > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >


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


_________________________________________________________________




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



Reply via email to