<model>

<model> describes the processing intended for a specified element. [22.5.4.1 The TEI processing model]
Modulo tagdocs — Documentation Elements
Attributi
behaviour⚓︎ names the process or function which this processing model uses in order to produce output.
Stato Richiesto
Tipo di dati teidata.enumerated
I valori suggeriti includono:
alternate
(default, alternate) support display of alternative visualisations, for example by displaying the preferred content, by displaying both in parallel, or by toggling between the two.
anchor
(id) create an identifiable anchor point in the output.
block
(content) create a block structure
body
(content) create the body of a document.
break
(type, label) create a line, column, or page break according to the value of type
cell
(content) create a table cell
cit
(content, source) show the content, with an indication of the source
document
(content) start a new output document
figure
(title) make a figure with the title as caption
glyph
(uri) show a character by looking up reference to a chardesc at the given URI
graphic
(url, width, height, scale, title) if url is present, uses it to display graphic, else display a placeholder image.
heading
(content, level) creates a heading.
index
(type) generate list according to type.
inline
(content, label) creates inline element out of content
link
(content, uri) create hyperlink
list
(content) create a list.
listItem
(content) create a list item.
metadata
(content) create metadata section
note
(content, place, label) create a note, often out of line, depending on the value of place; could be margin, footnote, endnote, inline
omit
do nothing, do not process children
paragraph
(content) create a paragraph out of content.
row
(content) create a table row
section
(content) create a new section of the output document
table
(content) create a table
text
(content) create literal text
title
(content) create document title
useSourceRendition⚓︎ whether to obey any rendition attribute that is present.
Stato Opzionale
Tipo di dati teidata.truthValue
output⚓︎ the intended output.
Stato Opzionale
Tipo di dati teidata.enumerated
I valori esemplificativi includono:
web
the output is intended for presentation in a web format
print
the output is intended for presentation in a print format
plain
the output is intended for presentation in a plain text format
cssClass⚓︎ the name of a CSS class which should be associated with this element
Stato Opzionale
Tipo di dati 1–∞ occorrenze di teidata.name separato da spazio bianco
Contenuto in
Può contenere
Nota

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.

Esempio
<model behaviour="inline"/>
Esempio
<elementSpec mode="changeident="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>
Esempio
<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>
Esempio
<model behaviour="inline">
 <outputRendition>font-weight:bold</outputRendition>
</model>
Esempio
<model behaviour="inlineoutput="print"/>
Esempio
<model predicate="ancestor::p"
 behaviour="inline">

 <param name="contentvalue="@n"/>
</model>
Esempio
<elementSpec mode="changeident="date">
 <model output="printpredicate="text()"
  behaviour="inline"/>

 <model output="print"
  predicate="@when and not(text())behaviour="inline">

  <param name="contentvalue="@when"/>
 </model>
 <model predicate="@whenoutput="web"
  behaviour="alternate">

  <param name="alternatevalue="@when"/>
 </model>
</elementSpec>
Esempio
<elementSpec mode="changeident="choice">
 <model predicate="sic and corr"
  behaviour="alternate">

  <param name="defaultvalue="corr"/>
  <param name="alternatevalue="sic"/>
 </model>
 <model predicate="abbr and expan"
  behaviour="alternate">

  <param name="defaultvalue="expan"/>
  <param name="alternatevalue="abbr"/>
 </model>
 <model predicate="orig and reg"
  behaviour="alternate">

  <param name="defaultvalue="reg"/>
  <param name="alternatevalue="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>
Content model
<content>
 <sequence>
  <alternate minOccurs="0"
   maxOccurs="unbounded">

   <classRef key="model.identEquiv"/>
   <classRef key="model.descLike"/>
  </alternate>
  <elementRef key="paramminOccurs="0"
   maxOccurs="unbounded"/>

  <elementRef key="outputRendition"
   minOccurs="0maxOccurs="unbounded"/>

 </sequence>
</content>
Dichiarazione
<rng:element name="model">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:ref name="att.predicate.attributes"/>
 <rng:attribute name="behaviour">
  <rng:choice>
   <rng:value>alternate</rng:value>
   <rng:value>anchor</rng:value>
   <rng:value>block</rng:value>
   <rng:value>body</rng:value>
   <rng:value>break</rng:value>
   <rng:value>cell</rng:value>
   <rng:value>cit</rng:value>
   <rng:value>document</rng:value>
   <rng:value>figure</rng:value>
   <rng:value>glyph</rng:value>
   <rng:value>graphic</rng:value>
   <rng:value>heading</rng:value>
   <rng:value>index</rng:value>
   <rng:value>inline</rng:value>
   <rng:value>link</rng:value>
   <rng:value>list</rng:value>
   <rng:value>listItem</rng:value>
   <rng:value>metadata</rng:value>
   <rng:value>note</rng:value>
   <rng:value>omit</rng:value>
   <rng:value>paragraph</rng:value>
   <rng:value>row</rng:value>
   <rng:value>section</rng:value>
   <rng:value>table</rng:value>
   <rng:value>text</rng:value>
   <rng:value>title</rng:value>
   <rng:ref name="teidata.enumerated"/>
  </rng:choice>
 </rng:attribute>
 <rng:optional>
  <rng:attribute name="useSourceRendition">
   <rng:ref name="teidata.truthValue"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="output">
   <rng:ref name="teidata.enumerated"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="cssClass">
   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="teidata.name"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.identEquiv"/>
    <rng:ref name="model.descLike"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="param"/>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="outputRendition"/>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
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.identEquiv | model.descLike )*, param*, outputRendition* )
}