cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diana Shannon <shan...@apache.org>
Subject Re: XInclude or CInclude working in Cocoon 2.0.4?
Date Fri, 14 Feb 2003 17:24:30 GMT

On Friday, February 14, 2003, at 10:04  AM, Peter Klotz wrote:

> 1. Xinclude
>
>   <xi:include href="file:/path/file.xml"/>
>
> the output is empty and cut off.
> There was a posting that one should use a attribute base="file:/path"
> because Cocoon would consider the URL relative to the application base
> directory under webapps. That is not mentioned in the docu but a good
> explanation of what one sees. BUT it doesn't work! Is xml:base 
> intended???

xinclude works for me. Here are a few snippets:

|--- file snippet (with and without xpointer) ---|
<xinclude:include href="/content/products/products-
all.xml#xpointer(//product[id='G005'])" xml:base="cocoon:"/>

- or -

<xinclude:include href="/content/products/products-all.xml" 
xml:base="cocoon:"/>

|--- sitemap snippet ---|
<map:match pattern="content/**.xml">
    <map:generate src="resources/xdocs/content/{1}.xml"/>
    <map:serialize type="xml" />
</map:match>

|--- file hierarchy ---|
- sitemap.xmap
- resources/
-- xdocs/
--- content/
---- products/

Diana


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


Mime
View raw message