Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Add E-pub tests and CSS updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ammar.usama@nlb.no committed May 14, 2016
1 parent 6549e0d commit 2bcffce
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 95 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/css/nlb-default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ line , p.line
/* Lists */
/* -------------------------------------------------------------------------- */

list
list , ul , ol
{
margin-left: 2;
text-indent: -2;
Expand All @@ -452,17 +452,17 @@ li
text-align: left;
display: list-item;
}
list
list , ul , ol
{
counter-reset: list-item;
}

list[type=ul]
list[type=ul] , ul
{
list-style-type: '';
}

list[type=ol]
list[type=ol] , ol
{
list-style-type: decimal;
}
Expand Down
5 changes: 3 additions & 2 deletions src/test/resources/EPUB/content-2.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
<p>NLB er et bibliotek som produserer og låner ut lydbøker og punktskriftbøker til blinde, svaksynte og andre som har vansker med å lese trykt tekst. Mange av NLBs lånere har dysleksi eller
andre lese- og skrivevansker. Biblioteket er for lånere fra hele landet.</p>
<p>Det er gratis å låne bøker fra NLB.</p>
<p>Våre avdelinger er:</p>
<!--
<p>Våre avdelinger er:</p>
<ul>
<li>Administrasjonsavdelingen</li>
<li>Utlåns-/formidlingsavdelingen</li>
<li>Informasjonsavdelingen</li>
<li>Innlesingsavdelingen</li>
<li>Utviklingsavdelingen</li>
</ul>
<!--
<table>
<caption>Åpningstider</caption>
<thead>
Expand Down
37 changes: 11 additions & 26 deletions src/test/resources/EPUB_1/content-1.xhtml
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"
epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<head>
<meta charset="UTF-8" />
<title>Testbok</title>
<meta name="dc:identifier" content="123456" />


</head>
<body epub:type="chapter">
<div epub:type="pagebreak" id="page-1" class="page-normal">1</div>
<h1 id="h1-1">Testbok</h1>
<section epub:type="z3998:poem" class="poem">
<div epub:type="z3998:verse" class="verse linegroup">
<p class="line">Liten?</p>

<p class="line">Liten?</p>
</div>
</section>

<div epub:type="pagebreak" id="page-2" class="page-normal">2</div>
<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>

<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>
<div epub:type="pagebreak" id="page-3" class="page-normal">3</div>
<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>

<ul>
<li>aaa aaa</li>
<li>bbb bbb
<ul>
<li>lll lll</li>
<li>rrr rrr</li>
<li>aaa aaa </li>
</ul>
</li>
<li>ccc ccc</li>
</ul>

<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>
</body>
</html>
11 changes: 9 additions & 2 deletions src/test/resources/EPUB_1/content-2.xhtml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"
epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<head>
<meta charset="UTF-8" />
<title>Testbok</title>
<meta name="dc:identifier" content="123456" />
</head>
<body epub:type="chapter">
<body epub:type="bodymatter part" >
<div epub:type="pagebreak" id="page-2" class="page-normal">2</div>
<h1 id="h1-2">NLB </h1>
<p>NLB er et bibliotek .</p>
<p>Våre avdelinger er:</p>
<div class="page-normal" epub:type="pagebreak" id="page-8" title="8"></div>
<p>aa</p>
<p>bb</p>
<div class="page-normal" epub:type="pagebreak" id="page-9" title="9">9</div>
<p>cc</p>


</body>
</html>
29 changes: 29 additions & 0 deletions src/test/resources/EPUB_2/content-1.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"
epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<head>
<meta charset="UTF-8" />
<title>Testbok</title>
<meta name="dc:identifier" content="123456" />


</head>
<body epub:type="chapter">
<div epub:type="pagebreak" id="page-1" class="page-normal">1</div>
<h1 id="h1-1">Testbok</h1>
<section epub:type="z3998:poem" class="poem">
<div epub:type="z3998:verse" class="verse linegroup">
<p class="line">Liten?</p>
</div>
</section>
<div epub:type="pagebreak" id="page-2" class="page-normal">2</div>
<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>
<div epub:type="pagebreak" id="page-3" class="page-normal">3</div>
<p class="line">side 2</p>
<p class="line">abc</p>
<p class="line">lll</p>
</body>
</html>
36 changes: 36 additions & 0 deletions src/test/resources/EPUB_2/content-2.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"
epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<head>
<meta charset="UTF-8" />
<title>Testbok</title>
<meta name="dc:identifier" content="123456" />
</head>
<body epub:type="bodymatter part">
<div epub:type="pagebreak" id="page-2" class="page-normal">2</div>
<h1 id="h1-2">NLB </h1>
<p>aaa.</p>
<ul>
<li>aaa aaa</li>
<li>bbb bbb <ul>
<li>lll lll</li>
<li>rrr rrr</li>
<li>aaa aaa </li>
</ul>
</li>
<li>ccc ccc</li>
</ul>
<p>bbb</p>
<ol>
<li>aaa aaa</li>
<li>bbb bbb <ol>
<li>lll lll</li>
<li>rrr rrr</li>
<li>aaa aaa </li>
</ol>
</li>
<li>ccc ccc</li>
</ol>
</body>
</html>
26 changes: 26 additions & 0 deletions src/test/resources/EPUB_2/nav.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xml:lang="no" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/#">
<head>
<meta charset="UTF-8" />
<title>Testbok</title>
<meta name="dc:identifier" content="123456" />
</head>
<body>
<nav epub:type="toc">
<h1>Innholdsfortegnelse</h1>
<ol>
<li>
<a href="content-1.xhtml#h1-1">
<span>Testbok</span>
</a>
</li>
<li>
<a href="content-2.xhtml#h1-2">
<span>NLB - Norsk lyd- og blindeskriftbibliotek</span>
</a>
</li>
</ol>
</nav>
</body>
</html>
21 changes: 21 additions & 0 deletions src/test/resources/EPUB_2/package.opf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="pub-identifier" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
<metadata>
<dc:identifier id="pub-identifier">123456</dc:identifier>
<dc:title>Testbok</dc:title>
<dc:language>no</dc:language>
<dc:creator>Norsk lyd- og blindeskriftbibliotek</dc:creator>
<dc:date>2016-03-01</dc:date>
<dc:publisher>NLB</dc:publisher>
</metadata>
<manifest>
<item id="item_1" media-type="application/xhtml+xml" href="content-1.xhtml"/>
<item id="item_2" media-type="application/xhtml+xml" href="content-2.xhtml"/>
<item id="item_3" media-type="application/xhtml+xml" href="nav.xhtml" properties="nav"/>
</manifest>
<spine>
<itemref id="itemref_1" idref="item_1"/>
<itemref id="itemref_2" idref="item_2"/>
</spine>
</package>
14 changes: 2 additions & 12 deletions src/test/xprocspec/test_dtbook-to-pef.xprocspec
Original file line number Diff line number Diff line change
Expand Up @@ -1026,18 +1026,15 @@
<level1>
<h1>aaa</h1>
<p>lll</p>
<!-- sami s and short and long dashes-->
<p>Ṥ ṥ á</p>
<p>kort- lang—</p>
</level1>

<level1>
<h1>bbb</h1>
<p>lll</p>
</level1>




</level1>
</bodymatter>
</book>
</dtbook>
Expand Down Expand Up @@ -2008,11 +2005,4 @@
</x:scenario>









</x:description>
Loading

0 comments on commit 2bcffce

Please sign in to comment.