asciidoctor / docbookrx

(An early version of) a DocBook to AsciiDoc converter written in Ruby.
MIT License
22 stars 49 forks source link

`Include file not readable` error when include file is in a subfolder #67

Open StefanD986 opened 4 years ago

StefanD986 commented 4 years ago

Given a multi-file docbook project such as the following (truncated):

.
+── Tutorials.xml
\── sections
    +── 01Preface.xml
    +── 05TutorialsIntro.xml
    +── 10General
        +── 10TutorialIntroduction.xml
    +── 10General_autoIndex.xml

Where sections/10General_autoIndex.xml is included by the root document Tutorials.xml as follows:

[...]
<xi:include href="sections/01Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="sections/05TutorialsIntro.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="sections/10General_autoIndex.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
    <index/>
</book>

and 10TutorialIntroduction.xml is included by sections/10General_autoIndex.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >
<chapter id="general">
  <title>General</title>
[...]
<xi:include href="10General/10TutorialIntroduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
[...]
</chapter>

docbookrx fails to locate sections/10General/10TutorialIntroduction.xml.

I must say I'm not an expert in DocBook, but if I read the specification correctly, then it is correct that sections/10General_autoIndex.xml uses a path relative to itself to import sections/10General/10TutorialIntroduction.xml.

So I am not sure why docbookrx fails to load sections/10General/10TutorialIntroduction.xml?

mojavelinux commented 4 years ago

Probably a bug.