This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] Re: refentry, man(nroff), & comments in lists


> * Bob Stayton <obof@fpb.pbz> [2003-11-08 07:50:27 -0800]:
>
> On Fri, Nov 07, 2003 at 09:58:37PM -0500, Sam Steingold wrote:
>> > * Bob Stayton <obof@fpb.pbz> [2003-11-07 10:08:26 -0800]:
>> >
>> >> is it possible to fix this bug?
>> >
>> > It is likely that the template for variablelist is explicitly
>> > selecting its children to process rather than just doing a general
>> > apply-templates. That selection probably only includes elements, not
>> > other node types like comment().  You need to find where it is
>> > selecting its content and make sure comment() is included.  It looks
>> > like it might be in the template for variablelists in html/lists.xsl.
>> 
>> you mean something like this?
>> 
>> cd d:/gnu/cygwin/usr/share/docbook-xsl/fo/
>> diff -u -b -w -i -B "d:/gnu/cygwin/usr/share/docbook-xsl/fo/lists.xsl.old" "d:/gnu/cygwin/usr/share/docbook-xsl/fo/lists.xsl"
>> --- d:/gnu/cygwin/usr/share/docbook-xsl/fo/lists.xsl.old	2003-10-03 03:22:22.001000000 -0400
>> +++ d:/gnu/cygwin/usr/share/docbook-xsl/fo/lists.xsl	2003-11-07 21:55:53.485436800 -0500
>> @@ -330,7 +330,7 @@
>>                      "{$termlength}+{$label-separation}"
>>                   provisional-label-separation="{$label-separation}"
>>                   xsl:use-attribute-sets="list.block.spacing">
>> -    <xsl:apply-templates select="varlistentry" mode="vl.as.list"/>
>> +    <xsl:apply-templates mode="vl.as.list"/>
>>    </fo:list-block>
>>  </xsl:template>
>> 
>> 
>> Diff finished at Fri Nov 07 21:55:54
>
> Actually, I was looking at html/lists.xsl, because
> manpages uses that template during processing.

well, all */lists.xml have to be fixed, right?
does the patch above do what I think it does?

>> why do the stylesheets do that at all - I mean, process only the list
>> elements, not comments &c?!
>
> Generally comments in the source don't contribute to
> the HTML or print output, so they are not processed.

So? One can keep processing instructions generic (so that no element is
blindly discarded) and have default template for comment discard them
(so that one can customize them when needed).

The model I have in mind is this:
I have a single man page source in DocBook/XML refentry form.
I want to produce platform-specific version in both XHTML and *ROFF
formats from it.
I cannot expect the user to have xsltproc, so I distribute "generic"
XHTML and *ROFF man pages with post-processing instructions in the
comments, which are used to filter out the parts irrelevant to the user
platform.
These post-processing instructions are in the comments, so it is
crucial for me that these comments are passed from the DocBook/XML
master to the XHTML and *ROFF derivatives.

>> One would have to go through all the stylesheets for all the backends...
>> Who is the templates maintainer?
>
> Which templates are you referring to?

I mean all */lists.xml, specifically xhtml, html, manpages.
I am not skilled in xsl, so I would greatly appreciate it if someone
could help me here.  I really need this fixed!

Thanks!

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Lisp suffers from being twenty or thirty years ahead of time.


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]