Skip to content

Commit 13952ef

Browse files
committed
Support @xrefstyle on link; fix docbook#561
1 parent 6e82c1c commit 13952ef

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

src/guide/xml/changelog.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ the combination of options. See <xref linkend="verbatim-environments"/>.</para>
5959
the <tag class="attribute">xml:id</tag> value of a chunk will be used as the
6060
chunk filename.</para>
6161
</listitem>
62+
<listitem>
63+
<para>Support <tag class="attribute">xrefstyle</tag> on <tag>link</tag>;
64+
fixed <link xlink:href="https://github.com/docbook/xslTNG/issues/561">#561</link>.</para>
65+
</listitem>
6266
</itemizedlist>
6367
</section>
6468

src/main/xslt/modules/links.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
</xsl:template>
263263

264264
<xsl:function name="fp:localization-template-from-xrefstyle" as="element(l:template)">
265-
<xsl:param name="xref" as="element(db:xref)"/>
265+
<xsl:param name="xref" as="element()"/>
266266
<xsl:param name="target" as="element()"/>
267267

268268
<xsl:variable name="content" as="item()*">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title>Unit test: link.006</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><article id="article" class="article component"><header><h1>Unit test: link.006</h1></header><p>Test: <a href="#article" class="xref xref-article">xrefstyle: Unit test: link.006</a>.</p><p>Test: <a href="#article" class="xref xref-article">Unit test: link.006</a>.</p><p>Test: <a href="#article" class="xref xref-article">xrefstyle: Unit test: link.006</a>.</p><p>Test: <a href="#article" class="link">link text</a>.</p></article></main><nav class="bottom"></nav></body></html>

src/test/resources/xml/link.006.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<article xmlns="http://docbook.org/ns/docbook"
2+
xmlns:xlink="http://www.w3.org/1999/xlink"
3+
version="5.0" xml:id="article">
4+
<title>Unit test: link.006</title>
5+
6+
<para>Test: <xref xrefstyle="xrefstyle: %c" linkend="article"/>.</para>
7+
8+
<para>Test: <link linkend="article"/>.</para>
9+
10+
<para>Test: <link xrefstyle="xrefstyle: %c" linkend="article"/>.</para>
11+
12+
<para>Test: <link xrefstyle="xrefstyle: %c" linkend="article">link text</link>.</para>
13+
14+
</article>

0 commit comments

Comments
 (0)