XInclude processor implemented for cocoon

Hi guys. While perusing the latest version of the working draft for
changes, I noted that y'all weren't aware of any implementations:

http://lists.w3.org/Archives/Public/www-xml-xinclude-comments/2000Jun/0004.html

shame on me, I implemented a (partially conformant) XInclude processor in
Java for cocoon (http://xml.apache.org/cocoon/) back in early May but
never got around to letting y'all know. anyway, i just patched it to bring
it into (partial) conformance with the 2000-07-17 working draft. The
source is available both in our CVS repository and attached to this email.

A couple of thoughts on the latest working draft - in section 3.1 you
state that internal xpointer references must be resolved against the
original source document. That's not so hard to do in DOM (though
expensive if you do it merely by cloning the original document) but I
think it's going to be quite tricky to do it in SAX.

Also, you don't state (as far as I could tell) what should happen to
doctype nodes in included documents. I strip them, personally, but I
reckon that might be considered bad behavior.

Finally, I don't think you cover this case - suppose one wrote an xinclude
w/ xpointer that resolved to a set of attributes, not elements. would that
be an error or would those attributes be set on the including element:

<include xinclude:href="foo.xml#xpointer(/root/elem/@foo)" parse="xml"/>

into

<include foo="bar"/>

that's a horrendous way to include attributes, but it could be done...

- donald

Received on Monday, 24 July 2000 00:39:28 UTC