docbook-apps

  • 1.  localization.

    Posted 07-01-2007 13:38
    In en.xml etc, there are uses of %t, %n etc.

    Anyone know where (if anywhere) these are explained?
    I can't find anything in Bobs book.

    TIA

    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 2.  Re: [docbook-apps] localization.

    Posted 07-01-2007 13:48
    Hi Dave,

    On Sonntag, 1. Juli 2007, Dave Pawson wrote:
    > In en.xml etc, there are uses of %t, %n etc.

    %t = title
    %s = subtitle (if available)
    %n = number
    %p = page number (if applicable)


    > Anyone know where (if anywhere) these are explained?
    > I can't find anything in Bobs book.

    Some examples can be find in this section:
    http://www.sagehill.net/docbookxsl/CustomXrefs.html#XrefGentext

    Hope that helps. :)


    Tom

    --
    Thomas Schraitle



  • 3.  Re: [docbook-apps] localization.

    Posted 07-01-2007 14:41
    Thomas Schraitle wrote:
    > Hi Dave,
    >
    > On Sonntag, 1. Juli 2007, Dave Pawson wrote:
    >> In en.xml etc, there are uses of %t, %n etc.
    >
    > %t = title
    > %s = subtitle (if available)
    > %n = number
    > %p = page number (if applicable)

    > Some examples can be find in this section:
    > http://www.sagehill.net/docbookxsl/CustomXrefs.html#XrefGentext
    >
    > Hope that helps. :)


    Yes, thanks Tom. I guessed at %n, but couldn't be sure.

    I'm guessing that's relative content?
    current()/title etc.



    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 4.  Re: [docbook-apps] localization.

    Posted 07-09-2007 00:25
    On 7/1/07, Dave Pawson <davep@dpawson.co.uk> wrote:
    > Thomas Schraitle wrote:
    > > Hi Dave,
    > >
    > > On Sonntag, 1. Juli 2007, Dave Pawson wrote:
    > >> In en.xml etc, there are uses of %t, %n etc.
    > >
    > > %t = title
    > > %s = subtitle (if available)
    > > %n = number
    > > %p = page number (if applicable)


    """Any %t mark in the attribute value is a placeholder for the
    element's title, and %n is a placeholder for its number (if it is
    numbered)."""
    http://www.sagehill.net/docbookxsl/CustomGentext.html


    """The %p is the placeholder for the generated page number. If you are
    translating your documents to other languages, you may need to add
    similar customizations to the gentext for those languages."""
    http://www.sagehill.net/docbookxsl/CustomXrefs.html

    HTH,
    Keith



  • 5.  Re: [docbook-apps] localization.

    Posted 07-09-2007 00:37
    On 7/8/07, Keith Fahlgren <abdelazer@gmail.com> wrote:
    > On 7/1/07, Dave Pawson <davep@dpawson.co.uk> wrote:
    > > Thomas Schraitle wrote:
    > > > Hi Dave,
    > > >
    > > > On Sonntag, 1. Juli 2007, Dave Pawson wrote:
    > > >> In en.xml etc, there are uses of %t, %n etc.
    > > >
    > > > %t = title
    > > > %s = subtitle (if available)
    > > > %n = number
    > > > %p = page number (if applicable)

    Here's a potential list of the "etc", if someone else needs it (the
    template names may be helpful documentation). This is from
    1.71.1/common/gentext.xsl:

    <xsl:when test="$candidate = 't'">
    <xsl:apply-templates select="." mode="insert.title.markup">
    --
    <xsl:when test="$candidate = 's'">
    <xsl:apply-templates select="." mode="insert.subtitle.markup">
    --
    <xsl:when test="$candidate = 'n'">
    <xsl:apply-templates select="." mode="insert.label.markup">
    --
    <xsl:when test="$candidate = 'p'">
    <xsl:apply-templates select="." mode="insert.pagenumber.markup">
    --
    <xsl:when test="$candidate = 'o'">

    <xsl:apply-templates select="." mode="insert.olink.docname.markup">
    --
    [%d doesn't seem to be in use as of 1.71]
    <xsl:when test="$candidate = 'd'">
    <xsl:apply-templates select="." mode="insert.direction.markup">
    --
    [a literal %, finally]
    <xsl:when test="$candidate = '%' ">
    <xsl:text>%</xsl:text>
    </xsl:when>


    HTH,
    Keith