You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luca Morandini <l....@tin.it> on 2001/10/17 21:45:27 UTC
Yet another XInclude problem
Folks,
I'm upset by this XInclude-thing... I can't figure out what's wrong.
Ok, here's my sitemap:
<map:match name="wildcard" pattern="map.xml">
<map:generate type="serverpages" src="docs/map.xsp.xml"/>
<map:transform type="xinclude"/>
<map:serialize type="xml"/>
</map:match>
Heres the map.xsp.xsl file:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xinclude="http://www.w3c.org/2001/XML/XInclude"
>
<xinclude:include xinclude:href="context:docs/parameters.xml"
xinclude:parse="xml"/>
</xsp:page>
Here's the result:
<?xml version="1.0" encoding="UTF-8" ?>
<xinclude:include xmlns:xinclude="http://www.w3c.org/2001/XML/XInclude"
xmlns:xsp="http://apache.org/xsp"
xinclude:href="context:docs/parameters.xml" xinclude:parse="xml" />
Frustrating, isn't it ? By the way, the parameters.xsml file is in the same
directory of map.xsp.xml.
Thanks in advance,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
+39 0744 598 51 Office
+39 335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Yet another XInclude problem
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Luca Morandini a écrit :
>
> Folks,
>
> I'm upset by this XInclude-thing... I can't figure out what's wrong.
>
> Ok, here's my sitemap:
>
> <map:match name="wildcard" pattern="map.xml">
> <map:generate type="serverpages" src="docs/map.xsp.xml"/>
> <map:transform type="xinclude"/>
> <map:serialize type="xml"/>
> </map:match>
>
> Heres the map.xsp.xsl file:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
> <xsp:page
> language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xinclude="http://www.w3c.org/2001/XML/XInclude"
> >
> <xinclude:include xinclude:href="context:docs/parameters.xml"
> xinclude:parse="xml"/>
> </xsp:page>
>
> Here's the result:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <xinclude:include xmlns:xinclude="http://www.w3c.org/2001/XML/XInclude"
> xmlns:xsp="http://apache.org/xsp"
> xinclude:href="context:docs/parameters.xml" xinclude:parse="xml" />
>
> Frustrating, isn't it ? By the way, the parameters.xsml file is in the same
> directory of map.xsp.xml.
>
> Thanks in advance,
>
First of all, I'm not sure xinclude:include is allowed as the top-level
element of an XML document.
Second, if you include a whole document (no xpath selection on it), I
strongly suggest you use CInclude, which is way faster.
Hope this helps.
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>