Skip to content

Commit

Permalink
Merge pull request #422 from ndw/iss-420
Browse files Browse the repository at this point in the history
Missing namespace prefix in 20-db4to5.xsl
  • Loading branch information
ndw authored Oct 22, 2023
2 parents 7377b54 + 29fa262 commit 78c169f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ValidationTasks {
private def publishersDocuments = ["JFK_Inaugural", "auld_lang_syne", "hen_v", "drama.001"]
private def invalidIdrefDocuments = ["calloutlist.003", "transclusion.001", "transclusion.002",
"transclusion.003", "transclusion.004", "xref.002"]
private def FourFiveDocuments = ["db45.001"]

public ValidationTasks(Project project) {
this.project = project
Expand All @@ -23,7 +24,7 @@ class ValidationTasks {
return validators[base]
}

if (base.startsWith("local.")) {
if (base.startsWith("local.") || base in FourFiveDocuments) {
return null
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/xslt/transforms/20-db4to5.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
xmlns:mp="http://docbook.org/ns/docbook/modes/private"
xmlns:t="http://docbook.org/ns/docbook/templates"
xmlns:tp="http://docbook.org/ns/docbook/templates/private"
xmlns:v="http://docbook.org/ns/docbook/variables"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="db fp mp t tp xlink xs"
exclude-result-prefixes="db fp mp t tp v xlink xs"
version="3.0">

<xsl:import href="../environment.xsl"/>
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/expected/db45.001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!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: db45.001</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 class="book division"><header><h1>Unit Test: db45.001</h1></header>

<section id="R_ch1" class="chapter component"><header><h2>Chapter <span class="label">1</span><span class="sep"></span>Chapter title</h2></header>

</section>
</article></main><nav class="bottom"></nav></body></html>
11 changes: 11 additions & 0 deletions src/test/resources/xml/db45.001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<book>
<bookinfo>
<title>Unit Test: db45.001</title>
</bookinfo>
<chapter>
<chapterinfo>
<title>Chapter title</title>
<para>…</para>
</chapterinfo>
</chapter>
</book>

0 comments on commit 78c169f

Please sign in to comment.