<noteMarker>
<noteMarker>
Module | lim | ||||||||||||||||||||||||||||||
Attributes | Attributes
|
||||||||||||||||||||||||||||||
Member of | |||||||||||||||||||||||||||||||
Contained by |
analysis: w
core: abbr add author bibl cit corr date del editor emph expan foreign gloss head hi imprint item l label lg list listBibl mentioned name note num orig p pubPlace publisher q quote ref reg resp rs sic term time title unclear
corpus: activity
namesdates: addName affiliation birth death faith floruit forename genName langKnown nameLink nationality objectName occupation orgName persName placeName residence roleName settlement sex surname
|
||||||||||||||||||||||||||||||
May contain | Character data only | ||||||||||||||||||||||||||||||
Schematron |
<sch:pattern> <sch:rule context="tei:note/tei:noteMarker | tei:note/tei:supplied/tei:noteMarker"> <sch:assert test="@target">ERROR: Note markers in a note should have a target pointing to the source note marker.</sch:assert> </sch:rule> <sch:rule context="tei:noteMarker[not(parent::tei:note)] | tei:noteMarker[not(parent::tei:supplied/parent::tei:note)]"> <sch:assert test="@xml:id">ERROR: Note markers in the body of text should have an xml:id identifying it. (This should be automatic if you use the keyboard shortcut Command + Shift + N)</sch:assert> </sch:rule> </sch:pattern> <sch:pattern> <sch:rule context="tei:noteMarker[@target]"> <sch:let name="localTargs" value="tokenize(@target,'\s+')"/> <sch:assert test="every $targ in $localTargs satisfies matches($targ,'^(doc:[^#]+)?#')">ERROR: Every target in noteMarker must start with a '#' or a "doc:" pointer with a hash reference.</sch:assert> </sch:rule> </sch:pattern> <sch:pattern> <sch:rule context="tei:noteMarker[@target]"> <sch:let name="noteMarker" value="."/> <sch:let name="localTargs" value="tokenize(@target,'\s+')[matches(.,'^#')]"/> <sch:let name="noteMarkers" value="ancestor::tei:TEI/descendant::tei:noteMarker[@xml:id]"/> <sch:let name="badPointers" value="for $targ in $localTargs return let $note := $noteMarkers[@xml:id = substring-after($targ,'#')] return if (exists($note) and $note[. << $noteMarker]) then () else $targ"/> <sch:assert test="empty($badPointers)">ERROR: Cannot find preceding noteMarker for target<sch:value-of select="if (count($badPointers) gt 1) then 's' else ()"/>:<sch:value-of select="string-join($badPointers,' ')"/>.</sch:assert> </sch:rule> </sch:pattern> <sch:rule context="tei:noteMarker[@ref='g:UNKNOWN']"> <sch:assert test="matches(string(.), '\S')">ERROR: You must provide a character in the noteMarker when using g:UNKNOWN</sch:assert> </sch:rule> <sch:rule context="tei:noteMarker[@ref][not(@ref = 'g:UNKNOWN')]"> <sch:assert test="empty(text())">ERROR: No text content is allowed in noteMarker unless @ref='g:UNKNOWN'</sch:assert> </sch:rule> <sch:rule context="tei:noteMarker[not(parent::tei:note[@anchored='true'] or parent::tei:supplied/parent::tei:note[@anchored='true'])]"> <sch:let name="prePage" value="preceding::tei:pb[1]"/> <sch:let name="prePageVal" value="if ($prePage) then substring-after($prePage/@facs,'pg:') else tokenize(ancestor::tei:TEI/@xml:id,'\.')[2]"/> <sch:let name="prePageInt" value="xs:integer($prePageVal)"/> <sch:let name="preNotes" value="preceding::tei:noteMarker[@xml:id]"/> <sch:let name="noteNum" value="(if (exists($prePage)) then count($preNotes[. >> $prePage]) else count($preNotes)) + 1"/> <sch:let name="noteMarkerId" value="'p' || $prePageVal || '_n' || $noteNum"/> <sch:assert test="@xml:id and (@xml:id = $noteMarkerId)">ERROR: @xml:id of noteMarker should be<sch:value-of select="$noteMarkerId"/>.</sch:assert> </sch:rule> |
||||||||||||||||||||||||||||||
Source | Github
<elementSpec rend="add" ident="noteMarker" mode="add" module="lim"> <classes> <memberOf key="model.milestoneLike"/> </classes> <content> <textNode/> </content> <attList> <attDef ident="ref" usage="req"> <desc>points to a description of the character or glyph intended.</desc> <datatype> <dataRef key="limdata.glyph"/> </datatype> </attDef> <attDef ident="annotation" usage="opt"> <desc>describes any penciled annotation surrounding this note marker</desc> <valList type="closed"> <valItem ident="circle"> <gloss>circle</gloss> <desc>circled in pencil</desc> </valItem> <valItem ident="strike"> <gloss>strike</gloss> <desc>Struck out in pencil</desc> </valItem> </valList> </attDef> <attList org="choice"> <attDef ident="xml:id" usage="rec"> <gloss>identifier</gloss> <desc>provides a unique identifier for the element bearing the attribute.</desc> <datatype> <dataRef name="ID"/> </datatype> </attDef> <attDef ident="target" usage="req"> <desc>specifies the destination of the reference by supplying one or more URI References</desc> <datatype maxOccurs="unbounded"> <dataRef key="teidata.pointer"/> </datatype> </attDef> </attList> </attList> </elementSpec> |