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] Nested ordered list number not spaced properly?


The widths of the space for the number in a list are a fixed value set by 
the orderedlist.label.width stylesheet parameter, so when the number expands 
with inheritnum, there isn't room for it.  You can increase the space for a 
given list using a processing instruction like this:

<itemizedlist>
<?dbfo label-width="0.25in"?>
  <listitem>
  ...

See http://www.sagehill.net/docbookxsl/ListSpacing.html#ListHorizSpacing for 
more information.

Regarding inheritnum on the HTML side, it seems it isn't supported in the 
stylesheets.  I think that's because the HTML side uses the <ol> list 
element in the output, and it does not support nested number inheritance. 
The orderedlist and listitem templates would have to be rewritten to use 
<dl> lists with hardcoded numbers if inheritnum is used.  I would consider 
this a bug, so you could file a bug report on the SourceForge site to get it 
fixed in future releases.

Regarding the namespace warnings, those come from processing a DocBook5 
document with the stylesheets written for DocBook 4.  For the DB4 templates 
to match, the document namespace has to be stripped off.  You could instead 
use the namespace-aware version of the XSL stylesheets that are available 
from SourceForge as docbook-xsl-ns-1.73.2.  Those are the same but recognize 
the DocBook namespace and don't generate such warnings.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "John Brown" <johnbrown105@hotmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, April 01, 2008 4:32 AM
Subject: [docbook-apps] Nested ordered list number not spaced properly?


>
> Hello all,
>
> I originally poste from my Hotmail account, forgetting that Hotmail
> eliminates XML tags from messages. Please disregard that other post.
>
> I am using DocBook 5 with the DocBook XSL Stylesheets 1.73.2 and
> Apache FOP trunk.
>
> My XML file test.xml:
>
> <?xml version='1.0'?>
> <!--    <!DOCTYPE book []>    -->
> <book xmlns="http://docbook.org/ns/docbook";>
>   <info>
>   <title> My First Book </title>
>   </info>
>
>   <chapter>
>      <title> My Second Chapter</title>
>
>         <orderedlist numeration="arabic">
>            <listitem><para>Item 1</para></listitem>
>            <listitem><para>Item 2</para></listitem>
>            <listitem>
>               <para> Item 3 </para>
>                  <orderedlist numeration="arabic" inheritnum="inherit">
>                     <listitem><para> Nested item</para></listitem>
>                  </orderedlist>
>            </listitem>
>            <listitem><para>Item 4</para></listitem>
>         </orderedlist>
>
>   </chapter>
>
> </book>
>
>
> xmllint validates it. xsltproc generates the following warnings:
>
> C:\Book>xsltproc --stringparam fop1.extensions 1 --stringparam 
> double.sided 1  f
> o/docbook.xsl test.xml > test.fo
> Note: namesp. cut : stripped namespace before processing            My 
> First Boo
> k
> WARNING: cannot add @xml:base to node set root element.  Relative paths 
> may not
> work.
> Note: namesp. cut : processing stripped document                    My 
> First Boo
> k
> Making portrait pages on USletter paper (8.5inx11in)
>
> FOP generates the following warnings:
>
> C:\Book>c:\downloads\utils\fop\fop test.fo test.pdf
> Apr 1, 2008 5:53:10 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
> WARNING: Font 'Symbol,normal,700' not found. Substituting with 
> 'Symbol,normal,40
> 0'.
> Apr 1, 2008 5:53:11 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
> WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 
> 'ZapfDingba
> ts,normal,400'.
> Apr 1, 2008 5:53:11 AM 
> org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBre
> akingAlgorithm updateData2
> WARNING: Line 1 of a paragraph overflows the available area by 5000mpt. 
> (fo:bloc
> k, location: 5/11027)
>
> In the PDF, the nested list looks like this:
>
> 1. Item 1
> 2. Item 2
> 3. Item 3
>    3.1Nested item
> 4. Item 4
>
> There is no space between "3.1" and "Nested item"
>
> If I generate HTML instead, the output is:
> 1. Item 1
>
> 2. Item 2
>
> 3. Item 3
>
>         1.    Nested item
>
> Item 4
>
> The nested item does not inherit its number.
>
> I'm not so worried about the font warnings, but I have no idea what the
> xsltproc warnings or the other fop warning mean. Can someone explain?
>
> What is wrong with my nested ordered list?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



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