[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
Mike, 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 documents. 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$ --> <book> <bookinfo> ... </bookinfo> <reference> <title>Reference Pages</title> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mcsysinfohcf.sgm"/> </reference> </book> 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]