<?xml version="1.0" encoding="UTF-8"?>
<!-- © TEI Consortium. Dual-licensed under CC-by and BSD2 licenses; see the file COPYING.txt for details. -->
<?xml-model href="https://jenkins.tei-c.org/job/TEIP5-dev/lastSuccessfulBuild/artifact/P5/release/xml/tei/odd/p5.nvdl" type="application/xml" schematypens="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"?>
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" xml:id="gi-param" ident="param" module="tagdocs">
  <desc versionDate="2016-03-29" xml:lang="en">provides a parameter for a model behaviour by
    supplying its name and an XPath expression identifying the location of its content.</desc>
  <classes>
    <memberOf key="att.global"/>
    </classes>
  <content><empty/></content>
  <attList>
    <attDef ident="name" usage="req">
      <desc versionDate="2016-03-29" xml:lang="en">a name for the parameter being supplied.</desc>
      <datatype>
        <dataRef key="teidata.enumerated"/>
      </datatype>
      <valList type="semi">
        <valItem ident="alternate">
          <desc versionDate="2017-05-11" xml:lang="en">when used with behaviour
              <ident>alternate</ident>, a parameter of this name supplies one of the pair of possible
            values; for example the regularized form rather than the original form within a
              <gi>choice</gi> element.</desc>
        </valItem>
        <valItem ident="default">
          <desc versionDate="2017-05-11" xml:lang="en">when used with behaviour
              <ident>alternate</ident>, a parameter of this name supplies one of the pair of possible
            values; for example the original form rather than the regularized form within a
              <gi>choice</gi> element.</desc>
        </valItem>
        <!--  <valItem ident="content">
          <desc versionDate="2016-03-29" xml:lang="en" >an expression evaluating to content to process by a behaviour (used with all
            behaviours with the exception of <code>alternate</code> and <code>omit</code>); when
            this parameter is not explicitly given for a <gi>model</gi>, current element may be used
            as default value</desc>
        </valItem>
        <valItem ident="default">
          <desc versionDate="2016-03-29" xml:lang="en" >an expression evaluating to content to process as default, similar to the
              <code>content</code> but used to distinguish from <code>alternate</code>
            behaviour</desc>
        </valItem>-->
        <valItem ident="height">
          <desc versionDate="2016-03-29" xml:lang="en">when used with behaviour
              <ident>graphic</ident>, a parameter of this name supplies a value for the height of
            the graphic e.g. <q>300px</q>, <q>50%</q>.</desc>
        </valItem>
        <valItem ident="id">
          <desc versionDate="2016-03-29" xml:lang="en">a parameter of this name should supply a
            unique identifier for the element being processed; as for example with the
              <ident>anchor</ident> behaviour</desc>
        </valItem>
        <valItem ident="label">
          <desc versionDate="2016-03-29" xml:lang="en">a parameter of this name should supply an
            expression to be used to label something, for example <code>concat('Page ', @n)</code>
            for a page beginning or <code>@n</code> for a footnote reference; typically used with the
              <ident>note</ident> or <ident>break</ident> behaviours</desc>
        </valItem>
        <valItem ident="level">
          <desc versionDate="2016-03-29" xml:lang="en">when used with the <ident>heading</ident>
            behaviour, a parameter of this name supplies a positive integer indicating the
            hierarchic level of a heading.</desc>
        </valItem>
        <valItem ident="link">
          <desc versionDate="2016-03-29" xml:lang="en">when used with the <ident>link</ident>
            behaviour, a parameter of this name should supply a URL to be used as the target of a
            link. <!-- why not call it target then? --></desc>
        </valItem>
        <valItem ident="place">
          <desc versionDate="2017-05-11" xml:lang="en">when used with the <ident>note</ident>
            behaviour, a parameter of this name should provide a string which describes the intended
            placement of some text; typical values include <q>margin</q>, <q>footnote</q>, <q>endnote</q>,
            <q>inline</q>, <q>bottom</q></desc>
        </valItem>
        <valItem ident="type">
          <desc versionDate="2017-05-11" xml:lang="en">a parameter of this name can be used to
            categorize the specified behaviour in any way; for example the kind of break (when used
            with the <ident>break</ident> behaviour) or the kind of index to be generated (if used
            with the <ident>index</ident> behaviour) etc.</desc>
        </valItem>
        <valItem ident="url">
          <desc versionDate="2016-03-29" xml:lang="en">when used with behaviour
              <ident>graphic</ident>, a parameter of this name supplies a a URL indicating the
            graphic intended.</desc>
        </valItem>
        <valItem ident="width">
          <desc versionDate="2016-03-29" xml:lang="en">when used with behaviour
              <ident>graphic</ident>, a parameter of this name supplies a value for the width of the
            graphic e.g. <q>400px</q>, <q>70%</q>.</desc>
        </valItem>
      </valList>
    </attDef>
    <attDef ident="value" usage="req">
      <desc versionDate="2016-03-29" xml:lang="en">supplies an XPath expression which when evaluated
        provides the value for the parameter</desc>
      <datatype>
        <dataRef key="teidata.xpath"/>
      </datatype>
    </attDef>
  </attList>
  <exemplum xml:lang="en">
    <p>In this example, which will be processed for a <gi>choice</gi> element which has both
        <gi>sic</gi> and <gi>corr</gi> child elements, the <ident>default</ident> parameter will
      provide the value of the child <gi>corr</gi> element, and the <ident>alternate</ident>
      parameter will provide that of the child <gi>sic</gi> elements. If neither <gi>param</gi>
      element was supplied, both elements would still be available to an application, but the
      application would need to distinguish them for itself.</p>
    <egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-param-egXML-ii" source="#UND">
      <elementSpec ident="choice">
        <model predicate="sic and corr" behaviour="alternate">
          <param name="default" value="corr"/>
          <param name="alternate" value="sic"/>
        </model>
      </elementSpec>
    </egXML>
  </exemplum>
  <exemplum xml:lang="en">
    <egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-param-egXML-af" source="#UND">
      <elementSpec ident="graphic" mode="change">
        <model behaviour="graphic">
          <param name="url" value="@url"/>
          <param name="width" value="@width"/>
          <param name="height" value="@height"/>
        </model>
      </elementSpec>
    </egXML>
  </exemplum>
  <remarks versionDate="2016-02-29" xml:lang="en">
    <p>An implementation may require parameters other than those listed here, and is not required to
      follow this partial specification. </p>
    <p>The names and datatypes of the expected parameters should be documented in the corresponding
      customization using a <gi>paramSpec</gi> element. Literal strings provided in an XPath
      expression should be quoted.</p>
  </remarks>
  <listRef>
    <ptr target="#TDPMMB"/>
  </listRef>
</elementSpec>
