namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace rng = "http://relaxng.org/ns/structure/1.0"

# Schema generated 2008-11-01T14:14:38Z
# Edition: 1.2.0. Last updated on October 31st 2008.
# Copyright 2008 TEI Consortium.
# This is free software; you can redistribute it and/or
#	    modify it under the terms of the GNU General Public
#	    License as published by the Free Software Foundation;
#	    either version 2 of the License, or (at your option) any
#	    later version.
# This material is distributed in the hope that it will be
#	    useful, but without any warranty; without even the implied
#	    warranty of merchantability or 
#	    fitness for a particular
#	    purpose. See the GNU General Public License for more
#	    details.
# A copy of the GNU General Public
#	    License is stored on the TEI web site
#	    along with this file; you can also contact the Free
#	    Software Foundation, Inc., 59 Temple Place, Suite 330,
#	    Boston, MA 02111-1307, USA, for a copy.
# For information about the TEI, including contact
#		details, consult the TEI web
#	      site at http://www.tei-c.org/. 
#		Feature structures

# Definitions from module iso-fs

# Set global predeclared macros

# Set predeclared macros

# 0. predeclared macros

# 1. classes

# 2. elements

bicond =
  ## (bi-conditional feature-structure constraint) defines a biconditional feature-structure constraint; both
  ## consequent and antecedent are specified as feature structures or groups
  ## of feature structures; the constraint is satisfied if both
  ## subsume a given feature structure, or if both do not.
  element bicond { bicond.content, bicond.localattributes }
bicond.content = (fs | f), iff, (fs | f)
bicond.localattributes = att.global.attributes, empty

binary =
  ## (binary value) represents the value part of a feature-value specification which can contain either
  ##   of exactly two possible values.
  element binary { binary.content, binary.localattributes }
binary.content = empty
binary.localattributes =
  att.global.attributes,
  ## supplies a binary value.
  attribute value { data.truthValue },
  empty

cond =
  ## (conditional feature-structure constraint) defines a conditional feature-structure constraint; the consequent
  ## and the antecedent are specified as feature structures or
  ## feature-structure collections; the constraint is satisfied if both the
  ## antecedent and the consequent subsume a given feature
  ## structure, or if the antecedent does not.
  element cond { cond.content, cond.localattributes }
cond.content = (fs | f), then, (fs | f)
cond.localattributes = att.global.attributes, empty

\default =
  ## (default feature value) represents the value part of a feature-value specification
  ##   which contains a defaulted value.
  element default { default.content, default.localattributes }
default.content = empty
default.localattributes = att.global.attributes, empty

f =
  ## (feature) represents a feature value specification, that
  ##   is, the association of a name with a value of any of several different types.
  element f { f.content, f.localattributes }
f.content = model.featureVal*
f.localattributes =
  att.global.attributes,
  ## provides a name for the feature.
  attribute name { data.name },
  ## (feature value) references any element which can be used to represent the
  ##   value of a feature.
  attribute fVal { data.pointer }?,
  empty

fDecl =
  ## (feature declaration) declares a single feature, specifying its name, organization,
  ## range of allowed values, and optionally its default value.
  element fDecl { fDecl.content, fDecl.localattributes }
fDecl.content = fDescr?, vRange, vDefault?
fDecl.localattributes =
  att.global.attributes,
  ## indicates the name of the feature being declared; matches the
  ## name attribute of f elements in the text.
  attribute name { data.name },
  ## indicates whether or not the value of this feature may
  ##	be present.
  [ a:defaultValue = "true" ] attribute optional { xsd:boolean }?,
  empty

fDescr =
  ## (feature description (in FSD)) describes in prose what is represented by the feature being
  ## declared and its values.
  element fDescr { fDescr.content, fDescr.localattributes }
fDescr.content = macro.limitedContent
fDescr.localattributes = att.global.attributes, empty

fLib =
  ## (feature library) assembles a library of feature elements.
  element fLib { fLib.content, fLib.localattributes }
fLib.content = f+
fLib.localattributes = att.global.attributes, empty

fs =
  ## (feature structure) represents a feature structure, that is, a
  ##   collection of feature-value pairs organized as a
  ## structural unit.
  element fs { fs.content, fs.localattributes }
fs.content = f*
fs.localattributes =
  att.global.attributes,
  ## specifies the type of the feature structure.
  attribute type { data.enumerated }?,
  ## (features) references the feature-value specifications making up this feature structure.
  attribute feats {
    list { data.pointer+ }
  }?,
  empty

fsConstraints =
  ## (feature-structure constraints) specifies constraints on the content of valid feature
  ## structures.
  element fsConstraints {
    fsConstraints.content, fsConstraints.localattributes
  }
fsConstraints.content = (cond | bicond)*
fsConstraints.localattributes = att.global.attributes, empty

fsDecl =
  ## (feature structure declaration) declares one type of feature structure.
  element fsDecl { fsDecl.content, fsDecl.localattributes }
fsDecl.content = fsDescr?, fDecl+, fsConstraints?
fsDecl.localattributes =
  att.global.attributes,
  ## gives a name for the type of feature structure being declared.
  attribute type { data.enumerated },
  ## gives the name of one or more typed feature structures
  ##	from which this type inherits feature specifications and
  ##	constraints; if this type includes a feature specification
  ##	with the same name as that of any of those specified by this
  ##	attribute, or if more than one specification of the same name
  ##	is inherited, then the set of possible values is defined by
  ##	unification. Similarly, the set of constraints applicable is
  ##	derived by combining those specified explicitly within this
  ##	element with those implied by the baseTypes
  ##	attribute. When no baseTypes attribute is specified, no
  ##	feature specification or constraint is inherited.
  attribute baseTypes {
    list { data.name+ }
  }?,
  empty

fsDescr =
  ## (feature system description (in FSD)) describes in prose what is represented by the type of feature
  ## structure declared in the enclosing fsDecl.
  element fsDescr { fsDescr.content, fsDescr.localattributes }
fsDescr.content = macro.limitedContent
fsDescr.localattributes = att.global.attributes, empty

fsdDecl =
  ## (feature system declaration) provides a feature system declaration comprising one or more
  ##   feature structure declarations or feature structure declaration links.
  element fsdDecl { fsdDecl.content, fsdDecl.localattributes }
fsdDecl.content = (fsDecl | fsdLink)+
fsdDecl.localattributes = att.global.attributes, empty

fsdLink =
  ## (feature structure declaration link) associates the name of a typed feature structure with a feature
  ## structure declaration for it.
  element fsdLink { fsdLink.content, fsdLink.localattributes }
fsdLink.content = empty
fsdLink.localattributes =
  att.global.attributes,
  ## identifies the type of feature structure to be documented;
  ##       this will be the value of the type attribute on at least one
  ## feature structure.
  attribute type { data.enumerated },
  ## supplies a pointer to a feature structure declaration
  ##       (fsDecl) element within the current document or elsewhere. 
  attribute target { data.pointer },
  empty

fvLib =
  ## (feature-value library) assembles a library of reusable feature value elements
  ##   (including complete feature structures).
  element fvLib { fvLib.content, fvLib.localattributes }
fvLib.content = model.featureVal*
fvLib.localattributes = att.global.attributes, empty

if =
  ## defines a conditional default value for a feature; the condition
  ## is specified as a feature structure, and is met if it
  ## subsumes the feature structure in the text for which a
  ## default value is sought.
  element if { if.content, if.localattributes }
if.content = (fs | f), then, model.featureVal
if.localattributes = att.global.attributes, empty

iff =
  ## (if and only if) separates the condition from the consequence in a bicond
  ## element.
  element iff { iff.content, iff.localattributes }
iff.content = empty
iff.localattributes = att.global.attributes, empty

numeric =
  ## (numeric value) represents the value part of a feature-value specification
  ##   which contains a numeric value or range.
  element numeric { numeric.content, numeric.localattributes }
numeric.content = empty
numeric.localattributes =
  att.global.attributes,
  ## supplies a lower bound for the numeric value represented,
  ##       and also (if max is not supplied) its upper bound.
  attribute value { data.numeric },
  ## supplies an upper bound for the numeric value represented.
  attribute max { data.numeric }?,
  ## specifies whether the value represented should be
  ##	  truncated to give an integer value.
  attribute trunc { data.truthValue }?,
  empty

\string =
  ## (string value) represents the value part of a feature-value specification
  ##   which contains a string.
  element string { string.content, string.localattributes }
string.content = macro.xtext
string.localattributes = att.global.attributes, empty

symbol =
  ## (symbolic value) represents the value part of a feature-value specification
  ##   which contains one of a finite list of symbols.
  element symbol { symbol.content, symbol.localattributes }
symbol.content = empty
symbol.localattributes =
  att.global.attributes,
  ## supplies the symbolic value for the feature, one of a finite list that
  ## may be specified in a feature declaration.
  attribute value { data.word },
  empty

then =
  ## separates the condition from the default in an if, or
  ## the antecedent and the consequent in a cond element.
  element then { then.content, then.localattributes }
then.content = empty
then.localattributes = att.global.attributes, empty

vAlt =
  ## (value alternation) represents the value part of a feature-value specification
  ##   which contains a set of values, only one of which can be valid.
  element vAlt { vAlt.content, vAlt.localattributes }
vAlt.content = model.featureVal, model.featureVal+
vAlt.localattributes = att.global.attributes, empty

vColl =
  ## (collection of values) represents the value part of a feature-value specification
  ##   which contains multiple values organized as a set, bag, or list.
  element vColl { vColl.content, vColl.localattributes }
vColl.content = (fs | model.featureVal.single)*
vColl.localattributes =
  att.global.attributes,
  ## (organization) indicates organization of given value or values as  set, bag or list.
  attribute org {
    ## indicates that the given values are organized as a set.
    "set" | ## indicates that the given values are organized as a
      ## bag (multiset).
      "bag" | ## indicates that the given values are organized as a
      ## list.
      "list"
  }?,
  empty

vDefault =
  ## (value default) declares the default value to be supplied when a feature structure
  ## does not contain an instance of f for this name; if
  ## unconditional, it is specified as one (or, depending on the value of
  ## the org attribute of the enclosing fDecl) more
  ## fs elements or primitive values;
  ## if conditional, it is specified as
  ## one or more if elements; if no default is specified, or no
  ## condition matches, the value none is assumed.
  element vDefault { vDefault.content, vDefault.localattributes }
vDefault.content = model.featureVal+ | if+
vDefault.localattributes = att.global.attributes, empty

vLabel =
  ## (value label) represents the value part of a feature-value specification
  ##   which appears at more than one point in a feature structure.
  element vLabel { vLabel.content, vLabel.localattributes }
vLabel.content = model.featureVal?
vLabel.localattributes =
  att.global.attributes,
  ## supplies a name for the sharing point.
  attribute name { data.word },
  empty

vMerge =
  ## (merged collection of values) represents a feature value which is the result of merging
  ##   together the feature values contained by its children, using the organization
  ##   specified by the org attribute.
  element vMerge { vMerge.content, vMerge.localattributes }
vMerge.content = model.featureVal+
vMerge.localattributes =
  att.global.attributes,
  ## indicates the organization of the resulting merged values as  set, bag or list.
  attribute org {
    ## indicates that the resulting values are organized as a set.
    "set" | ## indicates that the resulting values are organized as a bag (multiset).
      "bag" | ## indicates that the resulting values are organized as a list.
      "list"
  }?,
  empty

vNot =
  ## (value negation) represents a feature value which is the negation of its content.
  element vNot { vNot.content, vNot.localattributes }
vNot.content = model.featureVal
vNot.localattributes = att.global.attributes, empty

vRange =
  ## (value range) defines the range of allowed values for a feature, in the form of
  ## an fs, vAlt, or primitive value;
  ## for the value of an f to be valid, it must be
  ## subsumed by the specified range; if the f
  ## contains multiple values (as sanctioned by the org attribute),
  ## then each value must be subsumed by the vRange.
  element vRange { vRange.content, vRange.localattributes }
vRange.content = model.featureVal
vRange.localattributes = att.global.attributes, empty
# 3. macros
