I need my xref in my docbook for class notes
to have page numbers in my PDF generated file.
I follow the instructions in Bob Stayton's DocBook XSL,
The Cmplete Guide, on page 183, Chapter 13 of Cross References.
It is generating in the fo file, "the section called ..." and the title
rather than picking up the page number.
Here is my customization layer in st.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="./titlepage.xsl"/>
<xsl:import href="/opt/docbook/DOCBOOK/docbook-xsl-1.65.1/fo/docbook.xsl"/>
<xsl:attribute-set name="formal.object.properties">
<xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
</xsl:attribute-set>
<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="section" text="II%p, %t"/>
</l:context>
</l:l10n>
<l:l10n>
<l:context name="xref-number">
<l:template name="section" text="JJ%p, %t"/>
</l:context>
</l:l10n>
<l:l10n>
<l:context name="xref-number-and-style">
<l:template name="section" text="KK%p, %t"/>
</l:context>
</l:l10n>
</l:i18n>
</xsl:stylesheet>
(Note, I added the II, JJ, KK so I could easily see the cross reference
generated if it picked it up my stylesheet. It did not.)
Here is where I invoke docbook:
#!/bin/sh
# This script encapsulates a standard SAXON call.
# This Script example borrowed from another application
#JAVA_HOME=/usr/java/jdk1.5.0_04/jre
JAVA_HOME=/usr
SAXON_HOME=/opt/docbook/XEP/lib
STYLESHEETS_HOME=/opt/docbook/XEP/doc/docbook/stylesheets
CP=$JAVA_HOME/lib/tools.jar:$SAXON_HOME/saxon.jar:/opt/docbook/DOCBOOK/docbook-xsl-1.65.1/extensions/saxon653.jar:/opt/docbook/xerces-2_6_0/xercesImpl.jar
NEW_LIB_HOME=/opt/docbook/DOCBOOK/FOP/fop-0.20.5/lib
/usr/bin/java -Xbootclasspath/p:$NEW_LIB_HOME/xalan-2.4.1.jar:$NEW_LIB_HOME/xercesImpl-2.2.1.jar:$NEW_LIB_HOME/xml-apis.jar -classpath $CP com.icl.saxon.StyleSheet \
-o $1.fo $1 \
st.xsl \
use.extensions=0 default.table.width=auto title.margin.left=0pc insert.xref.apage.number=yes
And lastly, here is the input file:
<para>
<xref linkend="A"/>
abc def ghi
abc def ghi
</para>
<para>
abc def ghi
abc def ghi
</para>
<para>
abc def ghi
abc def ghi
</para>
<para>
abc def ghi
abc def ghi
</para>
<para>
abc def ghi
abc def ghi
abc def ghi
</para>
(I included some additonal dummy text in the para that I added so the section
entitled "AA AA" would be on a separate page.
Here is what was generated for the cross reference line in the .fo
output:
<fo:basic-link internal-destination="A">the section called ??AA AA ?</fo:basic-link>
Thanks for any help that any one can provide.
I also tried the select: option but that did not work either.
Dr. Laurence Leff Western Illinois University, Macomb IL 61455 ||(309) 298-1315
Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX: 309-298-2302
Secretary: eContracts Technical Committee OASIS Legal XML Member Section