[xep-support] Getting a page number into a basic-link

From: Dave Thomas <dave@pragprog.com>
Date: Fri Jan 14 2011 - 19:56:54 PST

We have an errata reporting system that lets users click a link on apage in a book to report a problem on that page. Our old system usedto embed the page's number into the hyperlink, so that the erratasystem would prefill it. The link would look like

So, in the static-content for the page footer, I have
       <fo:basic-link> <xsl:attribute name="external-destination"> <xsl:text>url(http://pragprog.com/titles/</xsl:text> <xsl:value-of select="$book-code"/> <xsl:text>/errata/add?pdf_page=</xsl:text> <fo:page-number/> <xsl:text>)</xsl:text> </xsl:attribute> Report erratum on page <fo:page-number/> </fo:basic-link>
That doesn't seem to work—I'm getting nothing for the page numberinside the link (but it is displaying correctly in the static text).
Now, I understand why I can't use <fo:page-number/> in a variable, butI'm not sure I see why this particular use shouldn't work: isn't thesubstitution into the link going to use the same mechanism as thesubstitution into the text?
And, if not—is there any way to do what I'd like to do?



_______________________________________________(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Jan 14 19:57:23 2011

This archive was generated by hypermail 2.1.8 : Fri Jan 14 2011 - 19:57:24 PST