Skip to content

<attList>

attribute list

contains documentation for all the attributes associated with this element, as a series of attDef elements.

Module tagdocsTDTAGTDCLA

Attributes

@orgspecifies whether only one (choice) or all (group) of the attributes in the list are available.
Status
Datatype
teidata.enumerated
Legal values
group
grouped
choice
alternated

Classes and content

May contain
Contained by

Examples

<attList>
  <attDef ident="type" usage="opt">
    <desc>type of schema</desc>
    <datatype>
      <dataRef key="teidata.enumerated"/>
    </datatype>
  </attDef>
</attList>
<attList org="choice">
  <attDef ident="active">
    <desc versionDate="2005-07-24" xml:lang="en">identifies the <soCalled>active</soCalled> participants in a non-mutual relationship, or all the participants in a mutual one.</desc>
    <datatype maxOccurs="unbounded">
      <dataRef key="teidata.pointer"/>
    </datatype>
  </attDef>
  <attDef ident="mutual" usage="opt">
    <desc versionDate="2005-07-24" xml:lang="en">supplies a list
of participants amongst all of whom the relationship holds
equally.</desc>
    <datatype maxOccurs="unbounded">
      <dataRef key="teidata.pointer"/>
    </datatype>
  </attDef>
</attList>

Schematron

<constraintSpec xmlns:sch="http://purl.oclc.org/dsdl/schematron" ident="no_duplicate_attrs" scheme="schematron" xml:lang="en">
    <desc>Because it is illegal in XML to have two attributes with the
    same name on the same element instance, it is illegal in TEI to
    have two <gi>attDef</gi> elements with the same values of
    <att>ns</att> and <att>ident</att> in a single <gi>attList</gi>,
    unless the parent <gi>attList</gi> has an <att>org</att> of
    <val>choice</val>. This applies regardless of the <att>mode</att>
    of each <gi>attDef</gi>.</desc>
    <constraint>
      <sch:rule context="tei:attList[ not( ancestor::tei:attList ) ]">
        
        <sch:let name="notanamespace" value="'☮🄯'"/>
        
        <sch:let name="defs" value="descendant::tei:attDef"/>
        
        <sch:let name="nsidents" value="for $ad in $defs return                    if ( $ad[                           parent::tei:attList[ @org eq 'choice']                           and                           preceding-sibling::tei:attDef[                             @ident eq $ad/@ident                             and                             ( @ns, $notanamespace )[1] eq ( $ad/@ns, $notanamespace )[1]                             ]                           ]                       )                    then ''                    else normalize-space( if ($ad/@ns) then 'Q{'||$ad/@ns||'}'||$ad/@ident else $ad/@ident )                  "/>
        
        <sch:let name="dups" value="for $a in $nsidents return ( $nsidents[ . eq $a ][2] )"/>
        
        <sch:let name="distinct_dups" value="distinct-values( $dups )"/>
        
        <sch:assert test="count( $distinct_dups[ . ne ''] ) eq 0">
          Within the attribute list defined in "<sch:value-of select="ancestor::*[@ident][1]/@ident"/>",
          the following attributes have been defined multiple times: <sch:value-of select="$distinct_dups"/>.
        </sch:assert>
      </sch:rule>
    </constraint>
  </constraintSpec>

Content model

<content>
    <alternate minOccurs="1" maxOccurs="unbounded">
      <elementRef key="attRef"/>
      <elementRef key="attDef"/>
      <elementRef key="attList"/>
    </alternate>
  </content>