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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] validating individual files in a document


Hi Joseph,
If you can put a DOCTYPE declaration at the top of the included file, then you must be using XInclude and not system entity references to assemble your document. If you are using XInclude, it is not an error to define the entities in DOCTYPES in both the main document and the included document. The rules are described in this section of my online book on DocBook XSL:

http://www.sagehill.net/docbookxsl/ModularDoc.html#XincludeTextEntities

There's also a section on managing such shared entity declarations:

http://www.sagehill.net/docbookxsl/ModularEntities.html

and lots of other tips on using XInclude.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 7/17/2016 9:25 AM, Joseph Mingrone wrote:
Hi Dave,

Thanks for your input.

I explored this option, but, unless I'm misunderstanding the documentation, I
don't think I can add an internal DTD subset to chapter.xml, because there is
already one at the top of the book.xml.  This is what I intended when I said,

I can put a DTD at the top of the file with the entities, and it will
validate, but that's clearly the wrong thing to do since the book file
already has a DTD.

I'm new with XML / DocBook, so maybe I'm misunderstanding you and the
Stackoverflow answer.

Joseph

Dave Pawson <dave.pawson@gmail.com> writes:

http://stackoverflow.com/questions/36994308/how-to-create-a-new-entity-with-relax-ng-schema-in-docbook-v5-0

Internal DTD subset.

HTH

On 17 July 2016 at 02:12, Joseph Mingrone <jrm@ftfl.ca> wrote:
Hi,

I'm working on setting up on-file-fly validation of FreeBSD documentation in
Emacs with nxml-mode.  I've configured Emacs/nmxl-mode to use FreeBSD's nearly
DocBook 5.0 compact relax NG schema.  Everything is working well, but there is
one issue that I am stumped on.  If I am working on a file (e.g. a chapter) that
is included in a main document (book) and that file uses project-specific
entities, the document will not validate.  I can put a DTD at the top of the
file with the entities, and it will validate, but that's clearly the wrong thing
to do since the book file already has a DTD.

Suggestions?

Thanks,

Joseph

------------------

Tree for FreeBSD's documentation: https://svnweb.freebsd.org/doc/

Book file:    https://svnweb.freebsd.org/doc/head/en_US.ISO8859-1/books/fdp-primer/
Chapter file: editor-config/chapter.xml, which is included in book.xml

The book is glued together with the Makefile there.  There are a few layers of
includes, which eventually pulls in the .ent files:
https://svnweb.freebsd.org/doc/head/share/xml/

The compact relax NG schema:
https://svnweb.freebsd.org/doc/head/share/xml/freebsd50.rnc?revision=43126&view=markup


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