#1319 generate.citerefentry.link customization not emitting refentrytitle contents in XSL-NS stylesheets

output: HTML
closed-invalid
None
5
2014-03-13
2013-11-12
Jon Leech
No
I have a Docbook 5 <refentry> page including

<citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>

and a stylesheet customization of ...xsl-ns/current/xhtml5/onechunk.xsl
including

<xsl:param name="citerefentry.link" select="'1'"></xsl:param>
<xsl:template name="generate.citerefentry.link">
    <xsl:value-of select="refentrytitle"/>
    <xsl:text>.xhtml</xsl:text>
</xsl:template>

When I process this with e.g.

% xsltproc testref-ns.xsl testref.xml

the generate.citerefentry.link template is run, but does not emit the
refentrytitle contents in testref.xhtml. I expect to see

<a class="citerefentry" href="glDepthRange.xhtml"><span class="citerefentry">
<span class="refentrytitle">glDepthRange</span></span></a>

but in fact get a link missing the <refentrytitle> contents:

...href=".xhtml"...

Did something change about the way this template should be coded between
the XSL and XSL-NS stylesheets? When I instead use testref.xsl, which
pulls in the old ...release/xsl/current/xhtml5/onechunk.xsl, the
generated link comes out correctly. This is using the the 1.78.1
releases of both XSL and XSL-NS, as packaged by Debian, but there are no
differences with the latest 1.78.1 distribution on SF as far as I can
tell.

I looked at inline.xsl where the generate.citerefentry.link
customization is called, and it is identical between XSL and XSL-NS
stylesheets as far as I can see.

I've attached testref.xml (test document), testref-ns.xsl (customization
layer using XSL-NS stylesheet) and testref.xsl (customization layer
using old XSL stylesheet).

xsltproc --version returns:

Using libxml 20800, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20800, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20800
libexslt 815 was compiled against libxml 20800

(N.b. this bug tracker's insistence on trying to turn all the XML/HTML
fragments I'm quoting into markup is rather frustrating; hopefully my
intent comes through even if the formatting is a bit messed up).
3 Attachments

Discussion

  • Robert Stayton

    Robert Stayton - 2014-01-08

    When using the namespaced stylesheets, all references to elements must use the namespace prefix, because the docbook elements are in the docbook namespace. Use d:refentrytitle and declare the namespace in your customization layer. See http://www.sagehill.net/docbookxsl/CustomDb5Xsl.html

     
  • Robert Stayton

    Robert Stayton - 2014-01-08
    • status: open --> closed-invalid
    • assigned_to: Robert Stayton
     

Log in to post a comment.