This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] xrefstyle attribute; pagenumber; %p
- From: Steve Whitlatch <swhitlat at getnet dot net>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 17 Mar 2004 02:02:58 -0700
- Subject: [docbook-apps] xrefstyle attribute; pagenumber; %p
- Organization: Steve Whitlatch, Inc.
- Reply-to: swhitlat at getnet dot net
Hello,
I am using the "xref" element's "xrefstyle" attribute in an attempt to
create customized xrefs. I'm following along with "Chapter 13. Cross
references" in DocBook XSL: The Complete Guide.
I have in some XML, for example:
<para>For detailed information on Freedom Center, see
<xref linkend="FreedomCenterxref"/> on page
<xref linkend="FreedomCenterxref"
xrefstyle="select: pagenumber"/>.
</para>
Later on in the document, I have:
. . .
<title id="FreedomCenterxref">Freedom Center</title>
. . .
So, there is an id for the linkend.
In my XSL customization layer (using the 1.65-0 DocBook XSL
stylesheets), I have:
<xsl:param name="insert.xref.page.number">maybe</xsl:param>
I don't think anything else in my customization layer is pertinent.
Using xmllint, the document validates against the DocBook XML 4.3RC3
DTD, and xsltproc creates the fo with no complaint.
But FOP complains and errors out. The command:
"fop -c /usr/local/fop/conf/cfg.xml -fo f2Arch.fo -pdf f2Arch.pdf"
results in this error message at the point at which FOP reaches the
xrefstyle attribute:
page-number-citation must contain "ref-id"
I grepped through the DocBook 4.3 DTD directory and the DocBook XSL
1.65-0 directory. No mention found of "xref-id".
Maybe I have found an FOP bug? Maybe not!
Suggestions? Comments?
The xrefstyle attribute is just what I need. According to the
documentation, it will allow me the freedom to create custom xrefs as
needed. I is a good addition to DocBook.
Also, I found that using
<xref linkend="FreedomCenterxref"
xrefstyle="template:'%t' on page %p"/>
produces the same error message from fop. (And how can I turn those
single quotes into double quotes? Escaping like \"%t\" did not seem
to work.)
Leaving off the %p part makes everything OK, but of course I lose the
pagenumber.
xsltproc --version
***************
Using libxml 20606, libxslt 10103 and libexslt 803
xsltproc was compiled against libxml 20606, libxslt 10103 and libexslt
803
libxslt 10103 was compiled against libxml 20606
libexslt 803 was compiled against libxml 20606
******************
Thanks,
Steve Whitlatch
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.