[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Is <part> all-or-nothing? (XInclude problem?)
Hi Larry, That sounds like a bug in Xerces that I reported some time ago on Xerces Jira and was already fixed in CVS, see: http://issues.apache.org/jira/browse/XERCESJ-1062 Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Larry Garfield wrote: > Here's a weird one. :-) > > I have a book I'm putting together where each chapter/article is a separate > file referenced via XIncludes. No sweat, right? The following for the > book.xml file works just fine: > > <book id="charters"> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="preface.xml" /> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmd.xml" /> > </book> > > However, if I try to add <part> elements then it fails: > > <book id="charters"> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="preface.xml" /> > <part> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmd.xml" /> > </part> > </book> > > (It fails regardless of whether or not I specify a title element for the > part.) > > However, if I put BOTH XIncludes inside part elements (the same or different), > then it works fine again: > > <book id="charters"> > <part> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="preface.xml" /> > </part> > <part> > <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmd.xml" /> > </part> > </book> > > The error I'm getting is the most confusing part: > > Error reported by XML parser: Elements from namespace > 'http://www.w3.org/2001/XInclude', other than 'fallback', are not allowed to > be children of 'include' elements. However, 'include' was found. > > What does the number of part elements have to do with XInclude, and why is it > claiming I have an include element inside an include element when I clearly > don't? Neither of the included files have any XIncludes of their own, so > that's not the problem. > > Can you not have chapters or articles that are not part of a <part> if you use > <part> at all? That seems to be what is happening, but it doesn't look like > that's the case according to the spec. It also wouldn't make sense, as a > preface (I am using a <preface> element in preface.xml) isn't really a part > of a <part>. It's a preface. > > Can anyone shed some light on what's happening here? >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]