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]

Re: Including titles with xrefs in XML


> From: Norman Walsh <ndw@nwalsh.com>
> 
> / Bob Stayton <bobs@caldera.com> was heard to say:
> | BTW, don't be put off by the message at the top of the file
> | "Do not edit this file by hand!". That only applies if you
> | are building the template files from the CVS source.  Since
> | the stylesheet distro doesn't come with the source or
> | Makefile, you can ignore that comment and customize it to
> | suit your needs.
> 
> I protest. That's as bad as editing any other file that comes directly
> from the distribution. It will be blown away by the next version you
> install. (Bob goes on to describe how to do the right thing; I knew he
> would :-)

I'm not sure I deserve such confidence 
since I first described how *I* did it myself, and
then had second thoughts and described a more correct
way.  8-)

> I have just this afternoon checked in a bunch of changes to CVS that
> allow you to do this instead:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                 version="1.0">
> 
> <xsl:import href="../xsl/html/autoidx.xsl"/>
> <xsl:output method="html"/>
> 
> <xsl:param name="local.l10n.xml" select="document('')"/>
> 
> <i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
> <l10n language="en">
> <context name="xref">
> <template name="figure" text="Fig %n"/>
> </context>
> <context name="title">
> <template name="figure" text="%n. (Figure) %t"/>
> </context>
> </l10n>
> </i18n>
> 
> </xsl:stylesheet>
> 
> In other words, you can now perform selective overrides directly in a
> customization layer (or in another document).

This is great.  It will be much more direct for
adding customizations.

> WARNING: If you check out the changed stylesheets and try to plug them
> into your existing setup, you will have troubles.
> 
> 1. The elements internationalization and localization have been renamed
>    to i18n and l10n, respectively. (The former were just too long to type
>    without error.)
> 
> 2. The elements are now in a namespace.
> 
> | I'm updating the doc on XSL customization to include
> | stuff like this.
> 
> Thank you, Bob!

I'll add your changes to what I was writing.

bobs
Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


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