XInclude validation problem

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

XInclude validation problem

Post by Zby »

Hi,

I have a DocBook DTD 4.4 article with XIncludes and I cannot validate it. Is anything wrong with my Oxygen 7/WinXP configuration or with my source file?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../../xinclude.mod" >
%xinclude;
]>
<article>
<title>Release Notes</title>
<section>
<title>Getting help</title>
<xi:include href="introduction.xml"
xpointer="xpointer(/preface/section[@id='getting_help']/*)"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
</article>
I get the following messages:
Description: W SchemeUnsupported: The XPointer scheme 'xpointer' is not supported.
Description: W Include operation failed, reverting to fallback. Resource error reading file as XML (href='introduction.xml'). Reason: XPointer resolution unsuccessful.
Description: F An 'include' failed, and no 'fallback' element was found.
How can I fix it?
The XPath expression is correct, I have checked it directly in introduction.xml and it returns the required elements.

Thanks,

-Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Zby,

As the error message says the xpointer scheme is not supported. This is when you validate in oXygen with Xerces (that is the default validate action). For more details see:
http://xerces.apache.org/xerces2-j/faq- ... html#faq-8
You may try to use a shorthand pointer instead, something like

<xi:include href="introduction.xml" xpointer="getting_help" xmlns:xi="http://www.w3.org/2001/XInclude" />

You also have the option to validate with other processors like LIBXML for instance which is preconfigured in oXygen and that may handle the xpointer sheme. If you decide for that then I think you need to use also XSLTProc as the XSLT processor in order to get the XInclude properly processed.

Best Regards,
George
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Well, I understand the error message. My question is what XML processor should I use to validate XIncludes with xpointer="xpointer()" scheme. That is, what XML processor (if any) supports this scheme if Xerces doesn't?

My question is a reference to Bob Stayton's book, exactly to the section on processing modular DocBook files (http://sagehill.net/docbookxsl/Xinclude.html).

Does the difficulty with the XIncludes validation mean Oxygen does not support that kind of modularization?

Thanks,

-Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

The follow up of the discussion is on the DocBook applications mailing list:
http://lists.oasis-open.org/archives/do ... 00060.html

Best Regards,
George
Post Reply