Alex,

There is a bug/feature in the XInclude transformer which assumes that unless
a base attribute is specified somewhere, the <xi:include/>'s href value is a
filename, and prepends the Cocoon install path in front of it.  This is
probably turning your "http://slashdot.org/"; into
"/usr/local/tomcat/webapps/Cocoon/http://slashdot...";.  The solution is to
add a base="http://slashdot.org"; attribute either at (I believe) or above
(for sure) the <xi:include/> element. Then just use the document portion of
the desired URL for the <xi:include/>'s href attribute
(href="/slashdot.xml").

This fixed things for me.

-Mitch



-----Original Message-----
From: Alex Kachanov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 3:42 AM
To: [EMAIL PROTECTED]
Subject: Xinclude to include 



could anyone give me a simple example on how to include xml content from
http://slashdot.org/slashdot.xml

into my xml file without using sitemap (aggregate or whatever)

cocoon2 documentation tell how to include the local file

<?xml version="1.0" encoding="UTF-8"?>
<page 
  xmlns:xi="http://www.w3.org/2001/XInclude";>
  <title>Hello</title>
  <content>
    <para>This is my first Cocoon page!</para>
    <xi:include href="include.xml" parse="text"/>
  </content>
</page>

works perfectly but


<?xml version="1.0" encoding="UTF-8"?>
<page 
  xmlns:xi="http://www.w3.org/2001/XInclude";>
  <title>Hello</title>
  <content>
    <para>This is my first Cocoon page!</para>
    <xi:include href="http://slashdot.org/slashdot.xml"; parse="text"/>
  </content>
</page>

won't work

Any clues?


with best wishes
Alexander Kachanov

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