Next in thread →
Next in month →
Re: [docbook-apps] Problem with xi:include of section
I was already using xi:include to include full files - this was the first time I tried using xi:include with the xpointer. Enabling the "advanced xi:include settings" for docbkx worked - thanks so much! Janice On Fri, Jun 19, 2015 at 11:13 AM, Peter Desjardins <> wrote: Is this your first attempt to use xi:include? If so, you'll need to make sure that the XSLT processor and XML parser that you're using support the xpointer scheme. Your editor may be able to handle more advanced xi:include syntax than your publishing tools. The "Reason: XPointer resolution unsuccessful" suggests this problem to me. I'm using Saxon and Xerces and this type of xi:include works for me (in my editor and also my publishing tool chain): <xi:include href="" xpointer="element(/1/2/1)"/> <xi:include href="" xpointer="element(/1)"/> My quick look at the Docbkx Maven project did not reveal which processor and parser it uses. But I did notice that there's an "advanced XInclude mode." Did you enable that? Try replacing the xml:id of the included element with an xpointer="element(/1/2/1)" reference. It will be a pain to maintain the reference that way, unless you're including the top level element of a file. I keep many separate XML files with top level section elements for this reason. <xi:include href=""> xpointer="config-obj-dashboard" xmlns:xi="http://www.w3.org/2001/XInclude" /> <xi:include href="" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> Peter On Fri, Jun 19, 2015 at 10:47 AM, Janice Manwiller <> wrote: > I'm trying to include a section from one document into another document. > > In the source file, the xi:include is: > > <xi:include href=""> > xpointer="config-obj-dashboard" xmlns:xi="http://www.w3.org/2001/XInclude" > /> > > This resolves correctly in the XML editor. > > When I try to build the document (we use the Docbkx Maven plugin), the build > fails, with the following error: > > org.xml.sax.SAXParseException; systemId: > file:///Users/janicem/Documents/sqrrl/doc/src/xml/dat_sqrrl_ui_dashboard_configure.xml; > lineNumber: 192; columnNumber: 128; Include operation failed, reverting to > fallback. Resource error reading file as XML > (href="" Reason: XPointer resolution > unsuccessful. > > Error on line 192 column 128 of > file:///Users/janicem/Documents/sqrrl/doc/src/xml/dat_sqrrl_ui_dashboard_configure.xml: > > Error reported by XML parser: An 'include' failed, and no 'fallback' element > was found. > > Error on line 62 column 90 of > file:///Users/janicem/Documents/sqrrl/doc/src/docbkx/SqrrlDataMgmtAnalysis.xml: > > Error reported by XML parser: Error attempting to parse XML file > (href=""> > > Error on line 174 column 68 of > file:///Users/janicem/Documents/sqrrl/doc/src/docbkx/SqrrlGuides.xml: > > Error reported by XML parser: Error attempting to parse XML file > (href=""> > > > After looking at the DocBook docs, I tried adding a DOCTYPE entry with the > DTD, but that didn't work either. > > So is this xpointer syntax just not supported in this case? Or am I just > missing some other setting? > > Thanks, > > Janice -- Janice Manwiller Principal Technical Writer Sqrrl Data, Inc. www.sqrrl.com | @SqrrlData
Next in thread →
Next in month →