[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Xref Numbering
Hi, I noticed a couple of things about your customization that are preventing it from working. Since you don't have section numbering turned on, the gentext contexts with name="xref-number" and name="xref-number-and-title" are not used. Rather, the context with name="xref" is used. If you change your first instance in your customization to name="xref", then you should get the "II%p" version working. Also, you have several <l:l10n> elements, but only one of them has the language attribute. The language attribute is key to finding a match, so you should either add that attribute to all of the l:l10n elements, or combine all of the l:context elements into one l:l10n element with that attribute. Lastly, there is no context="xref-number-and-style" in the stylesheets. Anyway, the name="xref" change should get it working for you. I also noticed that you are referencing version 1.65 of the stylesheets, which dates back to 2004. I would highly recommending upgrading to a newer version. Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "Dr. Laurence Leff" <D-Leff@wiu.edu> To: <docbook-apps@lists.oasis-open.org> Sent: Thursday, July 31, 2008 9:45 AM Subject: [docbook-apps] Xref Numbering >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 > > > <?xml version='1.0'?> > <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: > > > <section><title>tit</title> > <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> > <section id="A"><title id="A.title">AA AA</title> > <para> > abc def ghi > abc def ghi > abc def ghi > </para> > </section> > </section> > > (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 ?oAA > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]