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


/ 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 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).

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!

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | Talk as if you were making your
http://www.oasis-open.org/docbook/ | will: the fewer the words the less
Chair, DocBook Technical Committee | the litigation.--Graci\'an

------------------------------------------------------------------
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]