Is this any help - straight out of Bob's book, p.238-249 (3rd
edit.)
use something like <xref linkend="someID"
xrefstyle="page_ref"/>
and put this in the customization layer (change styles to
whatever you want.)
<!--
====================================================================
-->
<!-- define named xrefstyles for appendix, chapter, figure, part, sect1,sect2, sect3 section, table (all same: "page_ref"), and for formalpara ("fp_page_ref") -->
<xsl:param name="local.l10n.xml" select="document('')" />
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="xref-number-and-title">
<l:template name="appendix" style="page_ref" text="Appendix %n, “%t”, p.%p" />
<l:template name="chapter" style="page_ref" text="Chapter %n, “%t”, p.%p" />
<l:template name="figure" style="page_ref" text="Figure %n, “%t”, p.%p" />
<l:template name="part" style="page_ref" text="Part %n, “%t”, p.%p" />
<l:template name="sect1" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect2" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect3" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect4" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect5" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="section" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="table" style="page_ref" text="Table %n, “%t”, p.%p" />
</l:context>
<l:context name="xref">
<l:template name="formalpara" style="fp_page_ref" text="Paragraph “%t”" />
<l:template name="olink.page.citation" text=" (page %p)"/>
<l:template name="page.citation" text=" [%p]"/>
<l:template name="page" text="(page %p)"/>
<l:template name="docname" text=" in %o"/>
<l:template name="docnamelong" text=" in the document titled %o"/>
<l:template name="pageabbrev" text="(p. %p)"/>
<l:template name="Page" text="Page %p"/>
</l:context>
</l:l10n>
</l:i18n>
<!--
Use of '%p' in fp_page_ref, - xref link to a formalpara - doesn't seem to work, backwards or forward - see test code in venn.xml
So the ref. to 'p.%p' is removed in the above template. %t for the formalpara id works OK. %n is not relevant, formalpara cannot be numbered. If and when %p works for formalpara, replace the above template by:
<l:template name="formalpara" style="fp_page_ref" text="Paragraph “%t”, p.%p," />
To get a 'close' page ref. in a pointer to a formal para, do something like:
<xref linkend="id of formal para" xrefstyle="fp_page_ref" /> in <xref linkend="id of chapter or section containing the formal para" xrefstyle="page_ref" />
This will at least point the reader to the right chapter or section in a chapter. sect1, sect2 etc. should also work to localize more closely - untested.
-->
<!-- define named xrefstyles for appendix, chapter, figure, part, sect1,sect2, sect3 section, table (all same: "page_ref"), and for formalpara ("fp_page_ref") -->
<xsl:param name="local.l10n.xml" select="document('')" />
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="xref-number-and-title">
<l:template name="appendix" style="page_ref" text="Appendix %n, “%t”, p.%p" />
<l:template name="chapter" style="page_ref" text="Chapter %n, “%t”, p.%p" />
<l:template name="figure" style="page_ref" text="Figure %n, “%t”, p.%p" />
<l:template name="part" style="page_ref" text="Part %n, “%t”, p.%p" />
<l:template name="sect1" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect2" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect3" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect4" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="sect5" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="section" style="page_ref" text="Section %n, “%t”, p.%p" />
<l:template name="table" style="page_ref" text="Table %n, “%t”, p.%p" />
</l:context>
<l:context name="xref">
<l:template name="formalpara" style="fp_page_ref" text="Paragraph “%t”" />
<l:template name="olink.page.citation" text=" (page %p)"/>
<l:template name="page.citation" text=" [%p]"/>
<l:template name="page" text="(page %p)"/>
<l:template name="docname" text=" in %o"/>
<l:template name="docnamelong" text=" in the document titled %o"/>
<l:template name="pageabbrev" text="(p. %p)"/>
<l:template name="Page" text="Page %p"/>
</l:context>
</l:l10n>
</l:i18n>
<!--
Use of '%p' in fp_page_ref, - xref link to a formalpara - doesn't seem to work, backwards or forward - see test code in venn.xml
So the ref. to 'p.%p' is removed in the above template. %t for the formalpara id works OK. %n is not relevant, formalpara cannot be numbered. If and when %p works for formalpara, replace the above template by:
<l:template name="formalpara" style="fp_page_ref" text="Paragraph “%t”, p.%p," />
To get a 'close' page ref. in a pointer to a formal para, do something like:
<xref linkend="id of formal para" xrefstyle="fp_page_ref" /> in <xref linkend="id of chapter or section containing the formal para" xrefstyle="page_ref" />
This will at least point the reader to the right chapter or section in a chapter. sect1, sect2 etc. should also work to localize more closely - untested.
-->
I have <xref linkend="IDValue"/>
The link is to
<sect3 xml:id="IDValue">
<title>Long waffle title.</title>
In PDF output this is showing as
Section 4.4.4, Long waffle title .. [8].
In my customization I have
<xsl:param name="insert.xref.page.number">yes</xsl:param>
I'd prefer either just the section number, or even
section number and page, e.g. Section 4.4.4 on Page 8
Can I customize this please?
regards
--
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Ron Catterall, Phd, DSc
email: [EMAIL PROTECTED]
Prolongacion de Hidalgo 140
http://catterall.net/
San Felipe del Agua
tel:
+52 951 520 1821
Oaxaca 68020
Mexico
fax:
+1 530 348 8309
Prolongacion de Hidalgo 140
San Felipe del Agua
Oaxaca 68020
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
