Skip to content

Commit a6062a6

Browse files
authored
Merge pull request #667 from ndw/iss-666
Avoid subtitle in title when titleabbrev-passthrough is enabled
2 parents df163a0 + 1aad1f0 commit a6062a6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/xslt/modules/chunk-cleanup.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@
809809
($header//h:h4)[1],
810810
$header//h:h5)[1]"/>
811811

812-
<xsl:apply-templates select="$hx/node()" mode="m:chunk-title"/>
812+
<xsl:apply-templates select="$hx/node() except $hx/h:script" mode="m:chunk-title"/>
813813
</xsl:otherwise>
814814
</xsl:choose>
815815
</xsl:function>

src/test/resources/expected/xref.003.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 03Unit Test: xref.003.xml</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><script type="text/html" class="titleabbrev">Unit 03</script>Unit Test: xref.003.xml</h1><div class="author"><h3><span class="first-last personname"><span class="firstname">Adam</span> <span class="surname">Di Carlo</span></span></h3></div></header><div class="list-of-titles"><div class="lot toc"><div class="title">Table of Contents</div><ul class="toc"><li><a href="#xreftests"><span class="label">1</span><span class="sep"></span>Xref test: titleabbrev</a></li><li><a href="#section"><span class="label">2</span><span class="sep"></span>Cross-ref targets</a></li></ul></div></div><section id="xreftests" class="section"><header><h2><span class="label">1</span><span class="sep"></span>Xref test: titleabbrev</h2></header><p>
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: xref.003.xml</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><script type="text/html" class="titleabbrev">Unit 03</script>Unit Test: xref.003.xml</h1><div class="author"><h3><span class="first-last personname"><span class="firstname">Adam</span> <span class="surname">Di Carlo</span></span></h3></div></header><div class="list-of-titles"><div class="lot toc"><div class="title">Table of Contents</div><ul class="toc"><li><a href="#xreftests"><span class="label">1</span><span class="sep"></span>Xref test: titleabbrev</a></li><li><a href="#section"><span class="label">2</span><span class="sep"></span>Cross-ref targets</a></li></ul></div></div><section id="xreftests" class="section"><header><h2><span class="label">1</span><span class="sep"></span>Xref test: titleabbrev</h2></header><p>
22
We're testing that xref uses the <code class="tag tag-element">titleabbrev</code>
33
element where appropriate.
44
</p><p>

src/test/resources/expected/xref.004.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 04Unit Test: xref.004.xml</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><script type="text/html" class="titleabbrev">Unit 04</script>Unit Test: xref.004.xml</h1><div class="author"><h3><span class="first-last personname"><span class="firstname">Frank</span> <span class="surname">Steimke</span></span></h3></div></header><div class="list-of-titles"><div class="lot toc"><div class="title">Table of Contents</div><ul class="toc"><li><a href="#customize-individual-cross-references"><span class="label">1</span><span class="sep"></span>Customize individual cross references</a></li><li><a href="#syntax-highlighting"><span class="label">2</span><span class="sep"></span>Syntax highlighting</a></li></ul></div></div><section id="customize-individual-cross-references" class="section"><header><h2><span class="label">1</span><span class="sep"></span>Customize individual cross references</h2></header><p>Most kinds of generated text apply across an entire document: do you want chapters
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: xref.004.xml</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><script type="text/html" class="titleabbrev">Unit 04</script>Unit Test: xref.004.xml</h1><div class="author"><h3><span class="first-last personname"><span class="firstname">Frank</span> <span class="surname">Steimke</span></span></h3></div></header><div class="list-of-titles"><div class="lot toc"><div class="title">Table of Contents</div><ul class="toc"><li><a href="#customize-individual-cross-references"><span class="label">1</span><span class="sep"></span>Customize individual cross references</a></li><li><a href="#syntax-highlighting"><span class="label">2</span><span class="sep"></span>Syntax highlighting</a></li></ul></div></div><section id="customize-individual-cross-references" class="section"><header><h2><span class="label">1</span><span class="sep"></span>Customize individual cross references</h2></header><p>Most kinds of generated text apply across an entire document: do you want chapters
22
to be numbered? Should generated text be in English or French? What form should numbered
33
and unnumbered sections have? The mechanisms for changing this generated control the formatting
44
of cross references.</p><p>But it’s sometimes desirable to be able to change the format of a

0 commit comments

Comments
 (0)