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: xrefstyle attribute; pagenumber; %p


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"/>.

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 

xsltproc --version
Using libxml 20606, libxslt 10103 and libexslt 803
xsltproc was compiled against libxml 20606, libxslt 10103 and libexslt 
libxslt 10103 was compiled against libxml 20606
libexslt 803 was compiled against libxml 20606


Steve Whitlatch

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