<model>
<model> describes the processing intended for a specified element. [22.5.4.1 The TEI processing model] | |||||||||||||||||||||||||||||
Module | tagdocs — Documentation Elements | ||||||||||||||||||||||||||||
Attributs | att.global (@xml:id, @n, @xml:lang, @xml:base, @xml:space) (att.global.rendition (@rend, @style, @rendition)) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) (att.global.responsibility (@cert, @resp)) (att.global.source (@source)) att.predicate (@predicate)
|
||||||||||||||||||||||||||||
Contenu dans |
tagdocs: elementSpec modelGrp modelSequence
|
||||||||||||||||||||||||||||
Peut contenir | |||||||||||||||||||||||||||||
Note |
The intended output to be generated for a particular behaviour of a processing model may be documented in one or all of the three following ways. Firstly, the cssClass attribute may be used to specify the name of a CSS style in some associated CSS stylesheet which is to be applied to each occurrence of a specified element found (in a given context, for a specified output). Secondly, the attribute useSourceRendition may be used to indicate that the default rendition for occurrences of this element, as defined by a rendition element in the document header, should be applied. Thirdly, the styling to be applied may be specified explicitly as content of a child outputRendition element. When more than one of these options is used, they are understood to be combined in accordance with the rules for multiple declaration of the styling language used. |
||||||||||||||||||||||||||||
Exemple |
<model behaviour="inline"/>
|
||||||||||||||||||||||||||||
Exemple |
<elementSpec mode="change" ident="quote">
<model predicate="ancestor::p" behaviour="inline"> <desc versionDate="2015-08-21" xml:lang="en">If it's inside a paragraph then it's inline</desc> </model> <model predicate="not(ancestor::p)" behaviour="block"> <desc versionDate="2015-08-21" xml:lang="en">If it's not inside a paragraph then it is block level</desc> </model> </elementSpec> |
||||||||||||||||||||||||||||
Exemple |
<model predicate="parent::person"
behaviour="inline"> <desc versionDate="2015-08-21" xml:lang="en">If it is a child of a person element, treat as inline</desc> </model> |
||||||||||||||||||||||||||||
Exemple |
<model behaviour="inline">
<outputRendition>font-weight:bold</outputRendition> </model> |
||||||||||||||||||||||||||||
Exemple |
<model behaviour="inline" output="print"/>
|
||||||||||||||||||||||||||||
Exemple |
<model predicate="ancestor::p"
behaviour="inline"> <param name="content" value="@n"/> </model> |
||||||||||||||||||||||||||||
Exemple |
<elementSpec mode="change" ident="date">
<model output="print" predicate="text()" behaviour="inline"/> <model output="print" predicate="@when and not(text())" behaviour="inline"> <param name="content" value="@when"/> </model> <model predicate="@when" output="web" behaviour="alternate"> <param name="alternate" value="@when"/> </model> </elementSpec> |
||||||||||||||||||||||||||||
Exemple |
<elementSpec mode="change" ident="choice">
<model predicate="sic and corr" behaviour="alternate"> <param name="default" value="corr"/> <param name="alternate" value="sic"/> </model> <model predicate="abbr and expan" behaviour="alternate"> <param name="default" value="expan"/> <param name="alternate" value="abbr"/> </model> <model predicate="orig and reg" behaviour="alternate"> <param name="default" value="reg"/> <param name="alternate" value="orig"/> </model> </elementSpec> |
||||||||||||||||||||||||||||
Schematron | It is ambigous to have 2 models that have both the same output and have no predicate (and thus select the same set of nodes).
<sch:rule context="tei:model[ not( parent::tei:modelSequence ) ][ not( @predicate ) ]"> <sch:let name="output" value="normalize-space( @output )"/> <sch:report test="following-sibling::tei:model [ not( @predicate )] [ normalize-space( @output ) eq $output ]"> There are 2 (or more) 'model' elements in this '<sch:value-of select="local-name(..)"/>' that have no predicate, but are targeted to the same output ("<sch:value-of select="( $output, parent::modelGrp/@output, 'all')[1]"/>")</sch:report> </sch:rule> |
||||||||||||||||||||||||||||
Schematron | It is ambigous to have 2 models that have both the same output and the same predicate (and thus select the same set of nodes).
<sch:rule context="tei:model[ not( parent::tei:modelSequence ) ][ @predicate ]"> <sch:let name="predicate" value="normalize-space( @predicate )"/> <sch:let name="output" value="normalize-space( @output )"/> <sch:report test="following-sibling::tei:model [ normalize-space( @predicate ) eq $predicate ] [ normalize-space( @output ) eq $output ]"> There are 2 (or more) 'model' elements in this '<sch:value-of select="local-name(..)"/>' that have the same predicate, and are targeted to the same output ("<sch:value-of select="( $output, parent::modelGrp/@output, 'all')[1]"/>")</sch:report> </sch:rule> |
||||||||||||||||||||||||||||
Modèle de contenu |
<content> |
||||||||||||||||||||||||||||
Schéma Declaration |
<rng:element name="model"> element model { att.global.attributes, att.global.rendition.attributes, att.global.linking.attributes, att.global.analytic.attributes, att.global.facs.attributes, att.global.change.attributes, att.global.responsibility.attributes, att.global.source.attributes, att.predicate.attributes, attribute behaviour { "alternate" | "anchor" | "block" | "body" | "break" | "cell" | "cit" | "document" | "figure" | "glyph" | "graphic" | "heading" | "index" | "inline" | "link" | "list" | "listItem" | "metadata" | "note" | "omit" | "paragraph" | "row" | "section" | "table" | "text" | "title" | teidata.enumerated }, attribute useSourceRendition { teidata.truthValue }?, attribute output { teidata.enumerated }?, attribute cssClass { list { teidata.name+ } }?, ( ( model.glossLike | model.descLike )*, param*, outputRendition* ) } |