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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: How to Xinclude an Introduction in a chapter (ie, no <section>)?


My Bad -

I should have mentioned the errors I am getting. Below ch03.xml is the
chapter, and ch03a.xml is the introduction. ch03b.xml, ... ch03e.xml
wraps everything in a customary <section></section> and validates
fine.

$ xsltproc -V
Using libxml 20706, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20706, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20706
libexslt 815 was compiled against libxml 20706
$ uname -a
Linux studio 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC
2012 x86_64 GNU/Linux

Jeff

$ ./make-book.sh ch03.xml:4: element chapter: validity error : Element
chapter content does not follow the DTD, expecting (beginpage? ,
chapterinfo? , (title , subtitle? , titleabbrev?) , (toc | lot | index
| glossary | bibliography)* , tocchap? , (((calloutlist | glosslist |
bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist |
variablelist | caution | important | note | tip | warning |
literallayout | programlisting | programlistingco | screen | screenco
| screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis |
fieldsynopsis | constructorsynopsis | destructorsynopsis |
methodsynopsis | formalpara | para | simpara | address | blockquote |
graphic | graphicco | mediaobject | mediaobjectco | informalequation |
informalexample | informalfigure | informaltable | equation | example
| figure | table | msgset | procedure | sidebar | qandaset | task |
anchor | bridgehead | remark | highlights | abstract | authorblurb |
epigraph | indexterm | beginpage)+ , (sect1* | refentry* | simplesect*
| section*)) | sect1+ | refentry+ | simplesect+ | section+) , (toc |
lot | index | glossary | bibliography)*), got (title simplesect
section section section section )
ch03a.xml:4: element simplesect: validity error : Element simplesect
content does not follow the DTD, expecting ((title , subtitle? ,
titleabbrev?) , (calloutlist | glosslist | bibliolist | itemizedlist |
orderedlist | segmentedlist | simplelist | variablelist | caution |
important | note | tip | warning | literallayout | programlisting |
programlistingco | screen | screenco | screenshot | synopsis |
cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis |
constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara
| para | simpara | address | blockquote | graphic | graphicco |
mediaobject | mediaobjectco | informalequation | informalexample |
informalfigure | informaltable | equation | example | figure | table |
msgset | procedure | sidebar | qandaset | task | anchor | bridgehead |
remark | highlights | abstract | authorblurb | epigraph | indexterm |
beginpage)+), got (simplesect para para para indexterm indexterm note
)
ch03a.xml:5: element simplesect: validity error : Element simplesect
content does not follow the DTD, expecting ((title , subtitle? ,
titleabbrev?) , (calloutlist | glosslist | bibliolist | itemizedlist |
orderedlist | segmentedlist | simplelist | variablelist | caution |
important | note | tip | warning | literallayout | programlisting |
programlistingco | screen | screenco | screenshot | synopsis |
cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis |
constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara
| para | simpara | address | blockquote | graphic | graphicco |
mediaobject | mediaobjectco | informalequation | informalexample |
informalfigure | informaltable | equation | example | figure | table |
msgset | procedure | sidebar | qandaset | task | anchor | bridgehead |
remark | highlights | abstract | authorblurb | epigraph | indexterm |
beginpage)+), got (indexterm indexterm indexterm indexterm indexterm )
Document book.xml does not validate

On Sat, Jan 28, 2012 at 9:54 PM, Jeffrey Walton <noloader@gmail.com> wrote:
> Hi All,
>
> I have a *really* long chapter. I thought I would break it down so
> that the chapter had a bunch of xinclude's with the following
> structure:
>
> $ cat test.xml
> <?xml version="1.0" encoding="US-ASCII"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
>
> <book>
> <chapter id="ch_test">
>  <title>Chapter Test</title>
>  <xi:include href="test-intro.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
>  <xi:include href="test-section.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>  ....
> </chapter>
> </book>
>
> $ cat test-intro.xml
> <?xml version="1.0" encoding="US-ASCII"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
> <simplesect>
>  <indexterm>
>   <primary>Foo</primary>
>  </indexterm>
>
>  <para>Foo is mildly discussed in this introduction.</para>
> </simplesect>
>
> The problem I am having is: (1) the introduction is *not* a section -
> it starts of with <indexterm> and then <para>; and (2) it won't
> validate. I also tried wrapping the introduction in <simplesect>, but
> no joy. I've attached a simple test case (xmllint-test.zip).
>
> How does on xinclude free form text which is part of <para> (but has
> no corresponding <section>)?
>
> My apologies if the attachment is not appropriate.
> http://www.docbook.org/guidelines did not appear to ban simple test
> cases.


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