forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Dixon <...@dixons.org>
Subject Re: xinclude
Date Fri, 08 Sep 2006 08:04:03 GMT
On Wed, 6 Sep 2006, Ross Gardler wrote:

> > This remains uncomfortable, however.  There appears to be no way to use
> > XInclude without introducing a new DTD.
>
> That is correct. You can use a DTD that allows the xi:include stuff, or
> we could add it to the XDoc DTD. I think the reason we never added it
> was because we have always intended on moving the internal format over
> to a subset of XHTML2, we would add it at this point.
>
> However, to date we have not done either.
>
> Patches to our DTDs are welcome.

I have defined a DTD which allows me to use XInclude and validate:

-------------------------------------------------------------------------
<!ENTITY % local.inline "|xi:include">
<!ENTITY % document PUBLIC
    "-//APACHE//ENTITIES Documentation V2.0//EN"
    "document-v20.dtd">
%document;

<!ATTLIST document
  xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
>
<!ELEMENT xi:include EMPTY>
<!ATTLIST xi:include
  parse     (text|xml)  "xml"
  href      CDATA       #REQUIRED
  encoding  CDATA       #IMPLIED
>
-------------------------------------------------------------------------

This works for my purposes.  I enable XInclusion by using this doctype
instead of document-v20.dtd.

If this were to be done as a patch, I suppose the patch would introduce
a new doctype V2.1, with the xi:include element moved into what would now
be document-v21.mod.  This would be added to catalog.xcat.

The exact place(s) where the xi:include element would be permitted might
be an issue to some.  I would add it to link-content.mix.

--
Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881

Mime
View raw message