started work on validator. added more tests for dtbook-to-epub3.
a bunch more xspec tests and bugfixes for dtbook-to-epub3
updated to work with pipeline v1.7
done writing tests for dtbook-to-epub3.xsl
lots of updates to tests, xslts and schema

general
-------
* minor update to README
* added deep-level-grouping.xsl: will handle deeply nested headline levels (and similar)

html5-strict.rng
----------------
* the top-level doctitle, covertitle and docauthor elements now maps to a header element in the single-page html equivalent. cover and titlepage sectioning elements are no longer created or checked during conversion
* book/frontmatter/doctitle maps to body/header/h1, while all other doctitles maps to p
* all covertitles maps to p
* docauthors must now have a class of 'docauthor'
* covertitle no longer creates a meta element

dtbook-to-epub3.xsl
-------------------
* no longer create cover or titlepage based on doctitle/covertitle/docauthor
* "jacketcopy" is now interpreted as "cover"
* excluded a bunch of classes that were added during conversion
* if caption precedes first img, collect captions in figcaption at start of figure; otherwise collect captions in figcaptions at end of figure
* create empty divs with img-caption classes for img elements without a corresponding caption (only when in a imggroup and at least one other img has a caption); this allows us to map the caption directly to the img if converting back to dtbook.
* precedingemptyline class is removed (a preceding hr is already added)
* doctitle becomes a h1 when it's a direct child of frontmatter; otherwise it becomes a p
* docauthor class added to docauthor paragraphs (improves conversion back to dtbook)

epub3-to-dtbook.xsl
-------------------
* rename lang attributes to xml:lang
* excluded a bunch of classes that were added during conversion
* <dtbook:meta name="dc:title"/> is constructed based on <html:title/> unless <html:meta name="dc:title"/> exists, in which case html:title is discarded
* fix: template matching link didn't work
* including the rev attribute on a elements
* pagebreaks can now also be div, not just span
* including the page attribute on pagenum
* prettier id attributes
* if figcaption is at start of figure; make captions precede their corresponding img elements; otherwise let them follow
* docauthors must now have the 'docauthor' class
* h1-h6 elements are given names based on their level, not based on their name
* changed name of class from imggroup-caption to img-caption for img captions

dtbook-to-epub3.xspec
---------------------
* a bunch of updates to the inputs/outputs according to changes in the markup and schema

epub3-to-dtbook.xspec
---------------------
* a bunch of updates to the inputs/outputs according to changes in the markup and schema
* added a lot of tests for different kinds of elements; only lists and tables remaining
fix: xs:int doesn't work with saxon-he, changed to xs:integer
fix: removed log statements, fixed deep-level-grouping runtime errors
dtbook validator, dtbook-to-epub3 input validation, tpb sch, levels

 * added "Nordic DTBook Validator" script
 * added input validation for DTBooks to the "DTBook to EPUB3" script
 * DTBook validation validates against:
   * the generic DTBook schemas (RNG derived from the original DTDs) bundled with DP2 (and provided as its own script in the default distribution)
   * the nordic dtbook schema (RNG based on the original DTDs but modified for our needs)
   * TPBs Schematron rules (moved to the ISO Schematron namespace)
 * added DTD reference to DTBook output in "EPUB3 to DTBook" script (fixes #11)
 * removed default CSS from DTBook output (fixes #7)
 * sections with missing headlines are now counted correctly (fixes #8 and fixes #9)
added initial nordic epub3 validation script (includes OPF assertions)
Fixed OPF assertions. Added xprocspec test for epub3 validator.

* added xprocspec test support
* added xprocspec test for epub3 validator
* added epub3 test book that is supposed to be valid according to nordic guidelines
* fixed OPF assertions
    * dc:identifier and dc:title must be present (fixes #16)
    * removed test for `dc:date/@scheme` - scheme is not an allowed attribute on dc:date
fixed generic validation, test dtbook, impl. xml declaration test

* updated xproc-maven-plugin plugin, and commented it out since it doesn't currently work with xml catalogs
* changed charset from 'utf-8' to 'UTF-8' in schemas etc. The DTBook output still gets the encoding in lower case in the xml declaration though, due to the underlying implementation of p:store. The encoding attribute is case insensitive anyway, but at least in the meta elements we should probably try to enforce a convention.
* added reminder warning message to the epub3 validator about validating using epubcheck as well. epubcheck is still not implemented into pipeline 2.
* fixed issue with invalid DTBooks (generic validation); an error message instead of validation errors were shown.
* cleaned up html-to-dtbook.convert.xpl a bit, as well as fixed some issues
* added DTBook for testing (should be valid according to guidelines)
* updated test epub
* created packaged version of test epub
* implemented xml declaration assertion which lets xprocspec test whether a file contains the xml declaration or not
epub3-to-dtbook: file structure, doctype and xml declaration

- implemented px:fileset-move (changes fileset base URI without changing the file hrefs; also updates in-memory base URIs)
- epub3-to-dtbook: output DTBook is saved as `{dc:identifier}/{dc:identifier}.xml`, fixes #13
- epub3-validator: changed required content folder from "OEBPS" to "EPUB", fixes #17
- epub3-to-dtbook: images are now moved from the "images" folder and into the same folder as the output DTBook, and all image references are updated (`img/@src` and `object/@data`), fixes #14
- epub3-to-dtbook: doctype is now included, fixes #11
- epub3-to-dtbook: made sure that the xml declaration is included in the result, fixes #10
see full commit comment (tests, bugs, validation)

- added schemas to xml catalog
- html rng:
  - renamed from html5-strict.rng to nordic-html5.rng
  - allow style in head
  - moved all schematron rules into nordic2015-1.sch
  - require header element in single-html books
  - allow navigation documents as content documents
  - cover must be top level section
  - allow div as pagebreak
  - allow h1-h6 (instead of just h1) as title (as in a poem)
  - made the table style attribute optional
- created nordic2015-1.sch based on tpb2011-2.sch
  - still very much a WIP
- renamed px:nordic-dtbook-validate.validate to px:nordic-dtbook-validate.step
- added report to epub3-to-dtbook script
- added epub3 / html / dtbook validation to epub3-to-dtbook
- epub3-to-html now creates a header element at the top of the body element, containing what will become the doctitle, covertitle, and docauthor elements
- epub3-to-html adds xml:lang to the top-level html element, based on the dc:language metadata
- epub3-to-html: output fileset only contains one instance of each file if a file occurs multiple times (for instance images used multiple times)
- created px:nordic-html-validate.step which validates a document according to both nordic-html5.rng and nordic2015-1.sch
- implemented a pretty-print XSLT for easier debugging
- fixed deep-level-grouping.xsl which nested the levels incorrectly
- epub3-to-dtbook.xsl
  - ability to call the "attrs" (and similar) templates without including any classes (set except-classes to '*')
  - added dtb:uid to metadata
  - made dublin core metadata lower case
  - don't convert the 'viewport' meta element or any element which does not contain both a name and a content attribute
  - change track:Guidelines to '2011-2'
  - moved pagebreaks directly following a headline to before the headline
  - z3998:author becomes `<author>` if not in header, otherwiser `<docauthor>`
  - notes and noterefs does not get a class attribute
  - all lists become preformatted and prepended with "• "
  - thead, tbody and tfoot is not used; replacing with their tr children
  - remove elements: link, colgroup, col
  - replace with p: address, annotation, epigraph, covertitle, bridgehead
  - replace with span: a, byline, dateline, dfn, cite, abbr, acronym, bdo, sent, w, annoref
  - replace with code: kbd, samp
  - added xsl:message for disallowed elements etc.
- navigation document gets a epub:prefix attribute so that it can be used as a content document
- automatically generated metadata: `<meta charset="UTF-8" />`
- automatically generated metadata: `<meta name="viewport" content="width=device-width" />`
- automatically generated metadata: `<meta name="track:Guidelines" content="2015-1" />`
- meta id not copied from opf to html
- made DTBook sample valid
- made EPUB3 sample valid
- added valid intermediary HTML
- added XSLT tests: deep-level-grouping
- added XProc tests: dtbook.validate, epub3-to-html.convert, html.validate
- updated XProc tests: epub3-to-dtbook, html-to-dtbook.convert
attempt to fix xslt error

```
2014-02-07 15:31:01,435 [ERROR] com.xmlcalabash - bundle://149.1:1/xml/xslt/deep-level-grouping.xsl:234:err:XTSE0090:Attribute @required is not allowed on element <xsl:param>
2014-02-07 15:31:01,444 [ERROR] com.xmlcalabash - Failed to compile stylesheet. 1 error detected.
```
more tests, updated validation and converters (see full commit log)

removed oxygen project descriptor from revision control

nordic html
 * added namespace with prefix "nordic" and URI "http://www.mtm.se/epub/"
 * changed track:Guidelines and track:Supplier to nordic:guidelines and nordic:supplier
 * allowed h1-h6 instead of only h1 in poems etc. (was hd in dtbook)
 * tbody are now required in table; direct tr children are not allowed anymore
 * added cover to schema rule tpb08
 * allowed div for pagebreak
 * rules only relevant for intermediary html: tpb10, tpb12, tpb13
 * simplified tpb14
 * disabled tpb18
 * replaced elements with their html equivalents: linenum, noteref, lic, sent, w, author, bridgehead, byline, covertitle, dateline, docauthor, doctitle, hd, line
 * fixed tpb23, tpb24
 * added MTM and SBS to list of allowed publishers ('TPB', 'MTM', 'SPSM', 'Nota', 'NLB', 'Celia', 'SBS')
 * fixed tpb105 (one of the following classes are now required on pagebreaks: 'page-front', 'page-normal', 'page-special')
 * tpb29: allowed text siblings to block content in "li" elements so that bullets (• ) can be prepended to list items
 * nordic229: sidebars must have either a render-required or a render-optional class
 * nordic246/nordic:247: the element with epub:type="fulltitle" must be a h1 (used for the intermediary html; becomes doctitle in dtbook)
 * nordic248: in the intermediary html, the only allowed content in the main header other than h1 is docauthor and covertitle
 * nordic251: the parent of a lic must be a li
 * nordic254: the aside elements must have one of the following epub:types: 'z3998:production','sidebar','note','annotation','epigraph'

tpb2011-1.sch
 * added MTM and SBS to list of publishers
 * disabled class restriction rules for levels

script: dtbook-to-epub3
 * renamed option from input-dtbook to dtbook
 * added option for discarding or including the intermediary html
 * added option for whether or not validation errors are fatal
 * refactored dtbook-to-epub3.convert.xpl into dtbook-to-html.convert.xpl and html-to-epub3.convert.xpl
 * filename based on 'dtb:uid' in dtbook
 * added cleanup of the generated navigation documents to make sure they conform to the guidelines
 * don't generate id attribute on body element
 * set default bodymatter type to chapter
 * added nordic namespace
 * fixed header content
 * prefix all img src attributes with "images/"
 * fixed image captions. Each dtbook caption element maps to a div element with class "img-caption" inside the html figcaption element
 * fixed some bugs

script: dtbook-validate
 * renamed option from input-dtbook to dtbook
 * added validation of all content documents (including the navigation document)

script: epub3-to-dtbook
 * added option for discarding or including the intermediary html
 * added option for whether or not validation errors are fatal
 * added assertion for navigation document (will throw error)
 * the epub:type "cover" is mapped to the dtbook class "jacketcopy"
 * fixed precedingemptyline
 * the html title element now always becomes meta dc:Title in dtbook, even if there's already a meta dc:title in the html.
 * meta dc:title in html are dropped
 * set dc:Format to DTBook
 * made all dublin core metadata capitalized
 * if there's no render-* class, use render="optional"
 * added 'abbr' class to abbreviations
 * fixed incorrect epub:type "acronym"; should be "z3998:acronym"
 * added 'acronym' class to acronyms
 * added 'bdo' class to bdo
 * fulltitle should only become doctitle when inside main header element (the fulltitle type can also be used for instance on the titlepage)
 * covertitle is not allowed in nordic dtbook; dropping it
 * added 'bridgehead' class to bridgeheads
 * added 'lic' class to lic
 * fixed table body rows not being included in the result
 * excluded table-rules-* and table-frame-* classes from table classes
 * allowed thead
 * allowed tfoot
 * allowed tbody

integration/unit testing:
 * updated sample books (dtbook, intermediate html, epub3)
 * xproc
   * added tests: dtbook-to-epub3
   * updated tests: dtbook.validate, epub3-to-dtbook, epub3-to-html.convert, epub3.validate
 * xslt
   * updated tests: dtbook-to-epub3, navdoc-to-outline, opf-to-html-metadata
   * finished the tests for all elements in epub3-to-dtbook (includes tables)

XProc step library:
 * exposed more steps in case third-party developers wants to use them easily
made regression test file DTB09317.epub valid
using nested figures for image sequences. ncx must be named "nav.ncx".
epubcheck, build info, metadata fixes, validation improvements, ++

added build info to script descriptions
added bash script for setting the build number and build time according to the git commit log
converted OPF validator from XSLT to Schematron
removed nordic:guidelines meta requirement from RelaxNG (fixed #43)
restricted nordic:* metadata check to single-document representation in Schematron
nordic2015-1.sch: fixed tpb123, tpb127, tpb128
better formatting of HTML reports
including patched version of px:fileset-store which allows for storing the xml declaration in zips
including patched version of px:unzip-fileset which allows for unzipping XML files using base64 encoding (allowing for unzipping of xml declarations)
added option "ignore-missing-images" to dtbook validator
images must always be present when converting from dtbook to epub3
epub3 validation includes epubcheck validation for generic epub3 conformance
epubs in the epub validator ar unzipped byte-for-byte (thus including their xml declaration)
epub3-validator new requires that all XML documents (XHTML, OPF, SMIL, etc) has an xml declaration
loading and storing all xhtml files as xml instead of xhtml" (avoids any serialization/parsing performed by the xproc processor)
intermediary xhtml representation now refers to images in the images directory instead of the same directory as itself; images are now instead moved during the conversion between dtbook and the intermediary xhtml instead of between the intermediary xhtml and epub3
id's are no longer explicitly set to pub-title, pub-language, pub-creator, pub-contributor and source-id for dublin core title, language, creator, contributor and source respectively (in the OPF); fixes #48
added dublin core namespace declaration to the opf
including track:Supplier in the resulting dtbook
including nordic prefix in the opf (fixes #
added xsl:message statements for meta elements that are dropped from the html metadata when converting to opf metadata
including nordic:guidelines and nordic:supplier in the opf (fixes #27, fixes #28)
added XProc tests: dtbook-to-html.convert, html-to-epub3.convert
fixed XProc tests: epub3.validate, html-to-dtbook.convert
fixed XSLT test: opf-to-html-metadata
fixed build bug, filenames, tests, epubcheck, etc.

* fixed build version statement; version is now read from a separate xml file and output as the first message during conversion instead of in the script description (maven filtering didn't work well with osgi service descriptor generation)
* nordic2015.sch: allow empty pages
* switched from px:fileset-store to pxi:fileset-store (allows for storing html as xml)
* added copy of patched epub3-nav-utils which contains several fixes, will revert to default version when patched version is included in the next release of dp2
* added copy of i18n-translate which will be included in the default dp2 distribution in the next official release
* added epub3 validation for unique ids across all XML files (XHTML, OPF, NCX, SMIL, etc.)
* added dc:identifier to navigation document
* fixed issue with epubcheck-report-to-pipeline-report.xsl message parsing
* content files are now named `[identifier]-[xxx]-[type].xhtml`
* chapters in parts are now properly extracted
* when joining multiple html-files, `doc[x]_` are no longer prepended to the ids, since all ids must now be unique in the first place
* added xprocspec test: html-split.split.xprocspec
* minor fix in html-to-dtbook.convert.xprocspec
* updated html-to-epub3.convert.xprocspec to have the correct filenames for the content files (`[identifier]-[xxx]-[type].xhtml`) and include the chapters which are contained in parts
* fixed duplicate id in test book
* fixed missing dtb:uid in test ncx
* added dc:identifier to xslt test: split-html.annotate.xspec
* fixed split-html.annotate.xspec to account for the chapters that are contained in parts and updated filenames
legacy mode, image series, ++

# Script options

* dtbook-to-epub3: added "no-legacy" and "strict" options
  * no-legacy can be disabled to allow migration of existing dtbooks
  * strict can be disabled to allow non-nordic countries to try the migrator (should also be disabled when in legacy mode)
* dtbook-validate: added "no-legacy" option (same as for dtbook-to-epub3)
* epub3-to-dtbook: added "strict" option (same as for dtbook-to-epub3)
* epub3-validate: added "strict" option (same as for dtbook-to-epub3)

# Under the hood

* added nordic2015-1.strict.sch - a schematron which validates "extra strict" stuff such as requiring pagebreaks in all files and only allowing nordic dc:publishers. Can be disabled using the option "strict".
* require 'dc:identifier' in all content documents
* allow 'figure' as html flow content
* changed sidebar from aside/section to aside/figure (depending on `@render`)
* fixed image series markup in RNG
* don't check what language is used in nordic2015-1.opf.sch
* don't check what publisher is used in nordic2015-1.opf.sch
* added filename tests to OPF
* allow <span class="lic"/> as sibling to block content
* changed prodnote from aside to section
* require content in alt attribute for meaningful images, even for non-swedish/non-english content
* require empty alt attribute for irrelevant/stylistic images
* require 'image-series' class for figure image series
* require figure with class='image' wrapping around meaningful images
* using section instead of aside/prodnote for cover (jacketcopy). Still maps to prodnote in dtbook
* allow more epub:types
* generic dtbook abbr and acronym now maps to nordic dtbook span class=truncation/initialism/acronym which maps to html5/epub3 abbr epub:type=z3998:trunctation/z3998:initialism/acronym
* renamed class "pronounce-no" to "initialism"
* tpb2011-1.sch: checking language code syntax instead of actual language code values
* dtook-legacy-fix.xsl added which cleans up old dtbooks and makes them conformant to tpb2011-1.sch
* dtbooks older than version 2005-3 are upgraded when in legacy mode
* added validation of title tags, it should now be equal to the publication title; not the first headline in the document
* sidebar not using render-required/render-optional classes anymore; intent is implied by whether it's a aside or a figure
* added parameter to epub3-to-dtbook which can be set to true to preserve links in the result (instead of converting to span); not exposed as xproc/script option yet
* mapping z3998:halftitle-page to halftitlepage and z3998:title-page to titlepage
* only a predefined set of classes is allowed in the resulting DTBook; easily controlled at the top of the XSLT
* preserving metadata with nordic: prefix in html-to-opf-metadata.xsl
* fixed make-uris-relative-to-document.xsl (easy to implement now that we require all content documents to be in the same directory)
* including dc:identifier in single-page html when converting from epub3
* improved filename generation; they are now as in the requirements: [identifier]-[xxx]-[type].xhtml
* updated tests and test documents according to changes in converter
* fixed build version message
* allowed empty pagebreaks (TODO: check if this actually works)