Re: [docbook-apps] FO output: xrefs to <para/> always include page number

From
Bob Stayton <>
Date
2013-09-09T17:01:46+00:00
ID
F654C37E5ACC41A5A4B4C3E9BCD16B02@totoro
Thread
Re: [docbook-apps] FO output: xrefs to <para/> always include page number
Hi Alexey,

The hard-coded addition of page number to para 
xrefs dates back to at least 2002.  I believe it was put in place because a 
para does not normally have text generated for it, so a page number was 
generated instead.  However, the stylesheets now have several methods of 
generating text for any such element, including @endterm, @xrefstyle, and 
@xreftext. The template does not take into account these other options 
(except xrefstyle in the xref template).  And I don't know why this 
"feature" was later added to the link element, which does have its own 
text.

 

I agree that this should be configurable without 
customization of those templates.  Your solution of adding a new param to 
maintain backwards compatibility is fine with me.  The snapshot builds are 
working again, so go ahead and check in the changes.  

 

Are you familiar with how the params are handled in 
the source tree?  The param.xml and param.xsl files are generated in 
the build from the param.xweb and param.ent files that are kept under source 
control.

 

Bob Stayton
Sagehill Enterprises


From: Alexey Neyman 

Sent: Sunday, September 08, 2013 11:43 PM

To:  

Subject: [docbook-apps] FO output: xrefs to <para/> always 
include page number

Hi 
all,

 

Why 
is a cross reference to a <para> element always inserting a page number in 
a FO output? The stylesheets ignore the settings of $insert.link.page.number and 
$insert.xref.page.number parameters if the link target is a <para> 
element. This also applies to <olink> links if the link target is 
determined to be in the current document.

 

There 
seems no easy way to turn off this behavior short of customizing the whole 
match="link"/match="xref"/name="xref.page.citation" templates.

 

It 
seems somewhat counterintuitive that <para> element ignores the settings 
of $insert.*.page.number parameters. But, if it is required to preserve backward 
compatible behavior - is it at least possible to at least make it configurable, 
e.g. something along the lines of the attached patch?

 

PS. 
The patch does not update fo/param.xml: I cannot describe why the new parameters 
are needed until I know the reason for the current behavior.

 

Regards,

Alexey.

---------------------------------------------------------------------
To 
unsubscribe, e-mail: 
For 
additional commands, e-mail: