[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: XInclude doesn't validate with xmllint
> On Tue, Oct 01, 2002 at 09:35:16PM -0500, John Himpel wrote: > > > > I am trying to validate two xml files using the modular document > > technique that Bob Stayton shows in www.sagehill.net. > From: Kevin.Ruscoe@ubsw.com > Hi John > > We got XInclude to work as follows: > > 1) All of our DocBook documents which use XInclude (and > that's almost all of them) start like this: > > ================================================= > <?xml version='1.0'?> > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd" > [ > <!ENTITY % xinclude PUBLIC "-//UBS//CORE//DTD XInclude V1.0//EN" "xinclude.dtd"> > %xinclude; > ] > > > > <article> > <articleinfo><title>CDL Step-By-Step Instructions</title></articleinfo> > <xi:include href="../panels/panel_home.dbk"/> > ... > > > 4) Finally, here is our XInclude DTD, culled from the spec: > ================================================= > <!-- public identifier "-//UBS//CORE//DTD XInclude V1.0//EN" --> > > <!ELEMENT xi:include (xi:fallback)> > <!ATTLIST xi:include > xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"; > href CDATA #REQUIRED > parse (xml|text) "xml" > encoding CDATA #IMPLIED > > > <!ELEMENT xi:fallback ANY> > <!ATTLIST xi:fallback > xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"; > > Well, I don't think your article will validate with just this extension to the DocBook DTD. It adds the xi:include element to the collection of elements, but it doesn't put it into any content models of the DocBook elements. In the example, the <xi:include> element is placed after the <articleinfo> element. But the <article> content model doesn't mention <xi:include>, so it won't validate. Only after the xi:include is replaced with its content will it validate. I started to extend the DocBook DTD to permit xi:include, but I think it is kind of impossible (except for maybe Norm 8^). The xi:include element can replace *any* element or group of elements, so the content models of every element would get hopelessly complex. Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC