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] XInclude, chapter headers & changing font size in <appendix>


On Wed, Oct 22, 2003 at 06:28:55AM -0700, Alex L wrote:
> (Apologies if you get multiple copies of this message, I had to
> resubscribe to the list and resend the message).
> 
> Hi folks,
> 
> Long time, no post.  I have three separate questions for the list (I
> checked all various FAQs, mailing list archives etc, and couldn't find
> much on these issues):
> 
> 1. Is it possible to XInclude a fragment (using xpointer) from your
>    current document, or is that considered illegal in XInclude syntax,
>    I couldn't easily tell from the spec, e.g. if my document is
>    called bar.xml:
> 
>   <para id="foo">Blah blah</para>
>   <xi:include href="bar.xml#xpointer(//para[id='foo'])"/>
>   <para>Rhubarb, rhubarb</para>
> 
>    I guessing it's invalid (xsltproc says "recursion detected"), but I
>    just want to make sure it's not something in the way I'm trying to
>    do this.  Any other workarounds welcome.  I'm trying to avoid
>    having to create an entirely separate document with the
>    common/repeated text, it would be nice to simply reuse paras from a
>    previous part of the document.

Daniel answered this one.
   
> 2. I can see how to customize the XSL-FO stylesheets so that I get
>    running chapter headers with numbers as I do for titlepages. e.g. I
>    have a document like:
> 
>  <chapter>
>    <title>FooBar is frobnicatious</title><titleabbrev>FooBar</titleabbrev>
> 
>    and I can get to the running header to appear as either
> 
>   "Chapter 1: FooBar is frobnicatious", 
>   "FooBar", but not
>   "Chapter 1: FooBar"
> 
>    I did this using Bob's excellent book (which I'm ordering real
>    soon), here: http://www.sagehill.net/docbookxsl/PrintHeaders.html
>    and used object.titlemarkup to switch from the first to the second
>    style, but can't get the third.  It seems that Chapter %n +
>    titleabbrev is mutually exclusive.  How would one go about getting
>    the "Chapter %n" + <titleabbrev> rather than the "Chapter 1 %n"
>    <title> full title case?  Is this simply a feature that would need
>    to be added?

The foresightful Norm has provided another template named
'object.titleabbrev.markup' for that purpose.
Unfortunately, it doesn't do what I would expect, which
is to output the number label and abbreviated title.
Instead, it just outputs the abbreviated title.
Since the titleabbrev.markup template already does that,
I think object.titleabbrev.markup should add the label.

You can use this customization of it, and I'll investigate
putting this in the stylesheet distribution:

<xsl:template match="*" mode="object.titleabbrev.markup">
  <xsl:param name="allow-anchors" select="0"/>
  <xsl:variable name="template">
    <xsl:apply-templates select="." mode="object.title.template"/>
  </xsl:variable>

  <xsl:call-template name="substitute-markup">
    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
    <xsl:with-param name="template" select="$template"/>
    <xsl:with-param name="title">
      <xsl:apply-templates select="." mode="titleabbrev.markup">
        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
      </xsl:apply-templates>
    </xsl:with-param>
  </xsl:call-template>

</xsl:template>

 
> 3. In the XSL-FO DocBook stylesheets, I want to display all the body
>    text of a particular component-level element, for example
>    <appendix> and other backmatter, in a smaller font from the main
>    body font (say 7pt).  I thought I could use pagemasters to do this
>    and following Bob's instructions at::
>    http://sagehill.net/docbookxsl/PageDesign.html
> 
>    I attempted to customize the "back" matter pagemasters
>    fo:region-body elements something like this:
> 
>   <fo:simple-page-master master-name="my-back-odd"
>      [...]
>       <fo:region-body margin-bottom="{$body.margin.bottom}"
>                       margin-top="{$body.margin.top}"
>                       font-size="7pt"
>                       column-count="{$column.count.back}">
>       </fo:region-body>
>      [...]
>   </fo:simple-page-master>
> 
>    I verified that all this gets passed through to the FO output fine
>    following Bob's instructions, unfortunately it has no effect
>    whatsoever in the PassiveTeX backend.  I'm guessing that this is
>    just simply not how the semantics of FO are supposed to work and
>    that you would need to customize the <fo:block> or somesuch. But I
>    thought that it might just be a backend issue with PassiveTeX.

The fo:region-body element in XSL-FO does not take
inheritable properties like font-size.  It has
to go on either fo:page-sequence or fo:flow.
Those are both initiated by the content templates,
not the page setup templates.  That means you need to
customize the appendix template, etc.

There is actually a DTD for XSL-FO that RenderX makes
available.  There is a browsable version of the DTD at:

  http://www.sagehill.net/livedtd/xslfo/index.html

There you can see what attributes each fo element can take.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


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