Skip to content

Commit

Permalink
Release 5.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuffar committed Feb 24, 2021
1 parent d378252 commit e29dd83
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ repositoryURL=https://github.com/brailleapps/dotify.task.impl
repositorySCM=scm:git:https://github.com/brailleapps/dotify.task.impl.git
moduleName=org.daisy.dotify.tasks
bundleName=org.daisy.dotify.task.impl
version=5.0.1-SNAPSHOT
version=5.0.1
12 changes: 6 additions & 6 deletions src/org/daisy/dotify/tasks/impl/input/text/Xml2ObflWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class Xml2ObflWriter {
private final InputStream is;
private final OutputStream os;
private final String encoding;

private String rootLang;

Xml2ObflWriter(InputStream is, OutputStream os, String encoding) {
Expand All @@ -21,7 +21,7 @@ abstract class Xml2ObflWriter {
this.encoding = encoding;
this.rootLang = "";
}

String getRootLang() {
return rootLang;
}
Expand All @@ -46,7 +46,7 @@ void parse() throws IOException {
}
startPara(pw);
pw.print(line.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll("\"", "&quot;"));
if (line.length() == 0) {
if (line.isEmpty()) {
pw.print("&#x00A0;");
}
endPara(pw);
Expand All @@ -60,13 +60,13 @@ void parse() throws IOException {
}
}
}

protected abstract void writePrologue(PrintWriter pw);

protected abstract void writeEpilogue(PrintWriter pw);

protected abstract void startPara(PrintWriter pw);

protected abstract void endPara(PrintWriter pw);

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs obfl xtd"
xmlns:obfl="http://www.daisy.org/ns/2011/obfl"
Expand Down Expand Up @@ -44,13 +44,13 @@
<xsl:param name="l10nInstructionsHeading" select="'To the reader'"/>

<xsl:function name="obfl:insertLayoutMaster">
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<!-- count(//dtb:note[key('noterefs', @id)[ancestor::dtb:frontmatter]]) -->
<!-- count(//dtb:note[key('noterefs', @id)[ancestor::dtb:frontmatter]]) -->
<xsl:param name="footnotesNotInFrontMatter" as="xs:integer"/>
<!-- count(//dtb:note[key('noterefs', @id)[not(ancestor::dtb:frontmatter)]]) -->
<!-- count(//dtb:note[key('noterefs', @id)[not(ancestor::dtb:frontmatter)]]) -->
<layout-master name="front" page-width="{$page-width}"
<layout-master name="front" page-width="{$page-width}"
page-height="{$page-height}" inner-margin="{$inner-margin}"
outer-margin="{$outer-margin}" row-spacing="{$row-spacing}" duplex="{$duplex}">
<xsl:if test="$duplex">
Expand Down Expand Up @@ -98,7 +98,7 @@
</page-area>
</xsl:if>
</layout-master>
<layout-master name="main" page-width="{$page-width}"
<layout-master name="main" page-width="{$page-width}"
page-height="{$page-height}" inner-margin="{$inner-margin}"
outer-margin="{$outer-margin}" row-spacing="{$row-spacing}" duplex="{$duplex}">
<xsl:if test="$duplex">
Expand Down Expand Up @@ -171,7 +171,7 @@
</page-area>
</xsl:if>
</layout-master>
<layout-master name="plain" page-width="{$page-width}"
<layout-master name="plain" page-width="{$page-width}"
page-height="{$page-height}" inner-margin="{$inner-margin}"
outer-margin="{$outer-margin}" row-spacing="{$row-spacing}" duplex="{$duplex}">
<xsl:if test="$duplex">
Expand All @@ -194,7 +194,7 @@
<xsl:call-template name="margin-region"/>
</default-template>
</layout-master>
<layout-master name="notes" page-width="{$page-width}"
<layout-master name="notes" page-width="{$page-width}"
page-height="{$page-height}" inner-margin="{$inner-margin}"
outer-margin="{$outer-margin}" row-spacing="{$row-spacing}" duplex="{$duplex}">
<xsl:if test="$duplex">
Expand Down Expand Up @@ -230,7 +230,7 @@
<xsl:call-template name="margin-region"/>
</default-template>
</layout-master>
<layout-master name="cover" page-width="{$page-width}"
<layout-master name="cover" page-width="{$page-width}"
page-height="{$page-height}" inner-margin="{$inner-margin}"
outer-margin="{$outer-margin}" row-spacing="1" duplex="{$duplex}" border-style="solid" border-width="1" border-align="outer">
<default-template>
Expand All @@ -239,7 +239,7 @@
</default-template>
</layout-master>
</xsl:function>

<xsl:template name="margin-region">
<xsl:if test="$show-print-page-breaks">
<margin-region align="left" width="1">
Expand All @@ -249,18 +249,18 @@
</margin-region>
</xsl:if>
</xsl:template>

<xsl:function name="obfl:insertVolumeTemplate">
<xsl:param name="title"/>
<xsl:param name="authors"/>
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<xsl:param name="footnotesNotInFrontMatter" as="xs:integer"/>
<xsl:param name="insertToc" as="xs:boolean"/>
<xsl:param name="additionalPreContent"/>
<xsl:param name="firstInFirstVolumeContent"/>
<xsl:choose>
<xsl:when test="$insertToc">
<volume-template volume-number-variable="volume" volume-count-variable="volumes" use-when="(= $volume 1)" sheets-in-volume-max="{$splitterMax}">
<volume-template use-when="(= $volume 1)" sheets-in-volume-max="{$splitterMax}">
<pre-content>
<xsl:if test="$show-cover-page">
<xsl:copy-of select="obfl:insertCoverPage($title, $authors)"/>
Expand All @@ -286,7 +286,7 @@
<xsl:copy-of select="obfl:insertPostContentNotes($footnotesInFrontMatter, $footnotesNotInFrontMatter)"/>
</post-content>
</volume-template>
<volume-template volume-number-variable="volume" volume-count-variable="volumes" use-when="(> $volume 1)" sheets-in-volume-max="{$splitterMax}">
<volume-template use-when="(> $volume 1)" sheets-in-volume-max="{$splitterMax}">
<pre-content>
<xsl:if test="$show-cover-page">
<xsl:copy-of select="obfl:insertCoverPage($title, $authors)"/>
Expand Down Expand Up @@ -329,7 +329,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:function>

<xsl:function name="obfl:insertVolumeTransition">
<xsl:param name="range"/>
<volume-transition range="{(('page', 'sheet')[.=$range], 'page')[1]}">
Expand All @@ -339,9 +339,9 @@
</sequence-interrupted>
</volume-transition>
</xsl:function>

<xsl:function name="obfl:insertPostContentNotes">
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<xsl:param name="footnotesInFrontMatter" as="xs:integer"/>
<!-- count(//dtb:note[key('noterefs', @id)[ancestor::dtb:frontmatter]]) -->
<!-- count(//dtb:note[key('noterefs', @id)[ancestor::dtb:frontmatter]]) -->
<xsl:param name="footnotesNotInFrontMatter" as="xs:integer"/>
Expand Down Expand Up @@ -381,7 +381,7 @@
</dynamic-sequence>
</xsl:if>
</xsl:function>

<xsl:function name="obfl:insertCoverPage">
<xsl:param name="title"/>
<!-- /dtb:dtbook/dtb:book/dtb:frontmatter/dtb:doctitle -->
Expand Down Expand Up @@ -410,12 +410,12 @@
</xsl:otherwise>
</xsl:choose>
<block align="center" margin-left="2" margin-right="2" vertical-align="before" vertical-position="100%" hyphenate="false"><evaluate expression="
(if (&gt; $volumes 1)
(if (&gt; $volumes 1)
(format &quot;{$l10nTocVolumeXofY}&quot; (int2text (round $volume) {$l10nLang}) (int2text (round $volumes) {$l10nLang}))
&quot;{$l10nTocOneVolume}&quot;)"/></block>
</sequence>
</xsl:function>

<xsl:function name="obfl:insertProcessorRenderer">
<file-reference uri="split-table.xsl">
<xsl:copy-of select="document('split-table.xsl')"/>
Expand All @@ -437,7 +437,7 @@
</rendering-scenario>
</renderer>
</xsl:function>

<xsl:function name="obfl:insertColophon">
<xsl:param name="node" required="yes"/>
<xsl:for-each select="$node">
Expand All @@ -450,7 +450,7 @@
</sequence>
</xsl:for-each>
</xsl:function>

<xsl:function name="obfl:insertBackCoverTextAndRearJacketCopy">
<xsl:param name="node" required="yes"/>
<xsl:for-each select="$node">
Expand Down

0 comments on commit e29dd83

Please sign in to comment.