You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Frederic Alluin <fr...@webmedia.es> on 2000/10/04 16:39:22 UTC

how to xinclude

Hi,

I want more information than example about xinclude lib. Where can I
find it?
Regards

Fred



Re: how to xinclude

Posted by Berin Loritsch <bl...@infoplanning.com>.
Don't forget your processing instruction:

<?cocoon-process type="xinclude"?>

----- Original Message -----
From: "Frederic Alluin" <fr...@webmedia.es>
To: <co...@xml.apache.org>
Sent: Wednesday, October 04, 2000 2:54 PM
Subject: Re: how to xinclude


> 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


Re: how to xinclude

Posted by Frederic Alluin <fr...@webmedia.es>.
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


Re: how to xinclude

Posted by "Peter C. Verhage" <pe...@zeelandnet.nl>.
: 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


Re: how to xinclude

Posted by Frederic Alluin <fr...@webmedia.es>.
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
...???
Regards
Fred

Peter Verhage wrote:

> You can find it at w3.org like all other XML standards...
>
> Peter
>
> --
> Peter Verhage       <pe...@ibuildings.nl>
> ibuildings.nl BV - information technology
> http://www.ibuildings.nl -  0118 41 50 54


Re: how to xinclude

Posted by Peter Verhage <pe...@ibuildings.nl>.
You can find it at w3.org like all other XML standards...

Peter

-- 
Peter Verhage       <pe...@ibuildings.nl>
ibuildings.nl BV - information technology
http://www.ibuildings.nl -  0118 41 50 54