Hi Alexey,
Looking again at the history of the template for <link>, I would say that the 
addition of forced page number only for para was probably not thought through.  
I would consider that a bug, so adding a param to support this behavior seems 
inapproriate.  So I agree that link should rely only on 
$insert.link.page.number.  

Would you be interested in having write access to the repo?  I think you have 
demonstrated a good understanding of DocBook XSL.

If not, I can check in these changes.
  
Bob Stayton
Sagehill Enterprises
[email protected]


From: Alexey Neyman 
Sent: Monday, September 09, 2013 12:56 PM
To: [email protected] 
Cc: Bob Stayton 
Subject: Re: [docbook-apps] FO output: xrefs to <para/> always include page 
number


Hi Bob,



In our documents, we have numbered paragraphs, and a template for <para> in 
xref-to mode - so the even the link text is auto-generated.



With what you've said, is $insert.link.page.number.para parameter even needed? 
Or is it ok to just drop the unconditional page number for the <link> 
references to paragraphs, and rely solely on $insert.link.page.number?



And finally, it seems you're under impression that I have commit access to 
docbook-xsl project :) I'd hate to disappoint you, but I do not - or at least, 
not yet :)



Regards,

Alexey.



On Monday, September 09, 2013 10:01:35 AM Bob Stayton wrote:


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
[email protected]




From: Alexey Neyman 

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

To: [email protected] 

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: [email protected]
For additional commands, e-mail: [email protected]




Reply via email to