<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright TEI Consortium.
Dual-licensed under CC-by and BSD2 licences
See the file COPYING.txt for details
$Date: 2015-08-21 10:44:07 +0100 (Fri, 21 Aug 2015) $
$Id:  $
-->
<?xml-model href="../../p5odds.rnc" type="application/relax-ng-compact-syntax"?>
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" ident="param" module="tagdocs">
  <desc xml:lang="en" versionDate="2016-03-29">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/>
  <!--macroRef key="data.xpath"/-->
  <attList>
    <attDef ident="name" usage="req">
      <desc xml:lang="en" versionDate="2016-03-29">a name for the parameter being supplied</desc>
      <datatype>
        <dataRef key="teidata.xpath"/>
      </datatype>
      <valList type="semi">
        <valItem ident="alternate">
          <desc xml:lang="en" versionDate="2016-03-29">when used with behaviour
              <code>alternate</code>, 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 xml:lang="en" versionDate="2016-03-29">when used with behaviour
              <code>alternate</code>, 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 xml:lang="en" versionDate="2016-03-29" >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 xml:lang="en" versionDate="2016-03-29" >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 xml:lang="en" versionDate="2016-03-29">when used with behaviour
              <ident>graphic</ident>, a parameter of this name supplies a value for the height of
            the graphic e.g. "300px", "50%". </desc>
        </valItem>
        <valItem ident="id">
          <desc xml:lang="en" versionDate="2016-03-29">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 xml:lang="en" versionDate="2016-03-29">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 break 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 xml:lang="en" versionDate="2016-03-29">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 xml:lang="en" versionDate="2016-03-29">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 xml:lang="en" versionDate="2016-03-29">when used with the <code>note</code>
            behaviour, a parameter of this name should provide a string which describes the intended
            placement of some text; typical values include "margin", "footnote", "endnote",
            "inline", "bottom" </desc>
        </valItem>
        <valItem ident="type">
          <desc xml:lang="en" versionDate="2016-03-29">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 <code>break</code> behaviour) or the kind of index to be generated (if used
            with the <code>index</code> behaviour) etc. </desc>
        </valItem>
        <valItem ident="url">
          <desc xml:lang="en" versionDate="2016-03-29">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 xml:lang="en" versionDate="2016-03-29">when used with behaviour
              <ident>graphic</ident>, a parameter of this name supplies a value for the width of the
            graphic e.g. "400px", "70%".</desc>
        </valItem>
      </valList>
    </attDef>
    <attDef ident="value" usage="req">
      <desc xml:lang="en" versionDate="2016-03-29">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">
      <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">
      <elementSpec ident="graphic" mode="change">
        <model behaviour="graphic">
          <param name="url" value="@url"/>
          <param name="width" value="@width"/>
          <param name="width" 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>
