Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for generated content #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 60 additions & 2 deletions src/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@
</li>
</ul>
</li>
<li class="requirement priority_1" id="4.7:96">
<li class="requirement priority_1 changed" id="4.7:96">
<h3>
<a class="req-nr" href="#4.7:96">4.7:96</a>
The system shall support automatic insertion of content that is not present in the
Expand All @@ -1248,8 +1248,51 @@
<li> etc. </li>
</ul>
</h3>
<p>
NLB examples:
</p>
<ul>
<li class="example">
<a class="test-src" href="test/generated-content/test.xprocspec#test1">
Optional text preceding sidebar ("Margin text:")
</a>
</li>
<li class="example">
<a class="test-src" href="test/generated-content/test.xprocspec#test2">
Boilerplate text on the title page ("NLB, Norge 2015" and "Volume x of y") and
optional text preceding sidebar ("Margin text:")
</a>
</li>
</ul>
<p>
Explanation:
</p>
<ul>
<li>
The title page has an example of boiler text: "NLB Norge 2015" and "Hefte 1 av 2". The
year changes automatically in NorBraille every new year. NorBraille is not an open
source tool and we can not edit the template/the title page unless we do it manually
in the PEF file. "Volume number x of y" is printed on every titlepage. The dividing
into volumes happens in NorBraille.
</li>
<li>
On the third page of the second example is a standard text "Om boka" ("About the
book") that is inserted automatically in the first volume of all productions. It has
standard text as "Uncontracted braille" and "The book shall not be returned".
</li>
<li>
Text in the margin (in the original book, sidebar in XML) gets an automatic inserted
word in our braille books ("Margtekst:")
</li>
</ul>
<p>
<a class="test-src" href="test/generated-content/test.xprocspec#test3">
SBS example: boilerplate added when breaking into volumes: "End of volume x" and
"Chapter x (continuation)"
</a>
</p>
</li>
<li class="requirement priority_2" id="4.7:95">
<li class="requirement priority_2 changed" id="4.7:95">
<h3>
<a class="req-nr" href="#4.7:95">4.7:95</a>
The system shall support insertion of content that is not present in the source, through
Expand All @@ -1264,6 +1307,21 @@
<li> etc. </li>
</ul>
</h3>
<p>
SBS examples of freely definable one-character marks inserted in the left margin:
</p>
<ul>
<li class="example">
<a class="test-src" href="test/generated-content/test.xprocspec#test4">
Example 1: "." indicates new print page, "+" indicates difficult task
</a>
</li>
<li class="example">
<a class="test-src" href="test/generated-content/test.xprocspec#test5">
Example 2: "." indicates new print page, "R" indicates tactile graphic available
</a>
</li>
</ul>
</li>
<li class="requirement priority_1" id="4.7:97">
<h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dtbook
PUBLIC "-//NISO//DTD dtbook 2005-3//EN" "http://www.daisy.org/z3986/2005/dtbook-2005-3.dtd">
<dtbook xmlns="http://www.daisy.org/z3986/2005/dtbook/" xml:lang="no" version="2005-3"><head>
<meta name="dtb:uid" content="test"/>
<meta name="dc:Title" content="Automatic insertion of content test"/>
<meta name="dc:Identifier" content="test"/>
<meta name="track:Guidelines" content="2015-1"/>
<meta name="track:Supplier" content=""/>
<meta name="dc:Language" content="no"/>
<meta name="dc:Format" content="DTBook"/>
<meta name="dc:Creator" content="Kari"/>
<meta name="dc:Contributor" content=""/>
<meta name="dc:Source" content=""/>
<meta name="dc:Date" content="2015-06-15"/>
<meta name="dc:Publisher" content="NLB"/>
<meta name="dcterms:modified" content="2015-05-21T15:12:03+00:00"/>
</head><book><frontmatter>
<doctitle>Automatic insertion of content test 4.7.96</doctitle>
<docauthor>Kari</docauthor>
</frontmatter>
<bodymatter>
<level1>
<pagenum id="p10" page="normal">10</pagenum>
<h1>4.7.96. Automatic insertion of content test</h1>
<level2>
<h2>Auomtaic insertion of content on title page</h2>
<p>The title page has example of boiler text: <em>NLB Norge 2015</em> and <em>Hefte 1 av 2</em>. The year changes automatically in NorBraille every new year. NorBraille is not an open source tool and we can not edit the template/the title page unless we do it manually in the PEF file. Volume number x of y is printed on every titlepage. The dividing into volumes happens in NorBraille.</p>
</level2>
<level2>
<h2>"About the book" - Standard text in first volume</h2>
<p>On the third page is a standard text "Om boka" ("About the book") that is inserted automatically in the first volume of all productions. It has standard text as "Unconctracted braille" and "The book shall not be returned".</p>
</level2>
<level2>
<h2>Text in margin/Sidebar</h2>
<p>Text in margin (in original book) is an example of text that get an automatic inserteed word in our braille books (Margtekst:)</p>
<sidebar render="required">
<p>This is an example of margin tekst, and you will in the PEF se that the word "Margtekst" is added by NorBraille.</p>
</sidebar>
</level2>
</level1>
</bodymatter>
</book>
</dtbook>
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<_ xml:lang="no">
<p>der 50&#x2013;100 m fra farestedet. Er det fare p&#x00E5; en bestemt strekning, blir det opplyst om det med underskilt. Underskilt kan ogs&#x00E5; gi andre opplysninger om faren. M&#x00F8;ter du et fareskilt m&#x00E5; du v&#x00E6;re klar til &#x00E5; sette ned farten.</p>
<!-- with optional in the following sidebar NorBraille adds the text Margtekst: -->
<sidebar render="optional">
<p>Tenk over: Hvorfor er fareskilt plassert 150&#x002D;250 meter fra farestedet utenfor tettbygde str&#x00F8;k, og 50&#x002D;100 meter fra farestedet i tettbygde str&#x00F8;k?</p>
</sidebar>
<level4>
<pagenum id="page-14" page="normal">14</pagenum>
<h4>Vikeplikts&#x002D; og forkj&#x00F8;rsskilt</h4>
<imggroup>
<img src="14_img01.jpg" alt="image"/>
</imggroup>
<p>Vikeplikts&#x002D; og forkj&#x00F8;rsskiltene angir hvem som har vikeplikt, og hvem som har forkj&#x00F8;rsrett p&#x00E5; en bestemt strekning eller et sted.</p>
</_>
Loading