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] xpointer problem with refentry


Donna Robinson <donna@terpsichore.ws> writes:

> Hi,
> 
> We have various xml files in the build tree, some of which have command-line 
> options listed in them.  It would be great if I could create a manpage by 
> including the various lists thus:
> 
> <refentry id="valgrind">
> ... ...
> 
> <refsect1 id="options">
> <title>Options</title>
> 
> <xi:include href="hg-manual.xml" xpointer="xpointer(id('hg-cmd-options'))"
>             xmlns:xi="http://www.w3.org/2001/XInclude"; />
> <xi:include href="cl-manual.xml" xpointer="xpointer(id('cl-cmd-options'))"
>             xmlns:xi="http://www.w3.org/2001/XInclude"; />
> ... ...
> 
> </refsect1>
> 
> However, I cannot get this to work.  If I generate the refentry as html, then 
> everything is just peachy.  But when I do this:
>   xsltproc -o ./man/ /path/to/manpages/docbook.xsl man-page.xml
> I get this:
>   No template matches xi:include in refsect1.

I don't understand how you're managing to get those Xinclude
instances to resolve when you're running your HTML transformation.
If you're using xsltproc, it seems like your build process must
either be feeding it the "--xinclude" switch when you're running
your HTML transformation, or your build must be doing some step to
resolve the Xinclude instances before it runs xsltproc.

Anyway, you should just be able to do this:

  xsltproc --xinclude /path/to/manpages/docbook.xsl man-page.xml

Please try it and let me know if it doesn't work for you.[1]

> And in the output file:
> .SH "OPTIONS"
> .PP
> This program follows the usual GNU command line syntax, with long options 
> starting with two dashes ('\-\-'). A summary of the most important options is 
> included below.
> <xi:include></xi:include>.SH "SEE ALSO"
> 
> I've tried every permutation of xpointer syntax that I can find on the web, 
> but have found no solution.

Any syntax that works when you are running our HTML transform
should work when you run the manpages transform -- as long as you
are feeding xsltproc the "--xinclude" switch or doing some kind of
preprocessing to resolve the Xinclude instances before you process
your doc instances with xsltproc.

  --Mike

[1] (By the way, the "-o ./man/" switch and argument are not going
to do anything at all for you when you are using the manpages
stylesheet. I plan on adding ability to specify output
directory(s) for the generated man pages; I even have a
user-contributed that implements it. The problem is that since
receiving that patch, I have added ability to genererate a
manifest file that records the filenames of the generated files,
so I need to get that and the output-directory ability working
correctly together, which they are not now.)

-- 
Michael Smith
http://sideshowbarker.net/

smime.p7s



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