0

Pretty simple xml file with:

<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                      "../../../../tools/docbook-dtd-4.4b2/docbookx.dtd"
[
<!ENTITY % vers   SYSTEM "../../../../doc_developer/version.xml">
%vers;
]>

<book>

  <bookinfo>
    <title>SuperDuper Product Test High-Level Requirements</title>
    <subtitle>Release &superduper_prod_dot_version;</subtitle>
    <pubdate>&superduper_prod_date;</pubdate>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../../../doc_developer/copyright/copyright.xml" />
  </bookinfo>

  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="high_level_requirements_intro.xml" />
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reqs_refs_docbook.xml" />
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="high_level_requirements_context.xml" />
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reqs_content_docbook.xml" />
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="high_level_requirements_guidelines.xml" />

</book>

Emacs (or nxml?) selects

<uri resource="high_level_requirements.xml" uri="../../../../../../../../../../Program Files/Emacs/emacs-24.3/etc/schema/docbook.rnc"/>

as the schema; attempts to use "XML" -> "Set Schema" -> "File..." to the cited docbookx.dtd fail ("No schema loader available for file extenson 'dtd'") M-x rng-set-vacuous-schema finds the xi:include acceptable. The cited version.xml defines the superduper_prod_dot_version and superduper_prod_date (xlst generates an html file with no problems from this file; fop is unhappy.)

  • It was very long time ago, but if memory serves, you needn't set up the schema location in any special way: having the path in doctype should already do it. However, I think that nxml doesn't use DTD schemas any more, it has to be RNG. There used to be another XML mode for Emacs which did though... psgml-mode maybe? – wvxvw Dec 8 '15 at 22:55
  • Thank you, wvxvw. I ended up finding small errors in other locations and my documents now compile properly. The xi:include tags still are unknown to emacs, but knowing that that is not the problem allows me to move on. – Donald Locker Dec 9 '15 at 12:09
1

I found some excellent documentation at New Mexico Tech's nxml mode help page, describing specifically how emacs locates the schema that it uses and describing the content of the schemas.xml file. The xi:include was apparently not the real problem that I was facing; the real problems were definitions in included files which did not have content, just plain text. All is well now.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.