cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Alluin <frederic.all...@webmedia.es>
Subject Re: how to xinclude
Date Wed, 04 Oct 2000 18:54:06 GMT
ok for the users list and sorry for the noise on the dev one.

1/ It runs with the robin advice (faq). My fast and ugly code is:
<xsp:logic>
   String sPathInfo=request.getPathInfo();
   String sServer=request.getServerName();
  </xsp:logic>
  <util:include-uri>
 <util:href><xsp:expr>"http://"+<xsp:expr>sServer</xsp:expr>+"/"+<xsp:expr>sPathInfo</xsp:expr>+"/../file.to.include.xml"</xsp:expr></util:href>

  </util:include-uri>

and <?cocoon-format type="text/xml"?> in the file.to.include.xml

2/When I try to use something like :
<data xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
  <include xinclude:parse="xml" xinclude:href="file.to.include.xml"/>
</data>

the result is not my file.to.include.xml page but the same code .... ??

But I'll look for that in the users-mailing-list and the faq ;-)
Thank you very much!

Fred

"Peter C. Verhage" wrote:

> : thank you Peter,
> : may be can you help me more... I want include the result of a xsp file
> : in another xsp file. I don't know if xinclude is my solution or not
> : ...???
>
> I don't know if you are subscribed to cocoon-users@xml.apache.org, but you
> can better post questions like this to that mailinglist, because this is a
> developers mailinglist. Anyway, I had a similar question like that today,
> just on how to use XInclude... I haven't tried it yet with XSP, but I think
> it should work.
>
> Here is a little example of what I did:
> <?xml version="1.0"?>
> <?cocoon-process type="xinclude"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="test.xsl" type="text/xsl"?>
>
> <!-- Author: Peter Verhage (peter@no-nonsense.org) -->
>
> <data xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
>   <include xinclude:parse="xml"
> xinclude:href="i_want_to_include_this_page.xml"/>
> </data>
>
> This seems to work fine. I first did not use the xinclude:parse, but that
> was necessary at that time, but if you download the latest cocoon version it
> will not. Anyway it never hurts to put that overthere. If you want to know
> what everything does, just look at the Xinclude drafts at w3.org
>
> Regards
>
> Peter


Mime
View raw message