← Prev in month
← Prev in thread
Re: [docbook-apps] reference man pages as both seperate files + linkedinto one document
Ahhh. That's just what I'm looking for. Unfortunately I'm having trouble now
with xmllint. :-(
When I run "xmllint --postvalid --xinclude RefMan.sgml" I get:
RefMan.sgml:1: parser error : Space required after the Public Identifier
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
^
RefMan.sgml:1: parser error : SystemLiteral " or ' expected
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
^
RefMan.sgml:1: parser error : SYSTEM or PUBLIC, the URI is missing
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
I've fiddled with the prolog and can't seem to see why it's complaining.
Here's RefMan.sgml now:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<!-- $Revision$ -->
<book>
<bookinfo>
<graphic fileref="../images/magnicomp-logo-6-48-white.jpg"
align='center'></graphic>
<title><trademark>SysInfo</trademark> @ProductVersion@ Reference Guide</title>
<corpname><trademark>MagniComp</trademark></corpname>
<pubdate>@PubDate@</pubdate>
<copyright>
<year>2004</year>
<holder>MagniComp</holder>
</copyright>
</bookinfo>
<reference>
<title>Reference Pages</title>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="mcsysinfohcf.sgm" />
</reference>
</book>
I tried upgrading libxml2 from 2.5.4 to 2.6.7-1, but that had no effect. I
assume I'm missing something basic since I'm pretty new to docbook.
Anyone have any suggestions?
mike
John L. Clark wrote:
> 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
← Prev in month
← Prev in thread