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] xsl: setup xref-label for tables


Hi,

i think I started on the wrong track. (And I haven't found any docs for it).

I want to change the xref style from 'Table 4.2' to 'Table 4.2: Title'.

I have understook, that I need to change these settings by adding an

----
<xsl:param name="local.l10n.xml" select="document('en.xml')"/> 
----

to my stylesheet
(so I can simply copy what is there) and change the  xref (inside 'en.xml' section 
accordingly to:

-----
<l:context name="xref">
   <l:template name="table" text="Table&#160;%n.&#160;%t"/>
</l:context>
-----

Am I so far right ? Or did I miss something ? Because the Output did not
change. I'm not fully trusting the xerces parser, because he had already
problems with the xhtml styleshett for <ulink />.



Bob Stayton:
> And also include the <l:l10n language="xx"> element.
> 
> In the sample code, there is no colon in the text attributes.
> Did you intend to use colon or period?
"," or "." ? Where and when ? 

So my test-setup:
<----------------xsl-common--------------->
<import ="path-to/xhtml/docbook.xsl" />
<xsl:param name="local.l10n.xml" select="document('en.xml')"/> 
</---------------->
<----------------en.xml    --------------->
<!-- all the same except : -->
<l:context name="xref">
   <l:template name="table" text="Table&#160;%n.&#160;%t"/>
</l:context>
</---------------->
<----------------text.xml  --------------->
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
<article>
<sect1>
<title>Kosten</title>
<para> <xref linkend="table" /> </para>

<table frame='all' id="table">
   <title id="class-school.title">test</title>
   <tgroup cols='5' align='left' colsep='1' rowsep='1'>
      <colspec colname='c1' colwidth="3*"/>
      <tbody> <row> <entry>iX</entry> </row></tbody>
   </tgroup>
</table>

</sect1>
</article>
</---------------->
<----------------text.xml  --------------->
[...]
<h2 class="title" style="clear: both"><a
id="d0e2"/>Kosten</h2></div></div><div/></div><p> 
<a href="#table" title="Table 1. test">Table 1</a> </p>
[...]
</---------------->


And I wanted: 
<a href="#table">Table 1. test</a> </p>


> On Tue, Apr 15, 2003 at 09:03:31AM -0400, Jeff Beal wrote:
> > Did you add <xsl:param name="local.l10n.xml" select="document('')"/> to your
> > document also?
> > 
> > > -----Original Message-----
> > > From: Jens Skripczynski [mailto:skripi-lists@myrealbox.com]
> > > Sent: Tuesday, April 15, 2003 7:46 AM
> > > To: docbook-apps@lists.oasis-open.org
> > > Subject: [docbook-apps] xsl: setup xref-label for tables
> > > 
> > > 
> > > Hi,
> > > 
> > > I'm trying to setup a different label for xref's concerning Tables.
> > > I want a format linke 'Table 2.1: my Title'.
> > > 
> > > As as far as I have understood the xsl style sheet I have to change
> > > the schemes in the common section. So I added to my stylesheets:
> > > 
> > > ---------------------------
> > > <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
> > >    <l:context name="title">
> > >       <l:template name="table" text="Table&#160;%n.&#160;%t"/>
> > >    </l:context>
> > > 
> > >    <l:context name="xref">
> > >       <l:template name="table" text="Table&#160;%n.&#160;%t"/>
> > >    </l:context>
> > > </l:i18n>
> > > ---------------------------
> > > The output is almost what I wanted:
> > > <a href="#table-base_rr" title="Table 5.2. Base Recovery Rate 
> > > by landscape">Table 4.2</a>
> > > 
> > > If I could move the attribute between the <a> </a> 's I would 
> > > be happy.
> > > 
> > > I'm using saxon-6.5.2, xerces-2.3.0.

Ciao

Jens Skripczynski
-- 
E-Mail: skripi-lists(at)myrealbox(dot)com

"...The box said use Win95 or better, so I installed Linux..."



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