ZedAI AnnotationNoteObject Proposal
From zedwiki
Contents |
Proposal
by attribute
The new global by attribute will be introduced to allow the contributor of any element to be identified. The implicit value of the attribute will be 'author'.
The descendants of an element with a declared by value implicitly inherit that value.
A list of additional values will be established for this attribute, such as editor, translator, republisher, etc.
Examples
Republisher paragraph inserted into source:
<section>
<h>Legal Notice</h>
<p>Go ahead and share this book. It's all good!</p>
<p by="republisher" role="warning">He who shares or copies this book will be cursed ...</p>
</section>
Republisher section added to source:
<section by="republisher" role="copyright">
<h>Copyright</h>
<p>Copyright of the braille version of this document ...</p>
<p>This document may not be redistributed ...</p>
</section>
description element
A new description element will be introduced to provide accessible descriptions for images, videos, etc.
descriptions will be allowed both in the head and body. The role attribute will be used to specify the nature of the descriptive text. The implicit value of the attribute is 'content-description'.
A desc attribute will be added to provide the link from an element to its description. This attribute will be globally available so that any element can include a description and will have the IDREFS datatype. A description cannot reference another description, however.
If multiple descriptions are provided for the same element, they must have unique roles.
The content model will be restricted to the Text layer (and possibly some Phrase elements). Elements from features will not be allowed to be added to the content model to ensure no issues rendering the descriptions.
The description element can also be used to point to an external resource containing the description by attaching an xlink:href attribute. In this case, the element must be empty.
The by attribute can be used to identify the source of the description.
Examples
Image descriptions
An implied description:
<object ref="mouse.jpg" desc="desc1">
A deer mouse sitting on a rock nibbling on a pumpkin seed.
</object>
An embedded description:
<object ref="mouse.jpg" desc="desc1">
<description by="republisher">
A picture of a small mouse eating a seed.
</description>
</object>
An externally-referenced description:
<object ref="mouse.jpg" desc="desc1"/>
<description xml:id="desc1" xlink:href="descriptions/mouse_braille.txt"/>
Structure description
<table xml:id="t1">...</table>
<caption ref="t1">...</caption>
<description by="republisher" ref="t1" type="structure-description">...</description>
Descriptions in head
<head>
...
<description xml:id="desc_001" xlink:href="desc1.xml"/>
<description xml:id="desc_002" xlink:href="desc2.xml"/>
<description xml:id="desc_003" xlink:href="desc3.xml"/>
...
</head>
<body>
<section>
...
<object src="fossil.jpg" desc="desc_002"/>
...
</section
</body>
annotation element
Every annotation must either refer to an element in the document (via the ref attribute) or must have a annoref element pointing to it.
The annoref element will be introduced as a specialization of the existing noteref element for inserting a text referent in the document, but makes no changes to noteref's traits.
The role attribute will be used to indicate the nature of the annotation and the by attribute will be used to identify the person or agency who added the annotation.
Roles will be established for the situations outlined in items 3-8 as discussed at the 2010-08-24 conference call (http://www.daisy.org/zw/ZedAI_telcon_20100824#Summary_.28from_Matt.29)
Examples
Author annotations
With explicit reference:
<p>...<annoref ref="a1" rend:symbol="*"/></p>
<annotation xml:id="a1">...</annotation>
Without a referent:
<poem xml:id="p1">
<lngroup xml:id="p1s1">
<ln xml:id="p1s1l3">...</ln>
</lngroup
</poem>
<annotation xml:id="a1" ref="p1s1l3">In line 3, ...</annotation>
Republisher annotations
</section>
<annotation xml:id="a123" by="republisher" role="common">Sections 4 through 6 have been omitted.</annotation>
<section xml:id="s3.7">
note element
The note element will be restricted to representing only footnotes and endnotes.
The role attribute will allow a value of either footnote or endnote, with footnote tentatively penciled in as the implicit value.
The note element must either refer to an element in the document (via the ref attribute) or must have a noteref element pointing to it.
Examples
Footnotes
<p>...<noteref ref="n1">1</noteref>...</p>
<note type="footnote" xml:id="n1">...</note>
Endnotes
With referent:
<section role="chapter">
<poem>
<h>Rime of the Ancient Mariner<noteref ref="note_1" rend:symbol="1"/></h>
<ln>It is an ancient Mariner</ln>
...
</poem>
...
<section role="endnotes">
<h>Notes</h>
<note xml:id="note_1" role="endnote">Coleridge's Rime can be sung to the theme of Gilligan's Island.</note>
</section>
</section>
Without referent:
<section role="chapter">
<pagebreak value="1"/>
<h>Chapter 1</h>
<p xml:id="para_1">...</p>
...
<section role="endnotes">
<h>Notes</h>
<note ref="para_1">[Page 1] The argument in the first paragraph...</note>
</section>
</section>
object element
object will not allow the nesting of object elements, but will allow direct inclusion of description elements or text elements corresponding to the content model of description. When text elements are included, an implicit description is assumed (with implied by value of author).
object elements can also reference an description placed elsewhere — including the document head — allowing multiple objects to reference the same alternate representation and/or description.
Nested text and/or descriptions are not required; a validator could have a mode to generate warnings when alt text is missing.
Examples
Object with nested implicit description
<object src="..." srctype="image/png">
<p>...</p>
</object>
Object with external description
<head>
<description xml:id="alt_img1">...</description>
</head>
<body>
<object src="..." srctype="image/png" ref="alt_img1" />
</body>
Content selection feature and image types
Instead of object nesting, use the content selection feature, which would get a new function "preferred-mime-type" which takes a mime type as parameter:
<body>
....
<sel:select>
<sel:when expr="type('image/svg')"
<object src="image.svg" desc="img1"/>
</sel:when>
<sel:otherwise>
<object src="image.png" desc="img1"/>
</sel:otherwise>
</sel:select>
...
</body>
This also makes it more streamlined when considering future use cases of multiple SVG's with different content and/or targets. The selection principle is now all collected in the content selection feature instead of being spread out between native object behavior and select:
<sel:when expr="type('image/svg') and target('TACTILE')">
<object .../>
</sel:when>
alternatively using nested clauses:
<sel:when expr="type('image/svg')">
<sel:when expr="target('TACTILE')">
<object .../>
</sel:when>
<sel:otherwise><object .../></sel:otherwise>
</sel:when>
