OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Problem with xi:include of section


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="product-properties.xml" xpointer="element(/1/2/1)"/>
  <xi:include href="installation.xml" 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="ref_config_object_json.xml"
xpointer="config-obj-dashboard"
xmlns:xi="http://www.w3.org/2001/XInclude"; />
  <xi:include href="ref_config_object_json.xml" xpointer="element(/1)"
xmlns:xi="http://www.w3.org/2001/XInclude"; />


Peter

On Fri, Jun 19, 2015 at 10:47 AM, Janice Manwiller <janice@sqrrl.com> 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="ref_config_object_json.xml"
> 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='ref_config_object_json.xml'). 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='../xml/dat_sqrrl_ui_dashboard_configure.xml').
>
> 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='SqrrlDataMgmtAnalysis.xml').
>
>
> 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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]