This page gives the conversion mappings used in the DTBook-To-ZedAI module.
aabbracronymaddressannorefannotationauthorbdoblockquotebodymatterbookbrbridgeheadbylinecaptioncitecodecolcolgroupcovertitledatelinedddfndivdldocauthordoctitledtdtbookepigraphemfrontmatterh1h2h3h4h5h6hdheadimgimggroupkbdlevellevel1level2level3level4level5level6liclinelinegrouplinenumlinklilistmetanotenoterefppagenumpoemprodnoteqrearmattersampsentsidebarspanstrongsubsuptabletbodytdtfootththeadtitletrwa
ZedAI element: ref
Dropped attributes: @type, @hreflang, @accesskey, @tabindex
Adjustments:
imggroup childrensamp
br to ln
Notes:
If dtbook:a@external = true, then we use @xlink:href instead of @ref.
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
sent becomes span role=”sentence”`prodnote becomes extract
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.
q becomes span
a becomes span
annoref, noteref become span
imggroup childrensamp
br
acronym
ZedAI element: abbr
Notes:
@pronounce="no" becomes @type="initialism"
@pronounce, becomes @type="initialism"
@pronounce="yes" becomes @type="acronym"
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
sent becomes span
prodnote becomes extract
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.
q becomes span
a becomes span
annoref, noteref become span
imggroup childrensamp
br
address
ZedAI element: address
Adjustments:
p element.br to ln
annoref
ZedAI element: annoref
Dropped attributes:
@type (“Type provides advisory content MIME type of the targeted id, see RFC1556.” –structguide)annotation
ZedAI element: annotation
Adjustments:
p element.br to ln
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:
imggroup childrensamp
br to ln
bdo
ZedAI element: span @its:dir="rtl|ltr"
Adjustments:
imggroup childrensamp
br to ln
blockquote
ZedAI element: quote
bodymatter
ZedAI element: bodymatter
book
ZedAI element: body
br
ZedAI element: use ln to wrap lines
bridgehead
ZedAI element: hd
Adjustments:
imggroup childrensamp
br to ln
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:
imggroup childrensamp
br to ln
caption
ZedAI element: caption
Adjustments:
p element.br to ln
cite
ZedAI element: citation
Adjustments:
title and author, are span instead of p
imggroup childrensamp
br to ln
code
ZedAI element: code
Adjustments:
em, strong, abbr, acronym, ln, sub, sup, span, bdo, pagenum, text
dfn, code, samp, kbd, cite, a, img, imggroup, q, sent, w, prodnote, annoref, noteref
br
col
ZedAI element: col
CSS: @align, @valign, @width (all to go in CSS)
colgroup
ZedAI element: colgroup
CSS: @align, @valign, @width
covertitle
ZedAI element: block @role='covertitle'
Adjustments:
p element.br to ln
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:
imggroup childrensamp
br to ln
dd
ZedAI element: definition
Adjustments:
imggroup childrensamp * br to ln * Re-parent list, dl, div, poem, linegroup, table, sidebar * Re-parent or re-name p, dateline, epigraph, address, author, notedfn
ZedAI element: term
Adjustments:
imggroup childrensamp
br to ln
div
ZedAI element: block
Adjustments: Normalize block/inline content model: if mixed, wrap inlines in p element.
dl
ZedAI element: list
Adjustments: either wrap each term, definition in its own item element, or combine them into one item element
docauthor
ZedAI element: p @property="author"
Adjustments:
imggroup childrensamp
br to ln
doctitle
ZedAI element: p @property="title" or h @property="title" when child of the frontmatter
Adjustments:
imggroup childrensamp
br to ln
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
sent becomes span
prodnote becomes extract
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.
q becomes span
a becomes span
annoref, noteref become span
samp
imggroup childrenbr to ln
dtbook
ZedAI element: document
Notes: Reference default ZedAI book profile and default vocabulary.
epigraph
ZedAI element: block @role="epigraph"
Adjustments:
p element.br to ln
em
ZedAI element: emph
Adjustments:
imggroup childrensamp
br to ln
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.
h1
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
h2
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
h3
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
h4
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
h5
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
h6
ZedAI element: h
Adjustments:
imggroup childrensamp
br to ln
hd
ZedAI element: hd
Adjustments:
imggroup childrensamp
br to ln
head
ZedAI element: head
Notes:
@profile is not preserved.img
ZedAI element: object
Notes:
dtbook:@longdesc is a URI which resolves to a prodnote elsewhere the bookimggroup
ZedAI element: block (with @role='figure' if a caption is present)
Notes:
prodnote descriptionskbd
ZedAI element: code
Adjustments:
dtb:code
level
ZedAI element: section
Adjustments: Mixed section/block content model
level1
ZedAI element: section
Adjustments: Mixed section/block content model
level2
ZedAI element: section
Adjustments: Mixed section/block content model
level3
ZedAI element: section
Adjustments: Mixed section/block content model
level4
ZedAI element: section
Adjustments: Mixed section/block content model
level5
ZedAI element: section
Adjustments: Mixed section/block content model
level6
ZedAI element: section
Adjustments: Mixed section/block content model
lic
ZedAI element: span
line
ZedAI element: ln
Adjustments:
imggroup childrensamp
br
linegroup
ZedAI element: block
linenum
ZedAI element: lnum
link
Discarded
li
ZedAI element: item
Adjustments:
p element.br to ln
list
ZedAI element: list
Adjustments: wrap dtbook:prodnote and dtbook:hd
meta
ZedAI element: meta
Notes: See https://github.com/daisy/pipeline/issues/56
note
ZedAI element: note
Adjustments: Normalize block/inline content model: if mixed, wrap inlines in p element.
noteref
ZedAI element: noteref
Dropped: @type (“Type provides advisory content MIME type of the targeted id, see RFC1556.”)
p
ZedAI element: p
Adjustments:
imggroup childrensamp
br to ln
list, dl childrenpagenum
ZedAI element: pagebreak
poem
ZedAI element: block @role="poem"
prodnote
ZedAI element: annotation @by="republisher"
Adjustments:
br to ln
p element.q
ZedAI element: quote
Adjustments:
imggroup childrensamp
br to ln
rearmatter
ZedAI element: backmatter
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:
p element.br to ln
sent
ZedAI element: s
Adjustments:
imggroup childrensamp
br to ln
sidebar
ZedAI element: aside @role="sidebar"
Adjustments:
p element.br to ln
span
ZedAI element: span
Adjustments:
imggroup childrensamp
br to ln
strong
ZedAI element: emph
Adjustments:
imggroup childrensamp
br to ln
cite, q
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
sent becomes span @role='sentence'
prodnote becomes extract
abbr becomes span @role='truncation'
acronym becomes span @role='acronym' | 'initialism'
w becomes span @role='word'
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.
q becomes span
a becomes span
annoref, noteref become span
imggroup childrensamp
br
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
sent becomes span
prodnote becomes extract
abbr becomes span @role='truncation'
acronym becomes span @role='acronym' | 'initialism'
w becomes span @role='word'
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.
q becomes span
a becomes span
annoref, noteref become span
imggroup childrensamp
br
table
ZedAI element: table
CSS: @width, @border (border width), @cellspacing, @cellpadding
Adjustments:
caption childrencols into a colgroup; zedai does not allow free-floating cols.tr or pagenum into a tbody if thead or tfoot is presentthead, tfoot, tbody into thead, tbody, tfoot
Notes: See https://github.com/daisy/pipeline/issues/58
tbody
ZedAI element: tbody
CSS: @align, @valign
td
ZedAI element: td
CSS: @align, @valign
Adjustments:
br to ln
p element.tfoot
ZedAI element: tfoot
CSS: @align, @valign
th
ZedAI element: th
CSS: @align, @valign
Adjustments:
br to ln
p element.thead
ZedAI element: thead
CSS: @align, @valign
title
ZedAI element: p @property='title' @about='IDREF'
Adjustments:
imggroup childrensamp
br to ln
tr
ZedAI element: tr
CSS: @align, @valign
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.
dfn becomes span
code becomes span
kbd becomes span
cite becomes span
abbr becomes span @role='truncation'
span @role='acronym' | 'initialism'
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.
q becomes span
a becomes span
imggroup childrensamp
br
id becomes xml:id
xml:space is copiedclass is copiedxml:lang is copieddir becomes its:dir
showin is discardedtitle and name are discarded