DTBook To ZedAI Conversion Rules

This page gives the conversion mappings used in the DTBook-To-ZedAI module.

Table of contents


DTBook element: a

ZedAI element: ref

Dropped attributes: @type, @hreflang, @accesskey, @tabindex

Adjustments:

Notes:

If dtbook:a@external = true, then we use @xlink:href instead of @ref.


DTBook element: abbr

ZedAI element: abbr @type='truncation'

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span role=’cite’`, but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


DTBook element: acronym

ZedAI element: abbr

Notes:

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span role=’cite’, but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


DTBook element: address

ZedAI element: address

Adjustments:


DTBook element: annoref

ZedAI element: annoref

Dropped attributes:


DTBook element: annotation

ZedAI element: annotation

Adjustments:


DTBook element: author

ZedAI element: citation or p @property='author' @about='IDREF'

author element should be made into citation except when found inside poem/blockquote/cite, then use p @property/@about

Adjustments:


DTBook element: bdo

ZedAI element: span @its:dir="rtl|ltr"

Adjustments:


DTBook element: blockquote

ZedAI element: quote


DTBook element: bodymatter

ZedAI element: bodymatter


DTBook element: book

ZedAI element: body


DTBook element: br

ZedAI element: use ln to wrap lines


DTBook element: bridgehead

ZedAI element: hd

Adjustments:


DTBook element: byline

ZedAI element: citation or p @role="periodicals:byline"

Notes: for most book (non-article) use cases, byline can be citation. The exception would be anthologies, for which we can call upon the periodicals vocab and actually use "role = byline". For now, we will use just 1 vocabulary in this converter.

Adjustments:


DTBook element: caption

ZedAI element: caption

Adjustments:


DTBook element: cite

ZedAI element: citation

Adjustments:


DTBook element: code

ZedAI element: code

Adjustments:


DTBook element: col

ZedAI element: col

CSS: @align, @valign, @width (all to go in CSS)


DTBook element: colgroup

ZedAI element: colgroup

CSS: @align, @valign, @width


DTBook element: covertitle

ZedAI element: block @role='covertitle'

Adjustments:


DTBook element: dateline

ZedAI element: p @role="time"

Notes: Used p since ln is not suitable for all content models (e.g. level>dateline cannot be translated as section>ln)

Adjustments:


DTBook element: dd

ZedAI element: definition

Adjustments:


DTBook element: dfn

ZedAI element: term

Adjustments:


DTBook element: div

ZedAI element: block

Adjustments: Normalize block/inline content model: if mixed, wrap inlines in p element.


DTBook element: dl

ZedAI element: list

Adjustments: either wrap each term, definition in its own item element, or combine them into one item element


DTBook element: docauthor

ZedAI element: p @property="author"

Adjustments:


DTBook element: doctitle

ZedAI element: p @property="title" or h @property="title" when child of the frontmatter

Adjustments:


DTBook element: dt

ZedAI element: term

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span @role='cite', but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


DTBook element: dtbook

ZedAI element: document

Notes: Reference default ZedAI book profile and default vocabulary.


DTBook element: epigraph

ZedAI element: block @role="epigraph"

Adjustments:


DTBook element: em

ZedAI element: emph

Adjustments:


DTBook element: frontmatter

ZedAI element: frontmatter

Notes: A section is created automatically containing doctitle, docauthor, covertitle. The reason is that DTBook can have that info free-floating, whereas ZedAI must have only toc/section/biblio/glossary children and so we have to contain that info in a section element.


DTBook element: h1

ZedAI element: h

Adjustments:


DTBook element: h2

ZedAI element: h

Adjustments:


DTBook element: h3

ZedAI element: h

Adjustments:


DTBook element: h4

ZedAI element: h

Adjustments:


DTBook element: h5

ZedAI element: h

Adjustments:


DTBook element: h6

ZedAI element: h

Adjustments:


DTBook element: hd

ZedAI element: hd

Adjustments:


DTBook element: head

ZedAI element: head

Notes:


DTBook element: img

ZedAI element: object

Notes:


DTBook element: imggroup

ZedAI element: block (with @role='figure' if a caption is present)

Notes:


DTBook element: kbd

ZedAI element: code

Adjustments:


DTBook element: level

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level1

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level2

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level3

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level4

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level5

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: level6

ZedAI element: section

Adjustments: Mixed section/block content model


DTBook element: lic

ZedAI element: span


DTBook element: line

ZedAI element: ln

Adjustments:


DTBook element: linegroup

ZedAI element: block


DTBook element: linenum

ZedAI element: lnum


Discarded


DTBook element: li

ZedAI element: item

Adjustments:


DTBook element: list

ZedAI element: list

Adjustments: wrap dtbook:prodnote and dtbook:hd


DTBook element: meta

ZedAI element: meta

Notes: See https://github.com/daisy/pipeline/issues/56


DTBook element: note

ZedAI element: note

Adjustments: Normalize block/inline content model: if mixed, wrap inlines in p element.


DTBook element: noteref

ZedAI element: noteref

Dropped: @type (“Type provides advisory content MIME type of the targeted id, see RFC1556.”)


DTBook element: p

ZedAI element: p

Adjustments:


DTBook element: pagenum

ZedAI element: pagebreak


DTBook element: poem

ZedAI element: block @role="poem"


DTBook element: prodnote

ZedAI element: annotation @by="republisher"

Adjustments:


DTBook element: q

ZedAI element: quote

Adjustments:


DTBook element: rearmatter

ZedAI element: backmatter


DTBook element: samp

ZedAI element: block @role="example"

Notes: in DTBook, it seems like samp can be both block and inline. There are cases when it is be best translated as a zedai:span instead. In this case, the content model needs to be adjusted for inline-only.

Adjustments:


DTBook element: sent

ZedAI element: s

Adjustments:


DTBook element: sidebar

ZedAI element: aside @role="sidebar"

Adjustments:


DTBook element: span

ZedAI element: span

Adjustments:


DTBook element: strong

ZedAI element: emph

Adjustments:


DTBook element: sub

ZedAI element: sub

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span @role='cite', but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


DTBook element: sup

ZedAI element: sup

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span role=’cite’, but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


DTBook element: table

ZedAI element: table

CSS: @width, @border (border width), @cellspacing, @cellpadding

Adjustments:

Notes: See https://github.com/daisy/pipeline/issues/58


DTBook element: tbody

ZedAI element: tbody

CSS: @align, @valign


DTBook element: td

ZedAI element: td

CSS: @align, @valign

Adjustments:


DTBook element: tfoot

ZedAI element: tfoot

CSS: @align, @valign


DTBook element: th

ZedAI element: th

CSS: @align, @valign

Adjustments:


DTBook element: thead

ZedAI element: thead

CSS: @align, @valign


DTBook element: title

ZedAI element: p @property='title' @about='IDREF'

Adjustments:


DTBook element: tr

ZedAI element: tr

CSS: @align, @valign


DTBook element: w

ZedAI element: w

Adjustments:

The following are rather meaningless in this context, so translate them as span. Would be nice to carry the original intent along, such as span @role='cite', but there aren’t roles for them all.

These are a little trickier as they (may) reference something else, but as there is no allowed child element in ZedAI which may contain a link or reference, that information is not carried along. This is an unlikely scenario.


Common Attributes