Hi Tin,

First check the XInclude namespace you're using. The correct namespace is :

  xmlns:xi="http://www.w3.org/2001/XInclude";

Once you've added an "xi:include" element, you have to process it with
another transformer (the XIncludeTransformer) because the default
XSLTTransformer can only process elements in the XSL namespace (such as
"xsl:template", "xsl:if", and so on).

This means that you must add in your pipeline a second "map:transform"
element, just after the first one :

  <map:transform type="xinclude"/>

where "xinclude" is the name of the XIncludeTransformer declared in the
map:components/map:transformers section of your sitemap :

  <map:transformer name="xinclude"
logger="sitemap.transformer.xinclude"

src="org.apache.cocoon.transformation.XIncludeTransformer"/>

Unfortunately, I don't know whether the XIncludeTransformer can use the
"cocoon:/" context.


When you have an IE error message, try to view the source of the page with
the Affichage/Source menu of your browser. It's very useful when you want to
see what has been produced.


Cheers,

Matthieu


> -----Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Envoyé : mardi 5 mars 2002 09:50
> Objet : Réf. : RE: Xinclude + cocoon pseudo protocol
>
>
>
> Sorry
>
> the problem is that the stylesheet doesn't seem to be able to
> interpret the
> xinclude command.
> here is the IE error message I get :
>
>  La page XML ne peut pas être affichée
>
>
>  Impossible d'afficher l'entrée XML en
>  utilisant la feuille de style XSL.
>  Corrigez l'erreur, puis cliquez sur le
>  bouton Actualiser ou réessayez
>  ultérieurement.
>
>
>  Un seul élément de niveau supérieur est
>  autorisé dans un document XML. Erreur de
>  traitement de la ressource
>  http://localhost:8080/ome-xinc/gogo/.
>  Ligne 6, Position 4
>
>
>
>
>
>
>   <xinclude:include xmlns:xinclude="http://w3.org/2001/XInclude"; href
> ="xincludetest/foo" base="cocoon:/"/>
> ---^
>
>
> sorry, the message is in french.
>
>
> I don't know if it is the stylesheet or if it is a bad declaration of the
> xinclude command.
>
>
> I can send a piece of my sitemap and my stylesheet.
>
>
>
>
>
> Thanks
>


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