You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jason Harrop <jh...@bigpond.net.au> on 2000/06/06 04:50:35 UTC

Re: XInclude

i note that Donald Ball has implemented an XInclude processor as part of
the Cocoon project (see below for one of the many postings on the Cocoon
list which relate to XInclude).

I'm not at all familiar with Cocoon as i don't use it, but it seems to
me that Donald's code could form the basis of an XInclude implementation
for people who want to use XInclude in conjunction with Xerces.

My questions are:
1.  Could Donald's code form the basis of an implementation
2.  Is there demand for XInclude as part of Xerces (from my reading of
the XInclude working draft and the Mulberry XSLT list, it seems it will
assume some prominence)
3.  How would XInclude sit, architecturally speaking?  (Cocoon treats it
as a processing instruction;  see yet another quotation below for food
for thought here)

thanks, 

Jason


Arnaud Le Hors wrote:
> 
> The first Working Draft of XInclude has been published:
> 
> The document is at:
>         http://www.w3.org/TR/2000/WD-xinclude-20000322
> 
> Latest version:
>         http://www.w3.org/TR/xinclude
> 
> Due to lack of resources we do not plan to implement it for now. If
> anyone feels like doing it, contributions would be welcome!
> Thanks.
> --
> Arnaud  Le Hors - IBM Cupertino, XML Technology Group

> On Thu, 1 Jun 2000, Darren Scott wrote:
> 
> > Guys,
> > 
> > Can somebody please point me towards documentation for using xinclude
> > with cocoon - or just give me a quick example of how to tell cocoon how
> > to process xinclude tags.
> > 
> > I can't see where it is implemented and who by - is it a seperate
> > download?
> 
> Nope, part of cocoon. I think you'll want the version from CVS as the
> latest release had a big ol' bug or two. Just add this line to your
> cocoon.properties file (if it's not already there):
> 
> processor.type.xinclude=org.apache.cocoon.processor.xinclude.XIncludeProcessor
> 
> add this PI to your document:
> 
> <?cocoon-process type="xinclude"?>
> 
> and add xinclude elements to your document. full reference is:
> 
> http://www.w3.org/TR/xinclude
> 
> little samples are in samples/xinclude in cocoon. Feedfack would be great.
> There are some aspects of xinclude that this won't cover properly (no
> cdata, no circular inclusion checking) and i'm not sure about namespace
> declaration inclusion for document fragments. That's where you come in. :)
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

> From: 
>          Uli Mayring <ul...@denic.de>
>                                                                                                    05/26/00 06:54
> 
>  Subject: 
>          XInclude Processor and cocoon food chain
>      To: 
>          cocoon-users@xml.apache.org
> 
> 
> 
> 
> Hiho,
> 
> as I wrote in an earlier message I am trying to write a taglib that uses
> the XInclude processor internally. (I want to use it to read in parts of
> another XML file).
> 
> While playing a bit with the cocoon sources I found that I don't actually
> understand the internal processing model. But it appears to me that
> instantiating my own XInclude processor is not how things are supposed to
> be done. Processors are "at the top" of the food chain, whereas taglibs
> are more towards the bottom. After all, they get executed by a processor,
> the XSP processor. It seems questionable to me to invoke a processor from
> a taglib, just because the processor contains some useful code, that I
> would need in the taglib as well.
> 
> Please, if I've misrepresented anything, correct me. Anyhow, what I want
> to ask is:
> 
> a) Why is the XInclude thing a processor and not a taglib?
> 
> b) I know I have access to the document object within an XSP page. But in
> what state is this document object? I guess it is a parsed DOM tree, but
> how did it get there? Which stages of the cocoon processing chain have
> already been completed, once I get the document in the XSP page? For
> example, I tried to put a <xinclude:include...> statement before my own
> tag, but the document object I received in my taglib still contained that
> xinclude statement (and not the XML code it pointed to), although I put
> the XInclude pi first in my XML file.
> 
> c) How do I actually use the XIncludeProcessor class? Do I have to call
> the init() method? If yes, where do I get the Director from that this
> method requires as input?
> 
> d) Why does the XIncludeProcessor class receive the current document as
> input? I expected that it needs the actual Xinclude statement that it is
> supposed to resolve, but not the whole document?
> 
> Ok, these questions are probably outrageously stupid. This is the first
> time I actually hack cocoon directly. Of course, if anything usable comes
> out of it, I'll contribute it. But at this point I doubt it. On the other
> hand when I started out with cocoon and XML I also doubted it would be
> useful ;-)
> 
> Ulrich
>