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] reference man pages as both seperate files + linked into one document


On Mon, Feb 23, 2004 at 01:35:36PM -0800, Mike Cooper wrote:
> I'm trying to create a number of reference (UNIX) man pages for
> seperate commands.  I need to have these each be a standalone document
> so I can create UNIX *roff man page files (using docbook2X), but also
> I need to create a single master "Reference Guide" which includes all
> of the otherwise standalone reference docs.  What's the best way of
> doing this?

I've had a lot of success using XInclude[0] to compile master documents
from well-formed smaller documents, and it gives me a great deal of
flexibility in choosing what information I want from the component

Your case is particularly straightforward, as you don't have to do any
complex XPointer-based selection[1].  The power to do some pretty gnarly
data extraction is there, however.  It should look something like this:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY mc "<trademark>MagniComp</trademark>">
<!ENTITY si "<trademark>SysInfo</trademark>">
<!ENTITY mcsysinfohcf SYSTEM "mcsysinfohcf.sgm">

<!-- $Revision$ -->


    <title>Reference Pages</title>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";

The only potential problem with this is that it is not a core-xml only
solution; it involves XInclude processing.  Using a recent version of
libxml2, I would "expand" the XIncludes with:

  xmllint --xinclude master.xml

There are definitely other XInclude processors available[2].

The master document, as it stands, will not validate until after you do
XInclude processing (because of the introduction of the xi:include
element) unless you add a declaration for the element.  See Bob's book
for details[3].

Take care,

    John L. Clark

[0] http://www.w3.org/TR/xinclude/

[1] http://www.w3.org/TR/xptr-framework/

[2] http://www.w3.org/XML/2002/09/xinclude-implementation

[3] http://www.sagehill.net/docbookxsl/ValidXinclude.html#XincludeDTD

PGP signature

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