EPUB3 extensions - sbsdev/pipeline-mod-sbs GitHub Wiki
There are a number of SBS-specific extensions to DTBook for which we need to find an alternative in EPUB 3. I will create a table here with the mapping and we can discuss the problematic ones.
-
span[@class='answer']
-
span[@class='answer_1']
-
span[@class='box']
-
@brl:class
-
a[@class='pageref']
-
brl:homograph
-
brl:v-form
-
brl:num[@role=...]
-
brl:place
-
brl:select
,brl:when-braille
,brl:literal[@brl:grade=...]
,brl:otherwise
-
brl:emph
-
brl:running-line
-
brl:toc-line
-
brl:volume[@brl:grade=...]
-
@brl:accents
-
brl:computer
-
brl:date
-
brl:time
-
brl:name
Metadata elements:
-
meta[@name='prod:series']
-
meta[@name='prod:seriesNumber']
DTBook | EPUB 3 |
---|---|
span[@class='answer'] |
proposal: The Nordic guidelines use "class" |
span[@class='answer_1'] |
proposal: "nordic:" prefix because Jostein currently converts to |
span[@class='box'] |
proposal: "nordic:" prefix because Jostein currently converts to |
@brl:class |
currently works: proposal: only used for SBSForm at the moment? prefix classes with "braille-" or "brl-"? |
a[@class='pageref'] |
currently works: proposal: "epub:type" because this is semantics "sbs:" prefix because nothing similar in default or z3998 vocab |
brl:homograph |
currently works: proposal: |
brl:v-form |
currently works: proposal: |
@role :
|
currently works: proposal:
|
brl:place |
currently works: proposal: |
brl:select , brl:when-braille , brl:literal[@brl:grade=...] , brl:otherwise
|
currently works: proposal: ? Something similar in EPUB is the An EPUB feature that is aware of the target media is the multiple renditions feature (see the rendition:media attribute). But this is not suitable for a single-source publishing format. Another option is CSS. CSS target medium aware. So we could just consider putting the alternatives in separate spans with custom CSS classes. However I'm not sure it is such a good idea to approach this issue as a simple styling matter. Also CSS is not target locale aware. In our specific case, we can do the switching based on the "contraction-grade" parameter in our style sheets, but these style sheets are not generally usable outside of our converter. DIAGRAM could be another option. |
(optional)
(optional) (optional) attributes also allowed on |
currently works: proposal:
or:
"class" because this is styling It's no problem to combine these classes with other custom classes (which is what the
In order to support the difference between How to replace |
brl:running-line |
currently works: proposal: ? Maybe the |
brl:toc-line |
currently works: proposal: ? Maybe the |
brl:volume[@brl:grade=...] |
proposal (currently works): or how to capture grade info?
"class" rather than "epub:type" because this is styling. In CSS this is mapped to `volume-break-before: always`. Compare with |
|
currently works: proposal:
Not really styling, but also not semantics; third category: "transcription hints". Since transcription hints have also been included in CSS (see e.g. text-transform property) I'm using "class". |
brl:computer |
currently works: proposal: TODO: need to rethink: probably |
brl:date |
currently works: proposal: If we want to make clear that this is really about a kind of number format used for a date (rather than a date of some event), we could alternatively create a |
brl:time |
currently works: proposal: ? or create a |
brl:name |
currently works: proposal: or create a |
|
proposal 1: This would be a new entry in the "nordic" vocabulary. proposal 2: schema.org
There are some other interesting things in schema.org such as BookSeries and PublicationIssue. proposal 3: The "sbs" or "prod" prefix would have to be mapped to a URI. This is the currently working solution, but with proposal 4: According to the EPUB spec the meta element defined in OPF2 has been obsoleted but may still be included. (However I am not sure whether the "prod" would have to be mapped to a URI as well in this case.) |
meta[@name='prod:seriesNumber'] |
proposal 1: This would be a new entry in the "nordic" vocabulary. proposal 2: There are some other interesting things in schema.org such as issueNumber. proposal 3: The "sbs" prefix would have to be mapped to a URI. This is the currently working solution, but with proposal 4: According to the EPUB spec the meta element defined in OPF2 has been obsoleted but may still be included. (However I am not sure whether the "prod" would have to be mapped to a URI as well in this case.) |