nvdl and xinclude question

View: New views
2 Messages — Rating Filter:   Alert me  

nvdl and xinclude question

by Tim Arnold-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm xincluding a bibliography in my chapter. Validation (nvdl) gives me an error that a bibliography is not allowed. But when I physically replace the xinclude with the actual included file, validation passes.  Here are the details:

mybook_mychapter.xml has this structure:
<chapter xmlns="http://docbook.org/ns/docbook"
                  xmlns:xl="http://www.w3.org/1999/xlink"
                  xml:id="mybook.mychapter"
                  remap="Chapter" version="5.0">
 <info><title>my chapter</title></info>
 <section xml:id="a0000000002" remap="Headi">
   <para> lots of stuff in here</para>
</section>
 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mybook_mychapter_bib.xml"/>
</chapter>

I give this command:
java -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration -jar onvdl.jar  docbook.nvdl mybook_mychapter.xml

and get this response:
error: element "bibliography" not allowed in this context

The contents of mybook_mychapter_bib.xml is:
<bibliography>
  <title>References</title>
  <bibliomixed xml:id="kemp_o_57"/>
  <bibliomixed xml:id="falc_d_96"/>
  <bibliomixed xml:id="crow_j_70"/>
</bibliography>

When I replace the xinclude with the actual lines from the mybook_mychapter_bib.xml, the validation passes.

any ideas on what I'm doing wrong?
thanks,
--Tim Arnold

Re: nvdl and xinclude question

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
You need to put your bibliography element into the DocBook namespace.  When it is inlined, the namespace is inherited from the book element, but not when it is xincluded.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: a_jtim@...
Sent: Monday, September 14, 2009 2:48 PM
Subject: [docbook] nvdl and xinclude question

Hi,
I'm xincluding a bibliography in my chapter. Validation (nvdl) gives me an error that a bibliography is not allowed. But when I physically replace the xinclude with the actual included file, validation passes.  Here are the details:

mybook_mychapter.xml has this structure:
<chapter xmlns="http://docbook.org/ns/docbook"
                  xmlns:xl="http://www.w3.org/1999/xlink"
                  xml:id="mybook.mychapter"
                  remap="Chapter" version="5.0">
 <info><title>my chapter</title></info>
 <section xml:id="a0000000002" remap="Headi">
   <para> lots of stuff in here</para>
</section>
 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mybook_mychapter_bib.xml"/>
</chapter>

I give this command:
java -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration -jar onvdl.jar  docbook.nvdl mybook_mychapter.xml

and get this response:
error: element "bibliography" not allowed in this context

The contents of mybook_mychapter_bib.xml is:
<bibliography>
  <title>References</title>
  <bibliomixed xml:id="kemp_o_57"/>
  <bibliomixed xml:id="falc_d_96"/>
  <bibliomixed xml:id="crow_j_70"/>
</bibliography>

When I replace the xinclude with the actual lines from the mybook_mychapter_bib.xml, the validation passes.

any ideas on what I'm doing wrong?
thanks,
--Tim Arnold