default namespace = "http://www.w3.org/1998/Math/MathML"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace ns1 = "http://www.isocat.org/ns/dcr"
namespace ns2 = "http://www.w3.org/1999/xhtml"
namespace ns3 = "http://www.example.org/cannot/really/use/XInclude"
namespace ns4 = "http://www.w3.org/2000/svg"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace sch = "http://purl.oclc.org/dsdl/schematron"
namespace sqf = "http://www.schematron-quickfix.com/validator/process"
namespace tei = "http://www.tei-c.org/ns/1.0"
namespace teix = "http://www.tei-c.org/ns/Examples"
namespace xi = "http://www.w3.org/2001/XInclude"
namespace xlink = "http://www.w3.org/1999/xlink"

# Schema generated from ODD source 2021-02-25T14:46:02Z. .
# TEI Edition: Version 4.2.0. Last updated on
#	25th February 2021, revision 736c0acf0
# TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.2.0/
#

#
div {
  Boolean.datatype = "false" | "true"
  ClipFillRule.datatype = "nonzero" | "evenodd" | "inherit"
  ContentType.datatype = string
  Coordinate.datatype = string
  Coordinates.datatype = string
  Color.datatype = string
  Integer.datatype = string
  LanguageCode.datatype = xsd:NMTOKEN
  LanguageCodes.datatype = string
  Length.datatype = string
  Lengths.datatype = string
  Number.datatype = string
  Numbers.datatype = string
  OpacityValue.datatype = string
  PathData.datatype = string
  PreserveAspectRatioSpec.datatype = string
  Script.datatype = string
  SVGColor.datatype = string
  Text.datatype = string
  TransformList.datatype = string
  URI.datatype = string
  ViewBoxSpec.datatype = string
  XLINK.xmlns.attrib = empty
  SVG.xmlns.attrib = XLINK.xmlns.attrib
  SVG.Description.extra.class = notAllowed
  SVG.Description.class =
    desc | title | metadata | SVG.Description.extra.class
  SVG.Use.extra.class = notAllowed
  SVG.Use.class = use | SVG.Use.extra.class
  SVG.Structure.extra.class = notAllowed
  SVG.Structure.class =
    svg | g | defs | symbol | SVG.Use.class | SVG.Structure.extra.class
  SVG.Conditional.extra.class = notAllowed
  SVG.Conditional.class = switch | SVG.Conditional.extra.class
  SVG.Image.extra.class = notAllowed
  SVG.Image.class = image | SVG.Image.extra.class
  SVG.Style.extra.class = notAllowed
  SVG.Style.class = style | SVG.Style.extra.class
  SVG.Shape.extra.class = notAllowed
  SVG.Shape.class =
    path
    | rect
    | circle
    | line
    | ellipse
    | polyline
    | polygon
    | SVG.Shape.extra.class
  SVG.Text.extra.class = notAllowed
  SVG.Text.class = \text | altGlyphDef | SVG.Text.extra.class
  SVG.TextContent.extra.class = notAllowed
  SVG.TextContent.class =
    tspan | tref | textPath | altGlyph | SVG.TextContent.extra.class
  SVG.Marker.extra.class = notAllowed
  SVG.Marker.class = marker | SVG.Marker.extra.class
  SVG.ColorProfile.extra.class = notAllowed
  SVG.ColorProfile.class = color-profile | SVG.ColorProfile.extra.class
  SVG.Gradient.extra.class = notAllowed
  SVG.Gradient.class =
    linearGradient | radialGradient | SVG.Gradient.extra.class
  SVG.Pattern.extra.class = notAllowed
  SVG.Pattern.class = svgpattern | SVG.Pattern.extra.class
  SVG.Clip.extra.class = notAllowed
  SVG.Clip.class = clipPath | SVG.Clip.extra.class
  SVG.Mask.extra.class = notAllowed
  SVG.Mask.class = mask | SVG.Mask.extra.class
  SVG.Filter.extra.class = notAllowed
  SVG.Filter.class = filter | SVG.Filter.extra.class
  SVG.FilterPrimitive.extra.class = notAllowed
  SVG.FilterPrimitive.class =
    feBlend
    | feColorMatrix
    | feComponentTransfer
    | feComposite
    | feConvolveMatrix
    | feDiffuseLighting
    | feDisplacementMap
    | feFlood
    | feGaussianBlur
    | feImage
    | feMerge
    | feMorphology
    | feOffset
    | feSpecularLighting
    | feTile
    | feTurbulence
    | SVG.FilterPrimitive.extra.class
  SVG.Cursor.extra.class = notAllowed
  SVG.Cursor.class = cursor | SVG.Cursor.extra.class
  SVG.Hyperlink.extra.class = notAllowed
  SVG.Hyperlink.class = a | SVG.Hyperlink.extra.class
  SVG.View.extra.class = notAllowed
  SVG.View.class = view | SVG.View.extra.class
  SVG.Script.extra.class = notAllowed
  SVG.Script.class = script | SVG.Script.extra.class
  SVG.Animation.extra.class = notAllowed
  SVG.Animation.class =
    animate
    | set
    | animateMotion
    | animateColor
    | animateTransform
    | SVG.Animation.extra.class
  SVG.Font.extra.class = notAllowed
  SVG.Font.class = font | font-face | SVG.Font.extra.class
  SVG.Extensibility.extra.class = notAllowed
  SVG.Extensibility.class =
    foreignObject | SVG.Extensibility.extra.class
  ExtensionList.datatype = string
  FeatureList.datatype = string
  SVG.Conditional.extra.attrib = empty
  SVG.Conditional.attrib =
    attribute requiredFeatures { FeatureList.datatype }?,
    attribute requiredExtensions { ExtensionList.datatype }?,
    attribute systemLanguage { LanguageCodes.datatype }?,
    SVG.Conditional.extra.attrib
  ClassList.datatype = string
  StyleSheet.datatype = string
  SVG.Style.extra.attrib = empty
  SVG.Style.attrib =
    attribute style { StyleSheet.datatype }?,
    attribute class { ClassList.datatype }?,
    SVG.Style.extra.attrib
  BaselineShiftValue.datatype = string
  FontFamilyValue.datatype = string
  FontSizeValue.datatype = string
  FontSizeAdjustValue.datatype = string
  GlyphOrientationHorizontalValue.datatype = string
  GlyphOrientationVerticalValue.datatype = string
  KerningValue.datatype = string
  SpacingValue.datatype = string
  TextDecorationValue.datatype = string
  SVG.Text.extra.attrib = empty
  SVG.Text.attrib =
    attribute writing-mode {
      "lr-tb" | "rl-tb" | "tb-rl" | "lr" | "rl" | "tb" | "inherit"
    }?,
    SVG.Text.extra.attrib
  SVG.TextContent.extra.attrib = empty
  SVG.TextContent.attrib =
    attribute alignment-baseline {
      "auto"
      | "baseline"
      | "before-edge"
      | "text-before-edge"
      | "middle"
      | "central"
      | "after-edge"
      | "text-after-edge"
      | "ideographic"
      | "alphabetic"
      | "hanging"
      | "mathematical"
      | "inherit"
    }?,
    attribute baseline-shift { BaselineShiftValue.datatype }?,
    attribute direction { "ltr" | "rtl" | "inherit" }?,
    attribute dominant-baseline {
      "auto"
      | "use-script"
      | "no-change"
      | "reset-size"
      | "ideographic"
      | "alphabetic"
      | "hanging"
      | "mathematical"
      | "central"
      | "middle"
      | "text-after-edge"
      | "text-before-edge"
      | "inherit"
    }?,
    attribute glyph-orientation-horizontal {
      GlyphOrientationHorizontalValue.datatype
    }?,
    attribute glyph-orientation-vertical {
      GlyphOrientationVerticalValue.datatype
    }?,
    attribute kerning { KerningValue.datatype }?,
    attribute letter-spacing { SpacingValue.datatype }?,
    attribute text-anchor { "start" | "middle" | "end" | "inherit" }?,
    attribute text-decoration { TextDecorationValue.datatype }?,
    attribute unicode-bidi {
      "normal" | "embed" | "bidi-override" | "inherit"
    }?,
    attribute word-spacing { SpacingValue.datatype }?,
    SVG.TextContent.extra.attrib
  SVG.Font.extra.attrib = empty
  SVG.Font.attrib =
    attribute font-family { FontFamilyValue.datatype }?,
    attribute font-size { FontSizeValue.datatype }?,
    attribute font-size-adjust { FontSizeAdjustValue.datatype }?,
    attribute font-stretch {
      "normal"
      | "wider"
      | "narrower"
      | "ultra-condensed"
      | "extra-condensed"
      | "condensed"
      | "semi-condensed"
      | "semi-expanded"
      | "expanded"
      | "extra-expanded"
      | "ultra-expanded"
      | "inherit"
    }?,
    attribute font-style {
      "normal" | "italic" | "oblique" | "inherit"
    }?,
    attribute font-variant { "normal" | "small-caps" | "inherit" }?,
    attribute font-weight {
      "normal"
      | "bold"
      | "bolder"
      | "lighter"
      | "100"
      | "200"
      | "300"
      | "400"
      | "500"
      | "600"
      | "700"
      | "800"
      | "900"
      | "inherit"
    }?,
    SVG.Font.extra.attrib
  MarkerValue.datatype = string
  SVG.Marker.extra.attrib = empty
  SVG.Marker.attrib =
    attribute marker-start { MarkerValue.datatype }?,
    attribute marker-mid { MarkerValue.datatype }?,
    attribute marker-end { MarkerValue.datatype }?,
    SVG.Marker.extra.attrib
  SVG.ColorProfile.extra.attrib = empty
  SVG.ColorProfile.attrib =
    attribute color-profile { text }?,
    SVG.ColorProfile.extra.attrib
  NumberOrPercentage.datatype = string
  SVG.Gradient.extra.attrib = empty
  SVG.Gradient.attrib =
    attribute stop-color { SVGColor.datatype }?,
    attribute stop-opacity { OpacityValue.datatype }?,
    SVG.Gradient.extra.attrib
  ClipPathValue.datatype = string
  SVG.Clip.extra.attrib = empty
  SVG.Clip.attrib =
    attribute clip-path { ClipPathValue.datatype }?,
    attribute clip-rule { ClipFillRule.datatype }?,
    SVG.Clip.extra.attrib
  MaskValue.datatype = string
  SVG.Mask.extra.attrib = empty
  SVG.Mask.attrib =
    attribute mask { MaskValue.datatype }?,
    SVG.Mask.extra.attrib
  FilterValue.datatype = string
  NumberOptionalNumber.datatype = string
  SVG.Filter.extra.attrib = empty
  SVG.Filter.attrib =
    attribute filter { FilterValue.datatype }?,
    SVG.Filter.extra.attrib
  SVG.FilterColor.extra.attrib = empty
  SVG.FilterColor.attrib =
    attribute color-interpolation-filters {
      "auto" | "sRGB" | "linearRGB" | "inherit"
    }?,
    SVG.FilterColor.extra.attrib
  CursorValue.datatype = string
  SVG.Cursor.extra.attrib = empty
  SVG.Cursor.attrib =
    attribute cursor { CursorValue.datatype }?,
    SVG.Cursor.extra.attrib
  SVG.id.attrib = attribute id { xsd:ID }?
  SVG.base.attrib = attribute xml:base { URI.datatype }?
  SVG.lang.attrib = attribute xml:lang { LanguageCode.datatype }?
  SVG.space.attrib = attribute xml:space { "default" | "preserve" }?
  SVG.Core.extra.attrib = empty
  SVG.Core.attrib =
    SVG.id.attrib,
    SVG.base.attrib,
    SVG.lang.attrib,
    SVG.space.attrib,
    SVG.Core.extra.attrib
  EnableBackgroundValue.datatype = string
  SVG.enable-background.attrib =
    attribute enable-background { EnableBackgroundValue.datatype }?
  SVG.Container.extra.attrib = empty
  SVG.Container.attrib =
    SVG.enable-background.attrib, SVG.Container.extra.attrib
  ClipValue.datatype = string
  SVG.clip.attrib = attribute clip { ClipValue.datatype }?
  SVG.overflow.attrib =
    attribute overflow {
      "visible" | "hidden" | "scroll" | "auto" | "inherit"
    }?
  SVG.Viewport.extra.attrib = empty
  SVG.Viewport.attrib =
    SVG.clip.attrib, SVG.overflow.attrib, SVG.Viewport.extra.attrib
  Paint.datatype = string
  StrokeDashArrayValue.datatype = string
  StrokeDashOffsetValue.datatype = string
  StrokeMiterLimitValue.datatype = string
  StrokeWidthValue.datatype = string
  SVG.fill.attrib = attribute fill { Paint.datatype }?
  SVG.fill-rule.attrib = attribute fill-rule { ClipFillRule.datatype }?
  SVG.stroke.attrib = attribute stroke { Paint.datatype }?
  SVG.stroke-dasharray.attrib =
    attribute stroke-dasharray { StrokeDashArrayValue.datatype }?
  SVG.stroke-dashoffset.attrib =
    attribute stroke-dashoffset { StrokeDashOffsetValue.datatype }?
  SVG.stroke-linecap.attrib =
    attribute stroke-linecap {
      "butt" | "round" | "square" | "inherit"
    }?
  SVG.stroke-linejoin.attrib =
    attribute stroke-linejoin {
      "miter" | "round" | "bevel" | "inherit"
    }?
  SVG.stroke-miterlimit.attrib =
    attribute stroke-miterlimit { StrokeMiterLimitValue.datatype }?
  SVG.stroke-width.attrib =
    attribute stroke-width { StrokeWidthValue.datatype }?
  SVG.Paint.extra.attrib = empty
  SVG.Paint.attrib =
    SVG.fill.attrib,
    SVG.fill-rule.attrib,
    SVG.stroke.attrib,
    SVG.stroke-dasharray.attrib,
    SVG.stroke-dashoffset.attrib,
    SVG.stroke-linecap.attrib,
    SVG.stroke-linejoin.attrib,
    SVG.stroke-miterlimit.attrib,
    SVG.stroke-width.attrib,
    SVG.Paint.extra.attrib
  SVG.color.attrib = attribute color { Color.datatype }?
  SVG.color-interpolation.attrib =
    attribute color-interpolation {
      "auto" | "sRGB" | "linearRGB" | "inherit"
    }?
  SVG.color-rendering.attrib =
    attribute color-rendering {
      "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit"
    }?
  SVG.Color.extra.attrib = empty
  SVG.Color.attrib =
    SVG.color.attrib,
    SVG.color-interpolation.attrib,
    SVG.color-rendering.attrib,
    SVG.Color.extra.attrib
  SVG.opacity.attrib = attribute opacity { OpacityValue.datatype }?
  SVG.fill-opacity.attrib =
    attribute fill-opacity { OpacityValue.datatype }?
  SVG.stroke-opacity.attrib =
    attribute stroke-opacity { OpacityValue.datatype }?
  SVG.Opacity.extra.attrib = empty
  SVG.Opacity.attrib =
    SVG.opacity.attrib,
    SVG.fill-opacity.attrib,
    SVG.stroke-opacity.attrib,
    SVG.Opacity.extra.attrib
  SVG.display.attrib =
    attribute display {
      "inline"
      | "block"
      | "list-item"
      | "run-in"
      | "compact"
      | "marker"
      | "table"
      | "inline-table"
      | "table-row-group"
      | "table-header-group"
      | "table-footer-group"
      | "table-row"
      | "table-column-group"
      | "table-column"
      | "table-cell"
      | "table-caption"
      | "none"
      | "inherit"
    }?
  SVG.image-rendering.attrib =
    attribute image-rendering {
      "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit"
    }?
  SVG.pointer-events.attrib =
    attribute pointer-events {
      "visiblePainted"
      | "visibleFill"
      | "visibleStroke"
      | "visible"
      | "painted"
      | "fill"
      | "stroke"
      | "all"
      | "none"
      | "inherit"
    }?
  SVG.shape-rendering.attrib =
    attribute shape-rendering {
      "auto"
      | "optimizeSpeed"
      | "crispEdges"
      | "geometricPrecision"
      | "inherit"
    }?
  SVG.text-rendering.attrib =
    attribute text-rendering {
      "auto"
      | "optimizeSpeed"
      | "optimizeLegibility"
      | "geometricPrecision"
      | "inherit"
    }?
  SVG.visibility.attrib =
    attribute visibility { "visible" | "hidden" | "inherit" }?
  SVG.Graphics.extra.attrib = empty
  SVG.Graphics.attrib =
    SVG.display.attrib,
    SVG.image-rendering.attrib,
    SVG.pointer-events.attrib,
    SVG.shape-rendering.attrib,
    SVG.text-rendering.attrib,
    SVG.visibility.attrib,
    SVG.Graphics.extra.attrib
  SVG.onunload.attrib = attribute onunload { Script.datatype }?
  SVG.onabort.attrib = attribute onabort { Script.datatype }?
  SVG.onerror.attrib = attribute onerror { Script.datatype }?
  SVG.onresize.attrib = attribute onresize { Script.datatype }?
  SVG.onscroll.attrib = attribute onscroll { Script.datatype }?
  SVG.onzoom.attrib = attribute onzoom { Script.datatype }?
  SVG.DocumentEvents.extra.attrib = empty
  SVG.DocumentEvents.attrib =
    SVG.onunload.attrib,
    SVG.onabort.attrib,
    SVG.onerror.attrib,
    SVG.onresize.attrib,
    SVG.onscroll.attrib,
    SVG.onzoom.attrib,
    SVG.DocumentEvents.extra.attrib
  SVG.onfocusin.attrib = attribute onfocusin { Script.datatype }?
  SVG.onfocusout.attrib = attribute onfocusout { Script.datatype }?
  SVG.onactivate.attrib = attribute onactivate { Script.datatype }?
  SVG.onclick.attrib = attribute onclick { Script.datatype }?
  SVG.onmousedown.attrib = attribute onmousedown { Script.datatype }?
  SVG.onmouseup.attrib = attribute onmouseup { Script.datatype }?
  SVG.onmouseover.attrib = attribute onmouseover { Script.datatype }?
  SVG.onmousemove.attrib = attribute onmousemove { Script.datatype }?
  SVG.onmouseout.attrib = attribute onmouseout { Script.datatype }?
  SVG.onload.attrib = attribute onload { Script.datatype }?
  SVG.GraphicalEvents.extra.attrib = empty
  SVG.GraphicalEvents.attrib =
    SVG.onfocusin.attrib,
    SVG.onfocusout.attrib,
    SVG.onactivate.attrib,
    SVG.onclick.attrib,
    SVG.onmousedown.attrib,
    SVG.onmouseup.attrib,
    SVG.onmouseover.attrib,
    SVG.onmousemove.attrib,
    SVG.onmouseout.attrib,
    SVG.onload.attrib,
    SVG.GraphicalEvents.extra.attrib
  SVG.onbegin.attrib = attribute onbegin { Script.datatype }?
  SVG.onend.attrib = attribute onend { Script.datatype }?
  SVG.onrepeat.attrib = attribute onrepeat { Script.datatype }?
  SVG.AnimationEvents.extra.attrib = empty
  SVG.AnimationEvents.attrib =
    SVG.onbegin.attrib,
    SVG.onend.attrib,
    SVG.onrepeat.attrib,
    SVG.onload.attrib,
    SVG.AnimationEvents.extra.attrib
  SVG.XLink.extra.attrib = empty
  SVG.XLink.attrib =
    XLINK.xmlns.attrib,
    [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?,
    attribute xlink:href { URI.datatype }?,
    attribute xlink:role { URI.datatype }?,
    attribute xlink:arcrole { URI.datatype }?,
    attribute xlink:title { text }?,
    [ a:defaultValue = "other" ] attribute xlink:show { "other" }?,
    [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?,
    SVG.XLink.extra.attrib
  SVG.XLinkRequired.extra.attrib = empty
  SVG.XLinkRequired.attrib =
    XLINK.xmlns.attrib,
    [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?,
    attribute xlink:href { URI.datatype },
    attribute xlink:role { URI.datatype }?,
    attribute xlink:arcrole { URI.datatype }?,
    attribute xlink:title { text }?,
    [ a:defaultValue = "other" ] attribute xlink:show { "other" }?,
    [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?,
    SVG.XLinkRequired.extra.attrib
  SVG.XLinkEmbed.extra.attrib = empty
  SVG.XLinkEmbed.attrib =
    XLINK.xmlns.attrib,
    [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?,
    attribute xlink:href { URI.datatype },
    attribute xlink:role { URI.datatype }?,
    attribute xlink:arcrole { URI.datatype }?,
    attribute xlink:title { text }?,
    [ a:defaultValue = "embed" ] attribute xlink:show { "embed" }?,
    [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?,
    SVG.XLinkEmbed.extra.attrib
  SVG.XLinkReplace.extra.attrib = empty
  SVG.XLinkReplace.attrib =
    XLINK.xmlns.attrib,
    [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?,
    attribute xlink:href { URI.datatype },
    attribute xlink:role { URI.datatype }?,
    attribute xlink:arcrole { URI.datatype }?,
    attribute xlink:title { text }?,
    [ a:defaultValue = "replace" ]
    attribute xlink:show { "new" | "replace" }?,
    [ a:defaultValue = "onRequest" ]
    attribute xlink:actuate { "onRequest" }?,
    SVG.XLinkReplace.extra.attrib
  SVG.externalResourcesRequired.attrib =
    attribute externalResourcesRequired { Boolean.datatype }?
  SVG.External.extra.attrib = empty
  SVG.External.attrib =
    SVG.externalResourcesRequired.attrib, SVG.External.extra.attrib
  SVG.Presentation.extra.attrib = empty
  SVG.Presentation.attrib =
    SVG.Container.attrib,
    SVG.Viewport.attrib,
    SVG.Text.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Marker.attrib,
    SVG.ColorProfile.attrib,
    SVG.Gradient.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.FilterColor.attrib,
    SVG.Cursor.attrib,
    attribute flood-color { SVGColor.datatype }?,
    attribute flood-opacity { OpacityValue.datatype }?,
    attribute lighting-color { SVGColor.datatype }?,
    SVG.Presentation.extra.attrib
  SVG.svg.extra.content = notAllowed
  SVG.svg.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.svg.extra.content)*
  svg = element ns4:svg { attlist.svg, SVG.svg.content }
  attlist.svg &=
    SVG.xmlns.attrib,
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.DocumentEvents.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute viewBox { ViewBoxSpec.datatype }?,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?,
    [ a:defaultValue = "magnify" ]
    attribute zoomAndPan { "disable" | "magnify" }?,
    [ a:defaultValue = "1.1" ] attribute version { string "1.1" }?,
    attribute baseProfile { Text.datatype }?,
    [ a:defaultValue = "text/ecmascript" ]
    attribute contentScriptType { ContentType.datatype }?,
    [ a:defaultValue = "text/css" ]
    attribute contentStyleType { ContentType.datatype }?
  SVG.g.extra.content = notAllowed
  SVG.g.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.g.extra.content)*
  g = element ns4:g { attlist.g, SVG.g.content }
  attlist.g &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute transform { TransformList.datatype }?
  SVG.defs.extra.content = notAllowed
  SVG.defs.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.defs.extra.content)*
  defs = element ns4:defs { attlist.defs, SVG.defs.content }
  attlist.defs &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute transform { TransformList.datatype }?
  SVG.desc.extra.content = notAllowed
  SVG.desc.content = (text | SVG.desc.extra.content)*
  desc = element ns4:desc { attlist.desc, SVG.desc.content }
  attlist.desc &= SVG.Core.attrib, SVG.Style.attrib
  SVG.title.extra.content = notAllowed
  SVG.title.content = (text | SVG.title.extra.content)*
  title = element ns4:title { attlist.title, SVG.title.content }
  attlist.title &= SVG.Core.attrib, SVG.Style.attrib
  SVG.metadata.extra.content = notAllowed
  SVG.metadata.content = (text | SVG.metadata.extra.content)*
  metadata =
    element ns4:metadata { attlist.metadata, SVG.metadata.content }
  attlist.metadata &= SVG.Core.attrib
  SVG.symbol.extra.content = notAllowed
  SVG.symbol.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.symbol.extra.content)*
  symbol = element ns4:symbol { attlist.symbol, SVG.symbol.content }
  attlist.symbol &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute viewBox { ViewBoxSpec.datatype }?,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?
  SVG.use.extra.content = notAllowed
  SVG.use.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.use.extra.content)*
  use = element ns4:use { attlist.use, SVG.use.content }
  attlist.use &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.XLinkEmbed.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute transform { TransformList.datatype }?
  SVG.switch.extra.content = notAllowed
  SVG.switch.content =
    SVG.Description.class*,
    (svg
     | g
     | use
     | \text
     | SVG.Animation.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Shape.class
     | SVG.Hyperlink.class
     | SVG.Extensibility.class
     | SVG.switch.extra.content)*
  switch = element ns4:switch { attlist.switch, SVG.switch.content }
  attlist.switch &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute transform { TransformList.datatype }?
  SVG.image.extra.content = notAllowed
  SVG.image.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.image.extra.content)*
  image = element ns4:image { attlist.image, SVG.image.content }
  attlist.image &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Viewport.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.ColorProfile.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.XLinkEmbed.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype },
    attribute height { Length.datatype },
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?,
    attribute transform { TransformList.datatype }?
  MediaDesc.datatype = string
  SVG.style.extra.content = notAllowed
  SVG.style.content = (text | SVG.style.extra.content)*
  style = element ns4:style { attlist.style, SVG.style.content }
  attlist.style &=
    [ a:defaultValue = "preserve" ] attribute xml:space { "preserve" }?,
    SVG.id.attrib,
    SVG.base.attrib,
    SVG.lang.attrib,
    SVG.Core.extra.attrib,
    attribute type { ContentType.datatype },
    attribute media { MediaDesc.datatype }?,
    attribute title { Text.datatype }?
  Points.datatype = string
  SVG.path.extra.content = notAllowed
  SVG.path.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.path.extra.content)*
  path = element ns4:path { attlist.path, SVG.path.content }
  attlist.path &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Marker.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute d { PathData.datatype },
    attribute pathLength { Number.datatype }?,
    attribute transform { TransformList.datatype }?
  SVG.rect.extra.content = notAllowed
  SVG.rect.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.rect.extra.content)*
  rect = element ns4:rect { attlist.rect, SVG.rect.content }
  attlist.rect &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype },
    attribute height { Length.datatype },
    attribute rx { Length.datatype }?,
    attribute ry { Length.datatype }?,
    attribute transform { TransformList.datatype }?
  SVG.circle.extra.content = notAllowed
  SVG.circle.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.circle.extra.content)*
  circle = element ns4:circle { attlist.circle, SVG.circle.content }
  attlist.circle &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute cx { Coordinate.datatype }?,
    attribute cy { Coordinate.datatype }?,
    attribute r { Length.datatype },
    attribute transform { TransformList.datatype }?
  SVG.line.extra.content = notAllowed
  SVG.line.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.line.extra.content)*
  line = element ns4:line { attlist.line, SVG.line.content }
  attlist.line &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Marker.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute x1 { Coordinate.datatype }?,
    attribute y1 { Coordinate.datatype }?,
    attribute x2 { Coordinate.datatype }?,
    attribute y2 { Coordinate.datatype }?,
    attribute transform { TransformList.datatype }?
  SVG.ellipse.extra.content = notAllowed
  SVG.ellipse.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.ellipse.extra.content)*
  ellipse = element ns4:ellipse { attlist.ellipse, SVG.ellipse.content }
  attlist.ellipse &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute cx { Coordinate.datatype }?,
    attribute cy { Coordinate.datatype }?,
    attribute rx { Length.datatype },
    attribute ry { Length.datatype },
    attribute transform { TransformList.datatype }?
  SVG.polyline.extra.content = notAllowed
  SVG.polyline.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.polyline.extra.content)*
  polyline =
    element ns4:polyline { attlist.polyline, SVG.polyline.content }
  attlist.polyline &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Marker.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute points { Points.datatype },
    attribute transform { TransformList.datatype }?
  SVG.polygon.extra.content = notAllowed
  SVG.polygon.content =
    SVG.Description.class*,
    (SVG.Animation.class | SVG.polygon.extra.content)*
  polygon = element ns4:polygon { attlist.polygon, SVG.polygon.content }
  attlist.polygon &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Marker.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute points { Points.datatype },
    attribute transform { TransformList.datatype }?
  SVG.text.extra.content = notAllowed
  SVG.text.content =
    (text
     | SVG.Description.class
     | SVG.Animation.class
     | SVG.TextContent.class
     | SVG.Hyperlink.class
     | SVG.text.extra.content)*
  \text = element ns4:text { attlist.text, SVG.text.content }
  attlist.text &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Text.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute x { Coordinates.datatype }?,
    attribute y { Coordinates.datatype }?,
    attribute dx { Lengths.datatype }?,
    attribute dy { Lengths.datatype }?,
    attribute rotate { Numbers.datatype }?,
    attribute textLength { Length.datatype }?,
    attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?,
    attribute transform { TransformList.datatype }?
  SVG.tspan.extra.content = notAllowed
  SVG.tspan.content =
    (text
     | tspan
     | tref
     | altGlyph
     | animate
     | set
     | animateColor
     | SVG.Description.class
     | SVG.Hyperlink.class
     | SVG.tspan.extra.content)*
  tspan = element ns4:tspan { attlist.tspan, SVG.tspan.content }
  attlist.tspan &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute x { Coordinates.datatype }?,
    attribute y { Coordinates.datatype }?,
    attribute dx { Lengths.datatype }?,
    attribute dy { Lengths.datatype }?,
    attribute rotate { Numbers.datatype }?,
    attribute textLength { Length.datatype }?,
    attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?
  SVG.tref.extra.content = notAllowed
  SVG.tref.content =
    (animate
     | set
     | animateColor
     | SVG.Description.class
     | SVG.tref.extra.content)*
  tref = element ns4:tref { attlist.tref, SVG.tref.content }
  attlist.tref &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.XLinkRequired.attrib,
    SVG.External.attrib,
    attribute x { Coordinates.datatype }?,
    attribute y { Coordinates.datatype }?,
    attribute dx { Lengths.datatype }?,
    attribute dy { Lengths.datatype }?,
    attribute rotate { Numbers.datatype }?,
    attribute textLength { Length.datatype }?,
    attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?
  SVG.textPath.extra.content = notAllowed
  SVG.textPath.content =
    (text
     | tspan
     | tref
     | altGlyph
     | animate
     | set
     | animateColor
     | SVG.Description.class
     | SVG.Hyperlink.class
     | SVG.textPath.extra.content)*
  textPath =
    element ns4:textPath { attlist.textPath, SVG.textPath.content }
  attlist.textPath &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.XLinkRequired.attrib,
    SVG.External.attrib,
    attribute startOffset { Length.datatype }?,
    attribute textLength { Length.datatype }?,
    attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?,
    attribute method { "align" | "stretch" }?,
    attribute spacing { "auto" | "exact" }?
  SVG.altGlyph.extra.content = notAllowed
  SVG.altGlyph.content = (text | SVG.altGlyph.extra.content)*
  altGlyph =
    element ns4:altGlyph { attlist.altGlyph, SVG.altGlyph.content }
  attlist.altGlyph &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.Cursor.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute x { Coordinates.datatype }?,
    attribute y { Coordinates.datatype }?,
    attribute dx { Lengths.datatype }?,
    attribute dy { Lengths.datatype }?,
    attribute glyphRef { text }?,
    attribute format { text }?,
    attribute rotate { Numbers.datatype }?
  SVG.altGlyphDef.extra.content = notAllowed
  SVG.altGlyphDef.content =
    (glyphRef+ | altGlyphItem+) | SVG.altGlyphDef.extra.content
  altGlyphDef =
    element ns4:altGlyphDef {
      attlist.altGlyphDef, SVG.altGlyphDef.content
    }
  attlist.altGlyphDef &= SVG.Core.attrib
  SVG.altGlyphItem.extra.content = notAllowed
  SVG.altGlyphItem.content = glyphRef+ | SVG.altGlyphItem.extra.content
  altGlyphItem =
    element ns4:altGlyphItem {
      attlist.altGlyphItem, SVG.altGlyphItem.content
    }
  attlist.altGlyphItem &= SVG.Core.attrib
  SVG.glyphRef.content = empty
  glyphRef =
    element ns4:glyphRef { attlist.glyphRef, SVG.glyphRef.content }
  attlist.glyphRef &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Font.attrib,
    SVG.XLink.attrib,
    attribute x { Number.datatype }?,
    attribute y { Number.datatype }?,
    attribute dx { Number.datatype }?,
    attribute dy { Number.datatype }?,
    attribute glyphRef { text }?,
    attribute format { text }?
  SVG.marker.extra.content = notAllowed
  SVG.marker.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.marker.extra.content)*
  marker = element ns4:marker { attlist.marker, SVG.marker.content }
  attlist.marker &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.External.attrib,
    attribute refX { Coordinate.datatype }?,
    attribute refY { Coordinate.datatype }?,
    attribute markerUnits { "strokeWidth" | "userSpaceOnUse" }?,
    attribute markerWidth { Length.datatype }?,
    attribute markerHeight { Length.datatype }?,
    attribute orient { text }?,
    attribute viewBox { ViewBoxSpec.datatype }?,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?
  SVG.color-profile.extra.content = notAllowed
  SVG.color-profile.content =
    (SVG.Description.class | SVG.color-profile.extra.content)*
  color-profile =
    element ns4:color-profile {
      attlist.color-profile, SVG.color-profile.content
    }
  attlist.color-profile &=
    SVG.Core.attrib,
    SVG.XLink.attrib,
    attribute local { text }?,
    attribute name { text },
    [ a:defaultValue = "auto" ]
    attribute rendering-intent {
      "auto"
      | "perceptual"
      | "relative-colorimetric"
      | "saturation"
      | "absolute-colorimetric"
    }?
  SVG.linearGradient.extra.content = notAllowed
  SVG.linearGradient.content =
    SVG.Description.class*,
    (stop
     | animate
     | set
     | animateTransform
     | SVG.linearGradient.extra.content)*
  linearGradient =
    element ns4:linearGradient {
      attlist.linearGradient, SVG.linearGradient.content
    }
  attlist.linearGradient &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.Gradient.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute x1 { Coordinate.datatype }?,
    attribute y1 { Coordinate.datatype }?,
    attribute x2 { Coordinate.datatype }?,
    attribute y2 { Coordinate.datatype }?,
    attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
    attribute gradientTransform { TransformList.datatype }?,
    attribute spreadMethod { "pad" | "reflect" | "repeat" }?
  SVG.radialGradient.extra.content = notAllowed
  SVG.radialGradient.content =
    SVG.Description.class*,
    (stop
     | animate
     | set
     | animateTransform
     | SVG.radialGradient.extra.content)*
  radialGradient =
    element ns4:radialGradient {
      attlist.radialGradient, SVG.radialGradient.content
    }
  attlist.radialGradient &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.Gradient.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute cx { Coordinate.datatype }?,
    attribute cy { Coordinate.datatype }?,
    attribute r { Length.datatype }?,
    attribute fx { Coordinate.datatype }?,
    attribute fy { Coordinate.datatype }?,
    attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
    attribute gradientTransform { TransformList.datatype }?,
    attribute spreadMethod { "pad" | "reflect" | "repeat" }?
  SVG.stop.extra.content = notAllowed
  SVG.stop.content =
    (animate | set | animateColor | SVG.stop.extra.content)*
  stop = element ns4:stop { attlist.stop, SVG.stop.content }
  attlist.stop &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.Gradient.attrib,
    attribute offset { NumberOrPercentage.datatype }
  SVG.pattern.extra.content = notAllowed
  SVG.pattern.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.pattern.extra.content)*
  svgpattern =
    element ns4:pattern { attlist.pattern, SVG.pattern.content }
  attlist.pattern &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute patternUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
    attribute patternContentUnits {
      "userSpaceOnUse" | "objectBoundingBox"
    }?,
    attribute patternTransform { TransformList.datatype }?,
    attribute viewBox { ViewBoxSpec.datatype }?,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?
  SVG.clipPath.extra.content = notAllowed
  SVG.clipPath.content =
    SVG.Description.class*,
    (SVG.Animation.class
     | SVG.Use.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.clipPath.extra.content)*
  clipPath =
    element ns4:clipPath { attlist.clipPath, SVG.clipPath.content }
  attlist.clipPath &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Text.attrib,
    SVG.TextContent.attrib,
    SVG.Font.attrib,
    SVG.Paint.attrib,
    SVG.Color.attrib,
    SVG.Opacity.attrib,
    SVG.Graphics.attrib,
    SVG.Clip.attrib,
    SVG.Mask.attrib,
    SVG.Filter.attrib,
    SVG.Cursor.attrib,
    SVG.External.attrib,
    attribute transform { TransformList.datatype }?,
    attribute clipPathUnits { "userSpaceOnUse" | "objectBoundingBox" }?
  SVG.mask.extra.content = notAllowed
  SVG.mask.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.mask.extra.content)*
  mask = element ns4:mask { attlist.mask, SVG.mask.content }
  attlist.mask &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute maskUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
    attribute maskContentUnits {
      "userSpaceOnUse" | "objectBoundingBox"
    }?
  SVG.FilterPrimitive.extra.attrib = empty
  SVG.FilterPrimitive.attrib =
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute result { text }?,
    SVG.FilterPrimitive.extra.attrib
  SVG.FilterPrimitiveWithIn.extra.attrib = empty
  SVG.FilterPrimitiveWithIn.attrib =
    SVG.FilterPrimitive.attrib,
    attribute in { text }?,
    SVG.FilterPrimitiveWithIn.extra.attrib
  SVG.filter.extra.content = notAllowed
  SVG.filter.content =
    SVG.Description.class*,
    (animate
     | set
     | SVG.FilterPrimitive.class
     | SVG.filter.extra.content)*
  filter = element ns4:filter { attlist.filter, SVG.filter.content }
  attlist.filter &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype }?,
    attribute height { Length.datatype }?,
    attribute filterRes { NumberOptionalNumber.datatype }?,
    attribute filterUnits { "userSpaceOnUse" | "objectBoundingBox" }?,
    attribute primitiveUnits { "userSpaceOnUse" | "objectBoundingBox" }?
  SVG.feBlend.extra.content = notAllowed
  SVG.feBlend.content = (animate | set | SVG.feBlend.extra.content)*
  feBlend = element ns4:feBlend { attlist.feBlend, SVG.feBlend.content }
  attlist.feBlend &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute in2 { text },
    [ a:defaultValue = "normal" ]
    attribute mode {
      "normal" | "multiply" | "screen" | "darken" | "lighten"
    }?
  SVG.feColorMatrix.extra.content = notAllowed
  SVG.feColorMatrix.content =
    (animate | set | SVG.feColorMatrix.extra.content)*
  feColorMatrix =
    element ns4:feColorMatrix {
      attlist.feColorMatrix, SVG.feColorMatrix.content
    }
  attlist.feColorMatrix &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    [ a:defaultValue = "matrix" ]
    attribute type {
      "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha"
    }?,
    attribute values { text }?
  SVG.feComponentTransfer.extra.content = empty
  SVG.feComponentTransfer.content =
    feFuncR?,
    feFuncG?,
    feFuncB?,
    feFuncA?,
    SVG.feComponentTransfer.extra.content
  feComponentTransfer =
    element ns4:feComponentTransfer {
      attlist.feComponentTransfer, SVG.feComponentTransfer.content
    }
  attlist.feComponentTransfer &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib
  SVG.feComposite.extra.content = notAllowed
  SVG.feComposite.content =
    (animate | set | SVG.feComposite.extra.content)*
  feComposite =
    element ns4:feComposite {
      attlist.feComposite, SVG.feComposite.content
    }
  attlist.feComposite &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute in2 { text },
    [ a:defaultValue = "over" ]
    attribute operator {
      "over" | "in" | "out" | "atop" | "xor" | "arithmetic"
    }?,
    attribute k1 { Number.datatype }?,
    attribute k2 { Number.datatype }?,
    attribute k3 { Number.datatype }?,
    attribute k4 { Number.datatype }?
  SVG.feConvolveMatrix.extra.content = notAllowed
  SVG.feConvolveMatrix.content =
    (animate | set | SVG.feConvolveMatrix.extra.content)*
  feConvolveMatrix =
    element ns4:feConvolveMatrix {
      attlist.feConvolveMatrix, SVG.feConvolveMatrix.content
    }
  attlist.feConvolveMatrix &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute order { NumberOptionalNumber.datatype },
    attribute kernelMatrix { text },
    attribute divisor { Number.datatype }?,
    attribute bias { Number.datatype }?,
    attribute targetX { Integer.datatype }?,
    attribute targetY { Integer.datatype }?,
    [ a:defaultValue = "duplicate" ]
    attribute edgeMode { "duplicate" | "wrap" | "none" }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?,
    attribute preserveAlpha { Boolean.datatype }?
  SVG.feDiffuseLighting.extra.content = notAllowed
  SVG.feDiffuseLighting.content =
    (feDistantLight | fePointLight | feSpotLight),
    (animate
     | set
     | animateColor
     | SVG.feDiffuseLighting.extra.content)*
  feDiffuseLighting =
    element ns4:feDiffuseLighting {
      attlist.feDiffuseLighting, SVG.feDiffuseLighting.content
    }
  attlist.feDiffuseLighting &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute lighting-color { SVGColor.datatype }?,
    attribute surfaceScale { Number.datatype }?,
    attribute diffuseConstant { Number.datatype }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?
  SVG.feDisplacementMap.extra.content = notAllowed
  SVG.feDisplacementMap.content =
    (animate | set | SVG.feDisplacementMap.extra.content)*
  feDisplacementMap =
    element ns4:feDisplacementMap {
      attlist.feDisplacementMap, SVG.feDisplacementMap.content
    }
  attlist.feDisplacementMap &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute in2 { text },
    attribute scale { Number.datatype }?,
    [ a:defaultValue = "A" ]
    attribute xChannelSelector { "R" | "G" | "B" | "A" }?,
    [ a:defaultValue = "A" ]
    attribute yChannelSelector { "R" | "G" | "B" | "A" }?
  SVG.feFlood.extra.content = notAllowed
  SVG.feFlood.content =
    (animate | set | animateColor | SVG.feFlood.extra.content)*
  feFlood = element ns4:feFlood { attlist.feFlood, SVG.feFlood.content }
  attlist.feFlood &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute flood-color { SVGColor.datatype }?,
    attribute flood-opacity { OpacityValue.datatype }?
  SVG.feGaussianBlur.extra.content = notAllowed
  SVG.feGaussianBlur.content =
    (animate | set | SVG.feGaussianBlur.extra.content)*
  feGaussianBlur =
    element ns4:feGaussianBlur {
      attlist.feGaussianBlur, SVG.feGaussianBlur.content
    }
  attlist.feGaussianBlur &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute stdDeviation { NumberOptionalNumber.datatype }?
  SVG.feImage.extra.content = notAllowed
  SVG.feImage.content =
    (animate | set | animateTransform | SVG.feImage.extra.content)*
  feImage = element ns4:feImage { attlist.feImage, SVG.feImage.content }
  attlist.feImage &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.FilterPrimitive.attrib,
    SVG.XLinkEmbed.attrib,
    SVG.External.attrib,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?
  SVG.feMerge.extra.content = notAllowed
  SVG.feMerge.content = (feMergeNode | SVG.feMerge.extra.content)*
  feMerge = element ns4:feMerge { attlist.feMerge, SVG.feMerge.content }
  attlist.feMerge &=
    SVG.Core.attrib, SVG.FilterColor.attrib, SVG.FilterPrimitive.attrib
  SVG.feMergeNode.extra.content = notAllowed
  SVG.feMergeNode.content =
    (animate | set | SVG.feMergeNode.extra.content)*
  feMergeNode =
    element ns4:feMergeNode {
      attlist.feMergeNode, SVG.feMergeNode.content
    }
  attlist.feMergeNode &=
    SVG.Core.attrib,
    attribute in { text }?
  SVG.feMorphology.extra.content = notAllowed
  SVG.feMorphology.content =
    (animate | set | SVG.feMorphology.extra.content)*
  feMorphology =
    element ns4:feMorphology {
      attlist.feMorphology, SVG.feMorphology.content
    }
  attlist.feMorphology &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    [ a:defaultValue = "erode" ]
    attribute operator { "erode" | "dilate" }?,
    attribute radius { NumberOptionalNumber.datatype }?
  SVG.feOffset.extra.content = notAllowed
  SVG.feOffset.content = (animate | set | SVG.feOffset.extra.content)*
  feOffset =
    element ns4:feOffset { attlist.feOffset, SVG.feOffset.content }
  attlist.feOffset &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute dx { Number.datatype }?,
    attribute dy { Number.datatype }?
  SVG.feSpecularLighting.extra.content = notAllowed
  SVG.feSpecularLighting.content =
    (feDistantLight | fePointLight | feSpotLight),
    (animate
     | set
     | animateColor
     | SVG.feSpecularLighting.extra.content)*
  feSpecularLighting =
    element ns4:feSpecularLighting {
      attlist.feSpecularLighting, SVG.feSpecularLighting.content
    }
  attlist.feSpecularLighting &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Color.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib,
    attribute lighting-color { SVGColor.datatype }?,
    attribute surfaceScale { Number.datatype }?,
    attribute specularConstant { Number.datatype }?,
    attribute specularExponent { Number.datatype }?,
    attribute kernelUnitLength { NumberOptionalNumber.datatype }?
  SVG.feTile.extra.content = notAllowed
  SVG.feTile.content = (animate | set | SVG.feTile.extra.content)*
  feTile = element ns4:feTile { attlist.feTile, SVG.feTile.content }
  attlist.feTile &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitiveWithIn.attrib
  SVG.feTurbulence.extra.content = notAllowed
  SVG.feTurbulence.content =
    (animate | set | SVG.feTurbulence.extra.content)*
  feTurbulence =
    element ns4:feTurbulence {
      attlist.feTurbulence, SVG.feTurbulence.content
    }
  attlist.feTurbulence &=
    SVG.Core.attrib,
    SVG.FilterColor.attrib,
    SVG.FilterPrimitive.attrib,
    attribute baseFrequency { NumberOptionalNumber.datatype }?,
    attribute numOctaves { Integer.datatype }?,
    attribute seed { Number.datatype }?,
    [ a:defaultValue = "noStitch" ]
    attribute stitchTiles { "stitch" | "noStitch" }?,
    [ a:defaultValue = "turbulence" ]
    attribute type { "fractalNoise" | "turbulence" }?
  SVG.feDistantLight.extra.content = notAllowed
  SVG.feDistantLight.content =
    (animate | set | SVG.feDistantLight.extra.content)*
  feDistantLight =
    element ns4:feDistantLight {
      attlist.feDistantLight, SVG.feDistantLight.content
    }
  attlist.feDistantLight &=
    SVG.Core.attrib,
    attribute azimuth { Number.datatype }?,
    attribute elevation { Number.datatype }?
  SVG.fePointLight.extra.content = notAllowed
  SVG.fePointLight.content =
    (animate | set | SVG.fePointLight.extra.content)*
  fePointLight =
    element ns4:fePointLight {
      attlist.fePointLight, SVG.fePointLight.content
    }
  attlist.fePointLight &=
    SVG.Core.attrib,
    attribute x { Number.datatype }?,
    attribute y { Number.datatype }?,
    attribute z { Number.datatype }?
  SVG.feSpotLight.extra.content = notAllowed
  SVG.feSpotLight.content =
    (animate | set | SVG.feSpotLight.extra.content)*
  feSpotLight =
    element ns4:feSpotLight {
      attlist.feSpotLight, SVG.feSpotLight.content
    }
  attlist.feSpotLight &=
    SVG.Core.attrib,
    attribute x { Number.datatype }?,
    attribute y { Number.datatype }?,
    attribute z { Number.datatype }?,
    attribute pointsAtX { Number.datatype }?,
    attribute pointsAtY { Number.datatype }?,
    attribute pointsAtZ { Number.datatype }?,
    attribute specularExponent { Number.datatype }?,
    attribute limitingConeAngle { Number.datatype }?
  SVG.feFuncR.extra.content = notAllowed
  SVG.feFuncR.content = (animate | set | SVG.feFuncR.extra.content)*
  feFuncR = element ns4:feFuncR { attlist.feFuncR, SVG.feFuncR.content }
  attlist.feFuncR &=
    SVG.Core.attrib,
    attribute type {
      "identity" | "table" | "discrete" | "linear" | "gamma"
    },
    attribute tableValues { text }?,
    attribute slope { Number.datatype }?,
    attribute intercept { Number.datatype }?,
    attribute amplitude { Number.datatype }?,
    attribute exponent { Number.datatype }?,
    attribute offset { Number.datatype }?
  SVG.feFuncG.extra.content = notAllowed
  SVG.feFuncG.content = (animate | set | SVG.feFuncG.extra.content)*
  feFuncG = element ns4:feFuncG { attlist.feFuncG, SVG.feFuncG.content }
  attlist.feFuncG &=
    SVG.Core.attrib,
    attribute type {
      "identity" | "table" | "discrete" | "linear" | "gamma"
    },
    attribute tableValues { text }?,
    attribute slope { Number.datatype }?,
    attribute intercept { Number.datatype }?,
    attribute amplitude { Number.datatype }?,
    attribute exponent { Number.datatype }?,
    attribute offset { Number.datatype }?
  SVG.feFuncB.extra.content = notAllowed
  SVG.feFuncB.content = (animate | set | SVG.feFuncB.extra.content)*
  feFuncB = element ns4:feFuncB { attlist.feFuncB, SVG.feFuncB.content }
  attlist.feFuncB &=
    SVG.Core.attrib,
    attribute type {
      "identity" | "table" | "discrete" | "linear" | "gamma"
    },
    attribute tableValues { text }?,
    attribute slope { Number.datatype }?,
    attribute intercept { Number.datatype }?,
    attribute amplitude { Number.datatype }?,
    attribute exponent { Number.datatype }?,
    attribute offset { Number.datatype }?
  SVG.feFuncA.extra.content = notAllowed
  SVG.feFuncA.content = (animate | set | SVG.feFuncA.extra.content)*
  feFuncA = element ns4:feFuncA { attlist.feFuncA, SVG.feFuncA.content }
  attlist.feFuncA &=
    SVG.Core.attrib,
    attribute type {
      "identity" | "table" | "discrete" | "linear" | "gamma"
    },
    attribute tableValues { text }?,
    attribute slope { Number.datatype }?,
    attribute intercept { Number.datatype }?,
    attribute amplitude { Number.datatype }?,
    attribute exponent { Number.datatype }?,
    attribute offset { Number.datatype }?
  SVG.cursor.extra.content = notAllowed
  SVG.cursor.content =
    (SVG.Description.class | SVG.cursor.extra.content)*
  cursor = element ns4:cursor { attlist.cursor, SVG.cursor.content }
  attlist.cursor &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.XLinkRequired.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?
  LinkTarget.datatype = xsd:NMTOKEN
  SVG.a.extra.content = notAllowed
  SVG.a.content =
    (text
     | SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.a.extra.content)*
  a = element ns4:a { attlist.a, SVG.a.content }
  attlist.a &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.XLinkReplace.attrib,
    SVG.External.attrib,
    attribute transform { TransformList.datatype }?,
    attribute target { LinkTarget.datatype }?
  SVG.view.extra.content = notAllowed
  SVG.view.content = (SVG.Description.class | SVG.view.extra.content)*
  view = element ns4:view { attlist.view, SVG.view.content }
  attlist.view &=
    SVG.Core.attrib,
    SVG.External.attrib,
    attribute viewBox { ViewBoxSpec.datatype }?,
    [ a:defaultValue = "xMidYMid meet" ]
    attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?,
    [ a:defaultValue = "magnify" ]
    attribute zoomAndPan { "disable" | "magnify" }?,
    attribute viewTarget { text }?
  SVG.script.extra.content = notAllowed
  SVG.script.content = (text | SVG.script.extra.content)*
  script = element ns4:script { attlist.script, SVG.script.content }
  attlist.script &=
    SVG.Core.attrib,
    SVG.XLink.attrib,
    SVG.External.attrib,
    attribute type { ContentType.datatype }
  SVG.Animation.extra.attrib = empty
  SVG.Animation.attrib = SVG.XLink.attrib, SVG.Animation.extra.attrib
  SVG.AnimationAttribute.extra.attrib = empty
  SVG.AnimationAttribute.attrib =
    attribute attributeName { text },
    attribute attributeType { text }?,
    SVG.AnimationAttribute.extra.attrib
  SVG.AnimationTiming.extra.attrib = empty
  SVG.AnimationTiming.attrib =
    attribute begin { text }?,
    attribute dur { text }?,
    attribute end { text }?,
    attribute min { text }?,
    attribute max { text }?,
    [ a:defaultValue = "always" ]
    attribute restart { "always" | "never" | "whenNotActive" }?,
    attribute repeatCount { text }?,
    attribute repeatDur { text }?,
    [ a:defaultValue = "remove" ]
    attribute fill { "remove" | "freeze" }?,
    SVG.AnimationTiming.extra.attrib
  SVG.AnimationValue.extra.attrib = empty
  SVG.AnimationValue.attrib =
    [ a:defaultValue = "linear" ]
    attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?,
    attribute values { text }?,
    attribute keyTimes { text }?,
    attribute keySplines { text }?,
    attribute from { text }?,
    attribute to { text }?,
    attribute by { text }?,
    SVG.AnimationValue.extra.attrib
  SVG.AnimationAddtion.extra.attrib = empty
  SVG.AnimationAddtion.attrib =
    [ a:defaultValue = "replace" ]
    attribute additive { "replace" | "sum" }?,
    [ a:defaultValue = "none" ]
    attribute accumulate { "none" | "sum" }?,
    SVG.AnimationAddtion.extra.attrib
  SVG.animate.extra.content = notAllowed
  SVG.animate.content =
    (SVG.Description.class | SVG.animate.extra.content)*
  animate = element ns4:animate { attlist.animate, SVG.animate.content }
  attlist.animate &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.AnimationEvents.attrib,
    SVG.External.attrib,
    SVG.Animation.attrib,
    SVG.AnimationAttribute.attrib,
    SVG.AnimationTiming.attrib,
    SVG.AnimationValue.attrib,
    SVG.AnimationAddtion.attrib
  SVG.set.extra.content = notAllowed
  SVG.set.content = (SVG.Description.class | SVG.set.extra.content)*
  set = element ns4:set { attlist.set, SVG.set.content }
  attlist.set &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.AnimationEvents.attrib,
    SVG.External.attrib,
    SVG.Animation.attrib,
    SVG.AnimationAttribute.attrib,
    SVG.AnimationTiming.attrib,
    attribute to { text }?
  SVG.animateMotion.extra.content = empty
  SVG.animateMotion.content =
    SVG.Description.class*, mpath?, SVG.animateMotion.extra.content
  animateMotion =
    element ns4:animateMotion {
      attlist.animateMotion, SVG.animateMotion.content
    }
  attlist.animateMotion &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.AnimationEvents.attrib,
    SVG.External.attrib,
    SVG.Animation.attrib,
    SVG.AnimationTiming.attrib,
    SVG.AnimationAddtion.attrib,
    [ a:defaultValue = "paced" ]
    attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?,
    attribute values { text }?,
    attribute keyTimes { text }?,
    attribute keySplines { text }?,
    attribute from { text }?,
    attribute to { text }?,
    attribute by { text }?,
    attribute path { text }?,
    attribute keyPoints { text }?,
    attribute rotate { text }?,
    attribute origin { text }?
  SVG.animateColor.extra.content = notAllowed
  SVG.animateColor.content =
    (SVG.Description.class | SVG.animateColor.extra.content)*
  animateColor =
    element ns4:animateColor {
      attlist.animateColor, SVG.animateColor.content
    }
  attlist.animateColor &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.AnimationEvents.attrib,
    SVG.External.attrib,
    SVG.Animation.attrib,
    SVG.AnimationAttribute.attrib,
    SVG.AnimationTiming.attrib,
    SVG.AnimationValue.attrib,
    SVG.AnimationAddtion.attrib
  SVG.animateTransform.extra.content = notAllowed
  SVG.animateTransform.content =
    (SVG.Description.class | SVG.animateTransform.extra.content)*
  animateTransform =
    element ns4:animateTransform {
      attlist.animateTransform, SVG.animateTransform.content
    }
  attlist.animateTransform &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.AnimationEvents.attrib,
    SVG.External.attrib,
    SVG.Animation.attrib,
    SVG.AnimationAttribute.attrib,
    SVG.AnimationTiming.attrib,
    SVG.AnimationValue.attrib,
    SVG.AnimationAddtion.attrib,
    [ a:defaultValue = "translate" ]
    attribute type {
      "translate" | "scale" | "rotate" | "skewX" | "skewY"
    }?
  SVG.mpath.extra.content = notAllowed
  SVG.mpath.content = (SVG.Description.class | SVG.mpath.extra.content)*
  mpath = element ns4:mpath { attlist.mpath, SVG.mpath.content }
  attlist.mpath &=
    SVG.Core.attrib, SVG.XLinkRequired.attrib, SVG.External.attrib
  SVG.font.extra.content = notAllowed
  SVG.font.content =
    SVG.Description.class*,
    font-face,
    missing-glyph,
    (glyph | hkern | vkern | SVG.font.extra.content)*
  font = element ns4:font { attlist.font, SVG.font.content }
  attlist.font &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.External.attrib,
    attribute horiz-origin-x { Number.datatype }?,
    attribute horiz-origin-y { Number.datatype }?,
    attribute horiz-adv-x { Number.datatype },
    attribute vert-origin-x { Number.datatype }?,
    attribute vert-origin-y { Number.datatype }?,
    attribute vert-adv-y { Number.datatype }?
  SVG.font-face.extra.content = empty
  SVG.font-face.content =
    SVG.Description.class*,
    font-face-src?,
    definition-src?,
    SVG.font-face.extra.content
  font-face =
    element ns4:font-face { attlist.font-face, SVG.font-face.content }
  attlist.font-face &=
    SVG.Core.attrib,
    attribute font-family { text }?,
    attribute font-style { text }?,
    attribute font-variant { text }?,
    attribute font-weight { text }?,
    attribute font-stretch { text }?,
    attribute font-size { text }?,
    attribute unicode-range { text }?,
    attribute units-per-em { Number.datatype }?,
    attribute panose-1 { text }?,
    attribute stemv { Number.datatype }?,
    attribute stemh { Number.datatype }?,
    attribute slope { Number.datatype }?,
    attribute cap-height { Number.datatype }?,
    attribute x-height { Number.datatype }?,
    attribute accent-height { Number.datatype }?,
    attribute ascent { Number.datatype }?,
    attribute descent { Number.datatype }?,
    attribute widths { text }?,
    attribute bbox { text }?,
    attribute ideographic { Number.datatype }?,
    attribute alphabetic { Number.datatype }?,
    attribute mathematical { Number.datatype }?,
    attribute hanging { Number.datatype }?,
    attribute v-ideographic { Number.datatype }?,
    attribute v-alphabetic { Number.datatype }?,
    attribute v-mathematical { Number.datatype }?,
    attribute v-hanging { Number.datatype }?,
    attribute underline-position { Number.datatype }?,
    attribute underline-thickness { Number.datatype }?,
    attribute strikethrough-position { Number.datatype }?,
    attribute strikethrough-thickness { Number.datatype }?,
    attribute overline-position { Number.datatype }?,
    attribute overline-thickness { Number.datatype }?
  SVG.glyph.extra.content = notAllowed
  SVG.glyph.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.glyph.extra.content)*
  glyph = element ns4:glyph { attlist.glyph, SVG.glyph.content }
  attlist.glyph &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    attribute unicode { text }?,
    attribute glyph-name { text }?,
    attribute d { PathData.datatype }?,
    attribute orientation { text }?,
    attribute arabic-form { text }?,
    attribute lang { LanguageCodes.datatype }?,
    attribute horiz-adv-x { Number.datatype }?,
    attribute vert-origin-x { Number.datatype }?,
    attribute vert-origin-y { Number.datatype }?,
    attribute vert-adv-y { Number.datatype }?
  SVG.missing-glyph.extra.content = notAllowed
  SVG.missing-glyph.content =
    (SVG.Description.class
     | SVG.Animation.class
     | SVG.Structure.class
     | SVG.Conditional.class
     | SVG.Image.class
     | SVG.Style.class
     | SVG.Shape.class
     | SVG.Text.class
     | SVG.Marker.class
     | SVG.ColorProfile.class
     | SVG.Gradient.class
     | SVG.Pattern.class
     | SVG.Clip.class
     | SVG.Mask.class
     | SVG.Filter.class
     | SVG.Cursor.class
     | SVG.Hyperlink.class
     | SVG.View.class
     | SVG.Script.class
     | SVG.Font.class
     | SVG.missing-glyph.extra.content)*
  missing-glyph =
    element ns4:missing-glyph {
      attlist.missing-glyph, SVG.missing-glyph.content
    }
  attlist.missing-glyph &=
    SVG.Core.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    attribute d { PathData.datatype }?,
    attribute horiz-adv-x { Number.datatype }?,
    attribute vert-origin-x { Number.datatype }?,
    attribute vert-origin-y { Number.datatype }?,
    attribute vert-adv-y { Number.datatype }?
  SVG.hkern.content = empty
  hkern = element ns4:hkern { attlist.hkern, SVG.hkern.content }
  attlist.hkern &=
    SVG.Core.attrib,
    attribute u1 { text }?,
    attribute g1 { text }?,
    attribute u2 { text }?,
    attribute g2 { text }?,
    attribute k { Number.datatype }
  SVG.vkern.content = empty
  vkern = element ns4:vkern { attlist.vkern, SVG.vkern.content }
  attlist.vkern &=
    SVG.Core.attrib,
    attribute u1 { text }?,
    attribute g1 { text }?,
    attribute u2 { text }?,
    attribute g2 { text }?,
    attribute k { Number.datatype }
  SVG.font-face-src.extra.content = notAllowed
  SVG.font-face-src.content =
    (font-face-uri | font-face-name | SVG.font-face-src.extra.content)+
  font-face-src =
    element ns4:font-face-src {
      attlist.font-face-src, SVG.font-face-src.content
    }
  attlist.font-face-src &= SVG.Core.attrib
  SVG.font-face-uri.extra.content = notAllowed
  SVG.font-face-uri.content =
    (font-face-format | SVG.font-face-uri.extra.content)*
  font-face-uri =
    element ns4:font-face-uri {
      attlist.font-face-uri, SVG.font-face-uri.content
    }
  attlist.font-face-uri &= SVG.Core.attrib, SVG.XLinkRequired.attrib
  SVG.font-face-format.content = empty
  font-face-format =
    element ns4:font-face-format {
      attlist.font-face-format, SVG.font-face-format.content
    }
  attlist.font-face-format &=
    SVG.Core.attrib,
    attribute string { text }?
  SVG.font-face-name.content = empty
  font-face-name =
    element ns4:font-face-name {
      attlist.font-face-name, SVG.font-face-name.content
    }
  attlist.font-face-name &=
    SVG.Core.attrib,
    attribute name { text }?
  SVG.definition-src.content = empty
  definition-src =
    element ns4:definition-src {
      attlist.definition-src, SVG.definition-src.content
    }
  attlist.definition-src &= SVG.Core.attrib, SVG.XLinkRequired.attrib
  SVG.foreignObject.extra.content = notAllowed
  SVG.foreignObject.content = (text | SVG.foreignObject.extra.content)*
  foreignObject =
    element ns4:foreignObject {
      attlist.foreignObject, SVG.foreignObject.content
    }
  attlist.foreignObject &=
    SVG.Core.attrib,
    SVG.Conditional.attrib,
    SVG.Style.attrib,
    SVG.Presentation.attrib,
    SVG.GraphicalEvents.attrib,
    SVG.External.attrib,
    attribute x { Coordinate.datatype }?,
    attribute y { Coordinate.datatype }?,
    attribute width { Length.datatype },
    attribute height { Length.datatype },
    attribute transform { TransformList.datatype }?
}
div {
  div {
    math_XLINK.xmlns.attrib = empty
    MATHML.xmlns.extra.attrib = math_XLINK.xmlns.attrib
    MATHML.xmlns.attrib = empty, MATHML.xmlns.extra.attrib
  }
  MATHML.NamespaceDecl.attrib = MATHML.xmlns.attrib
  MATHML.Common.attrib =
    MATHML.NamespaceDecl.attrib,
    attribute xlink:href { text }?,
    attribute xlink:type { text }?,
    attribute class { text }?,
    attribute style { text }?,
    attribute id { xsd:ID }?,
    attribute xref { xsd:IDREF }?,
    attribute other { text }?
  mathml.att-fontsize = attribute fontsize { text }?
  mathml.att-fontweight = attribute fontweight { "normal" | "bold" }?
  mathml.att-fontstyle = attribute fontstyle { "normal" | "italic" }?
  mathml.att-fontfamily = attribute fontfamily { text }?
  mathml.att-color = attribute color { text }?
  mathml.att-mathvariant = attribute mathvariant { text }?
  mathml.att-mathsize = attribute mathsize { text }?
  mathml.att-mathcolor = attribute mathcolor { text }?
  mathml.att-mathbackground = attribute mathbackground { text }?
  mathml.att-fontinfo =
    mathml.att-fontsize,
    mathml.att-fontweight,
    mathml.att-fontstyle,
    mathml.att-fontfamily,
    mathml.att-color,
    mathml.att-mathvariant,
    mathml.att-mathsize,
    mathml.att-mathcolor,
    mathml.att-mathbackground
  mathml.att-form = attribute form { "prefix" | "infix" | "postfix" }?
  mathml.att-fence = attribute fence { "true" | "false" }?
  mathml.att-separator = attribute separator { "true" | "false" }?
  mathml.att-lspace = attribute lspace { text }?
  mathml.att-rspace = attribute rspace { text }?
  mathml.att-stretchy = attribute stretchy { "true" | "false" }?
  mathml.att-symmetric = attribute symmetric { "true" | "false" }?
  mathml.att-maxsize = attribute maxsize { text }?
  mathml.att-minsize = attribute minsize { text }?
  mathml.att-largeop = attribute largeop { "true" | "false" }?
  mathml.att-movablelimits =
    attribute movablelimits { "true" | "false" }?
  mathml.att-accent = attribute accent { "true" | "false" }?
  mathml.att-opinfo =
    mathml.att-form,
    mathml.att-fence,
    mathml.att-separator,
    mathml.att-lspace,
    mathml.att-rspace,
    mathml.att-stretchy,
    mathml.att-symmetric,
    mathml.att-maxsize,
    mathml.att-minsize,
    mathml.att-largeop,
    mathml.att-movablelimits,
    mathml.att-accent
  mathml.att-width = attribute width { text }?
  mathml.att-height = attribute height { text }?
  mathml.att-depth = attribute depth { text }?
  mathml.att-linebreak = attribute linebreak { text }?
  mathml.att-sizeinfo =
    mathml.att-width, mathml.att-height, mathml.att-depth
  mathml.att-lquote = attribute lquote { text }?
  mathml.att-rquote = attribute rquote { text }?
  mathml.att-linethickness = attribute linethickness { text }?
  mathml.att-scriptlevel = attribute scriptlevel { text }?
  mathml.att-displaystyle = attribute displaystyle { "true" | "false" }?
  mathml.att-scriptsizemultiplier =
    attribute scriptsizemultiplier { text }?
  mathml.att-scriptminsize = attribute scriptminsize { text }?
  mathml.att-background = attribute background { text }?
  mathml.att-veryverythinmathspace =
    attribute veryverythinmathspace { text }?
  mathml.att-verythinmathspace = attribute verythinmathspace { text }?
  mathml.att-thinmathspace = attribute thinmathspace { text }?
  mathml.att-mediummathspace = attribute mediummathspace { text }?
  mathml.att-thickmathspace = attribute thickmathspace { text }?
  mathml.att-verythickmathspace = attribute verythickmathspace { text }?
  mathml.att-veryverythickmathspace =
    attribute veryverythickmathspace { text }?
  mathml.att-open = attribute open { text }?
  mathml.att-close = attribute close { text }?
  mathml.att-separators = attribute separators { text }?
  mathml.att-subscriptshift = attribute subscriptshift { text }?
  mathml.att-superscriptshift = attribute superscriptshift { text }?
  mathml.att-accentunder = attribute accentunder { "true" | "false" }?
  mathml.att-align = attribute align { text }?
  mathml.att-numalign = attribute numalign { text }?
  mathml.att-denomalign = attribute denomalign { text }?
  mathml.att-rowalign = attribute rowalign { text }?
  mathml.att-columnalign = attribute columnalign { text }?
  mathml.att-columnwidth = attribute columnwidth { text }?
  mathml.att-groupalign = attribute groupalign { text }?
  mathml.att-alignmentscope = attribute alignmentscope { text }?
  mathml.att-rowspacing = attribute rowspacing { text }?
  mathml.att-columnspacing = attribute columnspacing { text }?
  mathml.att-rowlines = attribute rowlines { text }?
  mathml.att-columnlines = attribute columnlines { text }?
  mathml.att-frame = attribute frame { "none" | "solid" | "dashed" }?
  mathml.att-side =
    attribute side {
      "left" | "right" | "leftoverlap" | "rightoverlap"
    }?
  mathml.att-framespacing = attribute framespacing { text }?
  mathml.att-equalrows = attribute equalrows { text }?
  mathml.att-equalcolumns = attribute equalcolumns { text }?
  mathml.att-tableinfo =
    mathml.att-align,
    mathml.att-rowalign,
    mathml.att-columnalign,
    mathml.att-columnwidth,
    mathml.att-groupalign,
    mathml.att-alignmentscope,
    mathml.att-side,
    mathml.att-rowspacing,
    mathml.att-columnspacing,
    mathml.att-rowlines,
    mathml.att-columnlines,
    mathml.att-width,
    mathml.att-frame,
    mathml.att-framespacing,
    mathml.att-equalrows,
    mathml.att-equalcolumns,
    mathml.att-displaystyle
  mathml.att-rowspan = attribute rowspan { text }?
  mathml.att-columnspan = attribute columnspan { text }?
  mathml.att-edge = attribute edge { "left" | "right" }?
  mathml.att-actiontype = attribute actiontype { text }?
  mathml.att-selection = attribute selection { text }?
  mathml.att-name = attribute name { text }?
  mathml.att-alt = attribute alt { text }?
  mathml.att-index = attribute index { text }?
  mathml.att-bevelled = attribute bevelled { text }?
  mathml.ptoken =
    mathml.mi | mathml.mn | mathml.mo | mathml.mtext | mathml.ms
  mathml.attlist-mi &= MATHML.Common.attrib, mathml.att-fontinfo
  mathml.attlist-mn &= MATHML.Common.attrib, mathml.att-fontinfo
  mathml.attlist-mo &=
    MATHML.Common.attrib, mathml.att-fontinfo, mathml.att-opinfo
  mathml.attlist-mtext &= MATHML.Common.attrib, mathml.att-fontinfo
  mathml.attlist-ms &=
    MATHML.Common.attrib,
    mathml.att-fontinfo,
    mathml.att-lquote,
    mathml.att-rquote
  mathml.petoken = mathml.mspace
  mathml.mspace = element mspace { mathml.attlist-mspace, empty }
  mathml.any |= mathml.mspace
  mathml.attlist-mspace &=
    mathml.att-sizeinfo, mathml.att-linebreak, MATHML.Common.attrib
  mathml.pgenschema =
    mathml.mrow
    | mathml.mfrac
    | mathml.msqrt
    | mathml.mroot
    | mathml.menclose
    | mathml.mstyle
    | mathml.merror
    | mathml.mpadded
    | mathml.mphantom
    | mathml.mfenced
  mathml.attlist-mrow &= MATHML.Common.attrib
  mathml.attlist-mfrac &=
    MATHML.Common.attrib,
    mathml.att-bevelled,
    mathml.att-numalign,
    mathml.att-denomalign,
    mathml.att-linethickness
  mathml.attlist-msqrt &= MATHML.Common.attrib
  mathml.attlist-menclose &=
    MATHML.Common.attrib,
    [ a:defaultValue = "longdiv" ] attribute notation { text }?
  mathml.attlist-mroot &= MATHML.Common.attrib
  mathml.attlist-mstyle &=
    MATHML.Common.attrib,
    mathml.att-fontinfo,
    mathml.att-opinfo,
    mathml.att-lquote,
    mathml.att-rquote,
    mathml.att-linethickness,
    mathml.att-scriptlevel,
    mathml.att-scriptsizemultiplier,
    mathml.att-scriptminsize,
    mathml.att-background,
    mathml.att-veryverythinmathspace,
    mathml.att-verythinmathspace,
    mathml.att-thinmathspace,
    mathml.att-mediummathspace,
    mathml.att-thickmathspace,
    mathml.att-verythickmathspace,
    mathml.att-veryverythickmathspace,
    mathml.att-open,
    mathml.att-close,
    mathml.att-separators,
    mathml.att-subscriptshift,
    mathml.att-superscriptshift,
    mathml.att-accentunder,
    mathml.att-tableinfo,
    mathml.att-rowspan,
    mathml.att-columnspan,
    mathml.att-edge,
    mathml.att-actiontype,
    mathml.att-selection
  mathml.attlist-merror &= MATHML.Common.attrib
  mathml.attlist-mpadded &=
    MATHML.Common.attrib, mathml.att-sizeinfo, mathml.att-lspace
  mathml.attlist-mphantom &= MATHML.Common.attrib
  mathml.attlist-mfenced &=
    MATHML.Common.attrib,
    mathml.att-open,
    mathml.att-close,
    mathml.att-separators
  mathml.pscrschema =
    mathml.msub
    | mathml.msup
    | mathml.msubsup
    | mathml.munder
    | mathml.mover
    | mathml.munderover
    | mathml.mmultiscripts
  mathml.attlist-msub &= MATHML.Common.attrib, mathml.att-subscriptshift
  mathml.attlist-msup &=
    MATHML.Common.attrib, mathml.att-superscriptshift
  mathml.attlist-msubsup &=
    MATHML.Common.attrib,
    mathml.att-subscriptshift,
    mathml.att-superscriptshift
  mathml.attlist-munder &= MATHML.Common.attrib, mathml.att-accentunder
  mathml.attlist-mover &= MATHML.Common.attrib, mathml.att-accent
  mathml.attlist-munderover &=
    MATHML.Common.attrib, mathml.att-accent, mathml.att-accentunder
  mathml.attlist-mmultiscripts &=
    MATHML.Common.attrib,
    mathml.att-subscriptshift,
    mathml.att-superscriptshift
  mathml.pscreschema = mathml.mprescripts | mathml.none
  mathml.mprescripts =
    element mprescripts { mathml.attlist-mprescripts, empty }
  mathml.any |= mathml.mprescripts
  mathml.attlist-mprescripts &= MATHML.xmlns.attrib
  mathml.none = element none { mathml.attlist-none, empty }
  mathml.any |= mathml.none
  mathml.attlist-none &= MATHML.xmlns.attrib
  mathml.ptabschema =
    mathml.mtable | mathml.mtr | mathml.mlabeledtr | mathml.mtd
  mathml.attlist-mtable &= MATHML.Common.attrib, mathml.att-tableinfo
  mathml.attlist-mtr &=
    MATHML.Common.attrib,
    mathml.att-rowalign,
    mathml.att-columnalign,
    mathml.att-groupalign
  mathml.attlist-mlabeledtr &=
    MATHML.Common.attrib,
    mathml.att-rowalign,
    mathml.att-columnalign,
    mathml.att-groupalign
  mathml.attlist-mtd &=
    MATHML.Common.attrib,
    mathml.att-rowalign,
    mathml.att-columnalign,
    mathml.att-groupalign,
    mathml.att-rowspan,
    mathml.att-columnspan
  mathml.plschema =
    mathml.pgenschema | mathml.pscrschema | mathml.ptabschema
  mathml.peschema = mathml.maligngroup | mathml.malignmark
  mathml.malignmark =
    element malignmark { mathml.attlist-malignmark, empty }
  mathml.any |= mathml.malignmark
  mathml.attlist-malignmark &= mathml.att-edge
  mathml.maligngroup =
    element maligngroup { mathml.attlist-maligngroup, empty }
  mathml.any |= mathml.maligngroup
  mathml.attlist-maligngroup &=
    MATHML.Common.attrib, mathml.att-groupalign
  mathml.mglyph = element mglyph { mathml.attlist-mglyph, empty }
  mathml.any |= mathml.mglyph
  mathml.attlist-mglyph &=
    mathml.att-alt, mathml.att-fontfamily, mathml.att-index
  mathml.pactions = mathml.maction
  mathml.attlist-maction &=
    MATHML.Common.attrib, mathml.att-actiontype, mathml.att-selection
  mathml.PresInCont =
    mathml.ptoken
    | mathml.petoken
    | mathml.plschema
    | mathml.peschema
    | mathml.pactions
  mathml.Presentation =
    mathml.ptoken
    | mathml.petoken
    | mathml.pscreschema
    | mathml.plschema
    | mathml.peschema
    | mathml.pactions
  mathml.att-base = [ a:defaultValue = "10" ] attribute base { text }?
  mathml.att-closure =
    [ a:defaultValue = "closed" ] attribute closure { text }?
  mathml.att-definition =
    [ a:defaultValue = "" ] attribute definitionURL { text }?
  mathml.att-encoding =
    [ a:defaultValue = "" ] attribute encoding { text }?
  mathml.att-nargs = [ a:defaultValue = "1" ] attribute nargs { text }?
  mathml.att-occurrence =
    [ a:defaultValue = "function-model" ] attribute occurrence { text }?
  mathml.att-order =
    [ a:defaultValue = "numeric" ] attribute order { text }?
  mathml.att-scope =
    [ a:defaultValue = "local" ] attribute scope { text }?
  mathml.att-type = attribute type { text }?
  mathml.ctoken = mathml.csymbol | mathml.ci | mathml.cn
  mathml.attlist-ci &=
    MATHML.Common.attrib,
    mathml.att-type,
    mathml.att-definition,
    mathml.att-encoding
  mathml.attlist-csymbol &=
    MATHML.Common.attrib,
    mathml.att-encoding,
    mathml.att-type,
    mathml.att-definition
  mathml.attlist-cn &=
    MATHML.Common.attrib,
    mathml.att-type,
    mathml.att-base,
    mathml.att-definition,
    mathml.att-encoding
  mathml.cspecial = mathml.apply | mathml.reln | mathml.lambda
  mathml.attlist-apply &= MATHML.Common.attrib
  mathml.attlist-reln &= MATHML.Common.attrib
  mathml.attlist-lambda &= MATHML.Common.attrib
  mathml.cother = mathml.condition | mathml.declare | mathml.sep
  mathml.attlist-condition &= MATHML.Common.attrib
  mathml.attlist-declare &=
    MATHML.Common.attrib,
    mathml.att-type,
    mathml.att-scope,
    mathml.att-nargs,
    mathml.att-occurrence,
    mathml.att-definition,
    mathml.att-encoding
  mathml.sep = element sep { mathml.attlist-sep, empty }
  mathml.any |= mathml.sep
  mathml.attlist-sep &= MATHML.xmlns.attrib
  mathml.csemantics =
    mathml.semantics | mathml.annotation | mathml.annotation-xml
  mathml.attlist-semantics &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.attlist-annotation &= MATHML.Common.attrib, mathml.att-encoding
  mathml.attlist-annotation-xml &=
    MATHML.Common.attrib, mathml.att-encoding
  mathml.cconstructor =
    mathml.interval
    | mathml.list
    | mathml.matrix
    | mathml.matrixrow
    | mathml.set
    | mathml.vector
    | mathml.piecewise
  mathml.attlist-interval &= MATHML.Common.attrib, mathml.att-closure
  mathml.attlist-set &= MATHML.Common.attrib, mathml.att-type
  mathml.attlist-list &= MATHML.Common.attrib, mathml.att-order
  mathml.attlist-vector &= MATHML.Common.attrib
  mathml.attlist-matrix &= MATHML.Common.attrib
  mathml.attlist-matrixrow &= MATHML.Common.attrib
  mathml.attlist-piecewise &= MATHML.Common.attrib
  mathml.attlist-piece &= MATHML.Common.attrib
  mathml.attlist-otherwise &= MATHML.Common.attrib
  mathml.c0ary =
    mathml.integers
    | mathml.reals
    | mathml.rationals
    | mathml.naturalnumbers
    | mathml.complexes
    | mathml.primes
    | mathml.exponentiale
    | mathml.imaginaryi
    | mathml.notanumber
    | mathml.true
    | mathml.false
    | mathml.emptyset
    | mathml.pi
    | mathml.eulergamma
    | mathml.infinity
  mathml.integers = element integers { mathml.attlist-integers, empty }
  mathml.any |= mathml.integers
  mathml.attlist-integers &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.reals = element reals { mathml.attlist-reals, empty }
  mathml.any |= mathml.reals
  mathml.attlist-reals &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.rationals =
    element rationals { mathml.attlist-rationals, empty }
  mathml.any |= mathml.rationals
  mathml.attlist-rationals &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.naturalnumbers =
    element naturalnumbers { mathml.attlist-naturalnumbers, empty }
  mathml.any |= mathml.naturalnumbers
  mathml.attlist-naturalnumbers &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.complexes =
    element complexes { mathml.attlist-complexes, empty }
  mathml.any |= mathml.complexes
  mathml.attlist-complexes &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.primes = element primes { mathml.attlist-primes, empty }
  mathml.any |= mathml.primes
  mathml.attlist-primes &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.exponentiale =
    element exponentiale { mathml.attlist-exponentiale, empty }
  mathml.any |= mathml.exponentiale
  mathml.attlist-exponentiale &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.imaginaryi =
    element imaginaryi { mathml.attlist-imaginaryi, empty }
  mathml.any |= mathml.imaginaryi
  mathml.attlist-imaginaryi &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.notanumber =
    element notanumber { mathml.attlist-notanumber, empty }
  mathml.any |= mathml.notanumber
  mathml.attlist-notanumber &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.true = element true { mathml.attlist-true, empty }
  mathml.any |= mathml.true
  mathml.attlist-true &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.false = element false { mathml.attlist-false, empty }
  mathml.any |= mathml.false
  mathml.attlist-false &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.emptyset = element emptyset { mathml.attlist-emptyset, empty }
  mathml.any |= mathml.emptyset
  mathml.attlist-emptyset &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.pi = element pi { mathml.attlist-pi, empty }
  mathml.any |= mathml.pi
  mathml.attlist-pi &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.eulergamma =
    element eulergamma { mathml.attlist-eulergamma, empty }
  mathml.any |= mathml.eulergamma
  mathml.attlist-eulergamma &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.infinity = element infinity { mathml.attlist-infinity, empty }
  mathml.any |= mathml.infinity
  mathml.attlist-infinity &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cfuncop1ary =
    mathml.inverse
    | mathml.ident
    | mathml.domain
    | mathml.codomain
    | mathml.image
  mathml.inverse = element inverse { mathml.attlist-inverse, empty }
  mathml.any |= mathml.inverse
  mathml.attlist-inverse &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.domain = element domain { mathml.attlist-domain, empty }
  mathml.any |= mathml.domain
  mathml.attlist-domain &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.codomain = element codomain { mathml.attlist-codomain, empty }
  mathml.any |= mathml.codomain
  mathml.attlist-codomain &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.image = element image { mathml.attlist-image, empty }
  mathml.any |= mathml.image
  mathml.attlist-image &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cfuncopnary = mathml.fn | mathml.compose
  mathml.attlist-fn &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.ident = element ident { mathml.attlist-ident, empty }
  mathml.any |= mathml.ident
  mathml.attlist-ident &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.compose = element compose { mathml.attlist-compose, empty }
  mathml.any |= mathml.compose
  mathml.attlist-compose &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.carithop1ary =
    mathml.abs
    | mathml.conjugate
    | mathml.exp
    | mathml.factorial
    | mathml.arg
    | mathml.real
    | mathml.imaginary
    | mathml.floor
    | mathml.ceiling
  mathml.exp = element exp { mathml.attlist-exp, empty }
  mathml.any |= mathml.exp
  mathml.attlist-exp &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.abs = element abs { mathml.attlist-abs, empty }
  mathml.any |= mathml.abs
  mathml.attlist-abs &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arg = element arg { mathml.attlist-arg, empty }
  mathml.any |= mathml.arg
  mathml.attlist-arg &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.real = element real { mathml.attlist-real, empty }
  mathml.any |= mathml.real
  mathml.attlist-real &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.imaginary =
    element imaginary { mathml.attlist-imaginary, empty }
  mathml.any |= mathml.imaginary
  mathml.attlist-imaginary &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.conjugate =
    element conjugate { mathml.attlist-conjugate, empty }
  mathml.any |= mathml.conjugate
  mathml.attlist-conjugate &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.factorial =
    element factorial { mathml.attlist-factorial, empty }
  mathml.any |= mathml.factorial
  mathml.attlist-factorial &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.floor = element floor { mathml.attlist-floor, empty }
  mathml.any |= mathml.floor
  mathml.attlist-floor &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.ceiling = element ceiling { mathml.attlist-ceiling, empty }
  mathml.any |= mathml.ceiling
  mathml.attlist-ceiling &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.carithop1or2ary = mathml.minus
  mathml.minus = element minus { mathml.attlist-minus, empty }
  mathml.any |= mathml.minus
  mathml.attlist-minus &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.carithop2ary =
    mathml.quotient | mathml.divide | mathml.power | mathml.rem
  mathml.quotient = element quotient { mathml.attlist-quotient, empty }
  mathml.any |= mathml.quotient
  mathml.attlist-quotient &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.divide = element divide { mathml.attlist-divide, empty }
  mathml.any |= mathml.divide
  mathml.attlist-divide &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.power = element power { mathml.attlist-power, empty }
  mathml.any |= mathml.power
  mathml.attlist-power &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.rem = element rem { mathml.attlist-rem, empty }
  mathml.any |= mathml.rem
  mathml.attlist-rem &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.carithopnary =
    mathml.plus
    | mathml.times
    | mathml.max
    | mathml.min
    | mathml.gcd
    | mathml.lcm
  mathml.plus = element plus { mathml.attlist-plus, empty }
  mathml.any |= mathml.plus
  mathml.attlist-plus &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.max = element max { mathml.attlist-max, empty }
  mathml.any |= mathml.max
  mathml.attlist-max &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.min = element min { mathml.attlist-min, empty }
  mathml.any |= mathml.min
  mathml.attlist-min &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.times = element times { mathml.attlist-times, empty }
  mathml.any |= mathml.times
  mathml.attlist-times &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.gcd = element gcd { mathml.attlist-gcd, empty }
  mathml.any |= mathml.gcd
  mathml.attlist-gcd &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.lcm = element lcm { mathml.attlist-lcm, empty }
  mathml.any |= mathml.lcm
  mathml.attlist-lcm &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.carithoproot = mathml.root
  mathml.root = element root { mathml.attlist-root, empty }
  mathml.any |= mathml.root
  mathml.attlist-root &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clogicopquant = mathml.exists | mathml.forall
  mathml.exists = element exists { mathml.attlist-exists, empty }
  mathml.any |= mathml.exists
  mathml.attlist-exists &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.forall = element forall { mathml.attlist-forall, empty }
  mathml.any |= mathml.forall
  mathml.attlist-forall &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clogicopnary = mathml.and | mathml.or | mathml.xor
  mathml.and = element and { mathml.attlist-and, empty }
  mathml.any |= mathml.and
  mathml.attlist-and &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.or = element or { mathml.attlist-or, empty }
  mathml.any |= mathml.or
  mathml.attlist-or &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.xor = element xor { mathml.attlist-xor, empty }
  mathml.any |= mathml.xor
  mathml.attlist-xor &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clogicop1ary = mathml.not
  mathml.not = element not { mathml.attlist-not, empty }
  mathml.any |= mathml.not
  mathml.attlist-not &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clogicop2ary = mathml.implies
  mathml.implies = element implies { mathml.attlist-implies, empty }
  mathml.any |= mathml.implies
  mathml.attlist-implies &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.ccalcop =
    mathml.log
    | mathml.int
    | mathml.diff
    | mathml.partialdiff
    | mathml.divergence
    | mathml.grad
    | mathml.curl
    | mathml.laplacian
  mathml.divergence =
    element divergence { mathml.attlist-divergence, empty }
  mathml.any |= mathml.divergence
  mathml.attlist-divergence &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.grad = element grad { mathml.attlist-grad, empty }
  mathml.any |= mathml.grad
  mathml.attlist-grad &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.curl = element curl { mathml.attlist-curl, empty }
  mathml.any |= mathml.curl
  mathml.attlist-curl &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.laplacian =
    element laplacian { mathml.attlist-laplacian, empty }
  mathml.any |= mathml.laplacian
  mathml.attlist-laplacian &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.log = element log { mathml.attlist-log, empty }
  mathml.any |= mathml.log
  mathml.attlist-log &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.int = element int { mathml.attlist-int, empty }
  mathml.any |= mathml.int
  mathml.attlist-int &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.diff = element diff { mathml.attlist-diff, empty }
  mathml.any |= mathml.diff
  mathml.attlist-diff &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.partialdiff =
    element partialdiff { mathml.attlist-partialdiff, empty }
  mathml.any |= mathml.partialdiff
  mathml.attlist-partialdiff &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.ccalcop1ary = mathml.ln
  mathml.ln = element ln { mathml.attlist-ln, empty }
  mathml.any |= mathml.ln
  mathml.attlist-ln &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csetop1ary = mathml.card
  mathml.card = element card { mathml.attlist-card, empty }
  mathml.any |= mathml.card
  mathml.attlist-card &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csetop2ary = mathml.setdiff
  mathml.setdiff = element setdiff { mathml.attlist-setdiff, empty }
  mathml.any |= mathml.setdiff
  mathml.attlist-setdiff &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csetopnary =
    mathml.union | mathml.intersect | mathml.cartesianproduct
  mathml.union = element union { mathml.attlist-union, empty }
  mathml.any |= mathml.union
  mathml.attlist-union &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.intersect =
    element intersect { mathml.attlist-intersect, empty }
  mathml.any |= mathml.intersect
  mathml.attlist-intersect &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cartesianproduct =
    element cartesianproduct { mathml.attlist-cartesianproduct, empty }
  mathml.any |= mathml.cartesianproduct
  mathml.attlist-cartesianproduct &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cseqop = mathml.sum | mathml.product | mathml.limit
  mathml.sum = element sum { mathml.attlist-sum, empty }
  mathml.any |= mathml.sum
  mathml.attlist-sum &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.product = element product { mathml.attlist-product, empty }
  mathml.any |= mathml.product
  mathml.attlist-product &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.limit = element limit { mathml.attlist-limit, empty }
  mathml.any |= mathml.limit
  mathml.attlist-limit &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.ctrigop =
    mathml.sin
    | mathml.cos
    | mathml.tan
    | mathml.sec
    | mathml.csc
    | mathml.cot
    | mathml.sinh
    | mathml.cosh
    | mathml.tanh
    | mathml.sech
    | mathml.csch
    | mathml.coth
    | mathml.arcsin
    | mathml.arccos
    | mathml.arctan
    | mathml.arccosh
    | mathml.arccot
    | mathml.arccoth
    | mathml.arccsc
    | mathml.arccsch
    | mathml.arcsec
    | mathml.arcsech
    | mathml.arcsinh
    | mathml.arctanh
  mathml.sin = element sin { mathml.attlist-sin, empty }
  mathml.any |= mathml.sin
  mathml.attlist-sin &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cos = element cos { mathml.attlist-cos, empty }
  mathml.any |= mathml.cos
  mathml.attlist-cos &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.tan = element tan { mathml.attlist-tan, empty }
  mathml.any |= mathml.tan
  mathml.attlist-tan &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.sec = element sec { mathml.attlist-sec, empty }
  mathml.any |= mathml.sec
  mathml.attlist-sec &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csc = element csc { mathml.attlist-csc, empty }
  mathml.any |= mathml.csc
  mathml.attlist-csc &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cot = element cot { mathml.attlist-cot, empty }
  mathml.any |= mathml.cot
  mathml.attlist-cot &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.sinh = element sinh { mathml.attlist-sinh, empty }
  mathml.any |= mathml.sinh
  mathml.attlist-sinh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cosh = element cosh { mathml.attlist-cosh, empty }
  mathml.any |= mathml.cosh
  mathml.attlist-cosh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.tanh = element tanh { mathml.attlist-tanh, empty }
  mathml.any |= mathml.tanh
  mathml.attlist-tanh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.sech = element sech { mathml.attlist-sech, empty }
  mathml.any |= mathml.sech
  mathml.attlist-sech &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csch = element csch { mathml.attlist-csch, empty }
  mathml.any |= mathml.csch
  mathml.attlist-csch &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.coth = element coth { mathml.attlist-coth, empty }
  mathml.any |= mathml.coth
  mathml.attlist-coth &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arcsin = element arcsin { mathml.attlist-arcsin, empty }
  mathml.any |= mathml.arcsin
  mathml.attlist-arcsin &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccos = element arccos { mathml.attlist-arccos, empty }
  mathml.any |= mathml.arccos
  mathml.attlist-arccos &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arctan = element arctan { mathml.attlist-arctan, empty }
  mathml.any |= mathml.arctan
  mathml.attlist-arctan &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccosh = element arccosh { mathml.attlist-arccosh, empty }
  mathml.any |= mathml.arccosh
  mathml.attlist-arccosh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccot = element arccot { mathml.attlist-arccot, empty }
  mathml.any |= mathml.arccot
  mathml.attlist-arccot &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccoth = element arccoth { mathml.attlist-arccoth, empty }
  mathml.any |= mathml.arccoth
  mathml.attlist-arccoth &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccsc = element arccsc { mathml.attlist-arccsc, empty }
  mathml.any |= mathml.arccsc
  mathml.attlist-arccsc &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arccsch = element arccsch { mathml.attlist-arccsch, empty }
  mathml.any |= mathml.arccsch
  mathml.attlist-arccsch &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arcsec = element arcsec { mathml.attlist-arcsec, empty }
  mathml.any |= mathml.arcsec
  mathml.attlist-arcsec &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arcsech = element arcsech { mathml.attlist-arcsech, empty }
  mathml.any |= mathml.arcsech
  mathml.attlist-arcsech &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arcsinh = element arcsinh { mathml.attlist-arcsinh, empty }
  mathml.any |= mathml.arcsinh
  mathml.attlist-arcsinh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.arctanh = element arctanh { mathml.attlist-arctanh, empty }
  mathml.any |= mathml.arctanh
  mathml.attlist-arctanh &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cstatopnary =
    mathml.mean
    | mathml.sdev
    | mathml.variance
    | mathml.median
    | mathml.mode
  mathml.mean = element mean { mathml.attlist-mean, empty }
  mathml.any |= mathml.mean
  mathml.attlist-mean &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.sdev = element sdev { mathml.attlist-sdev, empty }
  mathml.any |= mathml.sdev
  mathml.attlist-sdev &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.variance = element variance { mathml.attlist-variance, empty }
  mathml.any |= mathml.variance
  mathml.attlist-variance &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.median = element median { mathml.attlist-median, empty }
  mathml.any |= mathml.median
  mathml.attlist-median &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.mode = element mode { mathml.attlist-mode, empty }
  mathml.any |= mathml.mode
  mathml.attlist-mode &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cstatopmoment = mathml.moment
  mathml.moment = element moment { mathml.attlist-moment, empty }
  mathml.any |= mathml.moment
  mathml.attlist-moment &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clalgop1ary = mathml.determinant | mathml.transpose
  mathml.determinant =
    element determinant { mathml.attlist-determinant, empty }
  mathml.any |= mathml.determinant
  mathml.attlist-determinant &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.transpose =
    element transpose { mathml.attlist-transpose, empty }
  mathml.any |= mathml.transpose
  mathml.attlist-transpose &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clalgop2ary =
    mathml.vectorproduct | mathml.scalarproduct | mathml.outerproduct
  mathml.vectorproduct =
    element vectorproduct { mathml.attlist-vectorproduct, empty }
  mathml.any |= mathml.vectorproduct
  mathml.attlist-vectorproduct &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.scalarproduct =
    element scalarproduct { mathml.attlist-scalarproduct, empty }
  mathml.any |= mathml.scalarproduct
  mathml.attlist-scalarproduct &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.outerproduct =
    element outerproduct { mathml.attlist-outerproduct, empty }
  mathml.any |= mathml.outerproduct
  mathml.attlist-outerproduct &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.clalgopnary = mathml.selector
  mathml.selector = element selector { mathml.attlist-selector, empty }
  mathml.any |= mathml.selector
  mathml.attlist-selector &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cgenrel2ary = mathml.neq | mathml.factorof
  mathml.neq = element neq { mathml.attlist-neq, empty }
  mathml.any |= mathml.neq
  mathml.attlist-neq &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.factorof = element factorof { mathml.attlist-factorof, empty }
  mathml.any |= mathml.factorof
  mathml.attlist-factorof &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cgenrelnary =
    mathml.eq
    | mathml.leq
    | mathml.lt
    | mathml.geq
    | mathml.gt
    | mathml.equivalent
    | mathml.approx
  mathml.eq = element eq { mathml.attlist-eq, empty }
  mathml.any |= mathml.eq
  mathml.attlist-eq &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.equivalent =
    element equivalent { mathml.attlist-equivalent, empty }
  mathml.any |= mathml.equivalent
  mathml.attlist-equivalent &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.approx = element approx { mathml.attlist-approx, empty }
  mathml.any |= mathml.approx
  mathml.attlist-approx &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.gt = element gt { mathml.attlist-gt, empty }
  mathml.any |= mathml.gt
  mathml.attlist-gt &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.lt = element lt { mathml.attlist-lt, empty }
  mathml.any |= mathml.lt
  mathml.attlist-lt &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.geq = element geq { mathml.attlist-geq, empty }
  mathml.any |= mathml.geq
  mathml.attlist-geq &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.leq = element leq { mathml.attlist-leq, empty }
  mathml.any |= mathml.leq
  mathml.attlist-leq &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csetrel2ary =
    mathml.in | mathml.notin | mathml.notsubset | mathml.notprsubset
  mathml.in = element in { mathml.attlist-in, empty }
  mathml.any |= mathml.in
  mathml.attlist-in &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.notin = element notin { mathml.attlist-notin, empty }
  mathml.any |= mathml.notin
  mathml.attlist-notin &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.notsubset =
    element notsubset { mathml.attlist-notsubset, empty }
  mathml.any |= mathml.notsubset
  mathml.attlist-notsubset &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.notprsubset =
    element notprsubset { mathml.attlist-notprsubset, empty }
  mathml.any |= mathml.notprsubset
  mathml.attlist-notprsubset &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.csetrelnary = mathml.subset | mathml.prsubset
  mathml.subset = element subset { mathml.attlist-subset, empty }
  mathml.any |= mathml.subset
  mathml.attlist-subset &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.prsubset = element prsubset { mathml.attlist-prsubset, empty }
  mathml.any |= mathml.prsubset
  mathml.attlist-prsubset &=
    MATHML.Common.attrib, mathml.att-definition, mathml.att-encoding
  mathml.cseqrel2ary = mathml.tendsto
  mathml.tendsto = element tendsto { mathml.attlist-tendsto, empty }
  mathml.any |= mathml.tendsto
  mathml.attlist-tendsto &=
    MATHML.Common.attrib,
    mathml.att-definition,
    mathml.att-encoding,
    mathml.att-type
  mathml.cquantifier =
    mathml.lowlimit
    | mathml.uplimit
    | mathml.bvar
    | mathml.degree
    | mathml.logbase
    | mathml.momentabout
    | mathml.domainofapplication
  mathml.attlist-lowlimit &= MATHML.Common.attrib
  mathml.attlist-uplimit &= MATHML.Common.attrib
  mathml.attlist-bvar &= MATHML.Common.attrib
  mathml.attlist-degree &= MATHML.Common.attrib
  mathml.attlist-logbase &= MATHML.Common.attrib
  mathml.attlist-momentabout &= MATHML.Common.attrib
  mathml.attlist-domainofapplication &= MATHML.Common.attrib
  mathml.cop1ary =
    mathml.cfuncop1ary
    | mathml.carithop1ary
    | mathml.clogicop1ary
    | mathml.ccalcop1ary
    | mathml.ctrigop
    | mathml.clalgop1ary
    | mathml.csetop1ary
  mathml.cop2ary =
    mathml.carithop2ary
    | mathml.clogicop2ary
    | mathml.clalgop2ary
    | mathml.csetop2ary
  mathml.copnary =
    mathml.cfuncopnary
    | mathml.carithopnary
    | mathml.clogicopnary
    | mathml.csetopnary
    | mathml.cstatopnary
    | mathml.clalgopnary
  mathml.copmisc =
    mathml.carithoproot
    | mathml.carithop1or2ary
    | mathml.ccalcop
    | mathml.cseqop
    | mathml.cstatopmoment
    | mathml.clogicopquant
  mathml.crel2ary =
    mathml.cgenrel2ary | mathml.csetrel2ary | mathml.cseqrel2ary
  mathml.crelnary = mathml.cgenrelnary | mathml.csetrelnary
  mathml.Content =
    mathml.ctoken
    | mathml.cspecial
    | mathml.cother
    | mathml.csemantics
    | mathml.c0ary
    | mathml.cconstructor
    | mathml.cquantifier
    | mathml.cop1ary
    | mathml.cop2ary
    | mathml.copnary
    | mathml.copmisc
    | mathml.crel2ary
    | mathml.crelnary
  mathml.ContInPres =
    mathml.ci
    | mathml.csymbol
    | mathml.cn
    | mathml.c0ary
    | mathml.apply
    | mathml.fn
    | mathml.lambda
    | mathml.reln
    | mathml.cconstructor
    | mathml.semantics
    | mathml.declare
  mathml.ContentExpression = (mathml.Content | mathml.PresInCont)*
  mathml.PresExpression = (mathml.Presentation | mathml.ContInPres)*
  mathml.MathExpression = (mathml.PresInCont | mathml.ContInPres)*
  mathml.MathMLCharacters = text | mathml.mglyph
  mathml.ci =
    element ci {
      mathml.attlist-ci, (mathml.MathMLCharacters | mathml.PresInCont)*
    }
  mathml.any |= mathml.ci
  mathml.csymbol =
    element csymbol {
      mathml.attlist-csymbol,
      (mathml.MathMLCharacters | mathml.PresInCont)*
    }
  mathml.any |= mathml.csymbol
  mathml.cn =
    element cn {
      mathml.attlist-cn,
      (mathml.MathMLCharacters | mathml.sep | mathml.PresInCont)*
    }
  mathml.any |= mathml.cn
  mathml.apply =
    element apply { mathml.attlist-apply, mathml.ContentExpression }
  mathml.any |= mathml.apply
  mathml.reln =
    element reln { mathml.attlist-reln, mathml.ContentExpression }
  mathml.any |= mathml.reln
  mathml.lambda =
    element lambda { mathml.attlist-lambda, mathml.ContentExpression }
  mathml.any |= mathml.lambda
  mathml.condition =
    element condition {
      mathml.attlist-condition, mathml.ContentExpression
    }
  mathml.any |= mathml.condition
  mathml.declare =
    element declare { mathml.attlist-declare, mathml.ContentExpression }
  mathml.any |= mathml.declare
  mathml.semantics =
    element semantics {
      mathml.attlist-semantics, mathml.ContentExpression
    }
  mathml.any |= mathml.semantics
  mathml.Annotation.content = text
  mathml.annotation =
    element annotation {
      mathml.attlist-annotation, mathml.Annotation.content
    }
  mathml.any |= mathml.annotation
  mathml.annotation-xml =
    element annotation-xml { mathml.attlist-annotation-xml, mathml.any }
  mathml.any |= mathml.annotation-xml
  mathml.interval =
    element interval {
      mathml.attlist-interval, mathml.ContentExpression
    }
  mathml.any |= mathml.interval
  mathml.set =
    element set { mathml.attlist-set, mathml.ContentExpression }
  mathml.any |= mathml.set
  mathml.list =
    element list { mathml.attlist-list, mathml.ContentExpression }
  mathml.any |= mathml.list
  mathml.vector =
    element vector { mathml.attlist-vector, mathml.ContentExpression }
  mathml.any |= mathml.vector
  mathml.matrix =
    element matrix { mathml.attlist-matrix, mathml.ContentExpression }
  mathml.any |= mathml.matrix
  mathml.matrixrow =
    element matrixrow {
      mathml.attlist-matrixrow, mathml.ContentExpression
    }
  mathml.any |= mathml.matrixrow
  mathml.piecewise =
    element piecewise {
      mathml.attlist-piecewise, mathml.piece*, mathml.otherwise?
    }
  mathml.any |= mathml.piecewise
  mathml.piece =
    element piece { mathml.attlist-piece, mathml.ContentExpression }
  mathml.any |= mathml.piece
  mathml.otherwise =
    element otherwise {
      mathml.attlist-otherwise, mathml.ContentExpression
    }
  mathml.any |= mathml.otherwise
  mathml.fn = element fn { mathml.attlist-fn, mathml.ContentExpression }
  mathml.any |= mathml.fn
  mathml.lowlimit =
    element lowlimit {
      mathml.attlist-lowlimit, mathml.ContentExpression
    }
  mathml.any |= mathml.lowlimit
  mathml.uplimit =
    element uplimit { mathml.attlist-uplimit, mathml.ContentExpression }
  mathml.any |= mathml.uplimit
  mathml.bvar =
    element bvar { mathml.attlist-bvar, mathml.ContentExpression }
  mathml.any |= mathml.bvar
  mathml.degree =
    element degree { mathml.attlist-degree, mathml.ContentExpression }
  mathml.any |= mathml.degree
  mathml.logbase =
    element logbase { mathml.attlist-logbase, mathml.ContentExpression }
  mathml.any |= mathml.logbase
  mathml.momentabout =
    element momentabout {
      mathml.attlist-momentabout, mathml.ContentExpression
    }
  mathml.any |= mathml.momentabout
  mathml.domainofapplication =
    element domainofapplication {
      mathml.attlist-domainofapplication, mathml.ContentExpression
    }
  mathml.any |= mathml.domainofapplication
  mathml.mstyle =
    element mstyle { mathml.attlist-mstyle, mathml.PresExpression }
  mathml.any |= mathml.mstyle
  mathml.merror =
    element merror { mathml.attlist-merror, mathml.PresExpression }
  mathml.any |= mathml.merror
  mathml.mphantom =
    element mphantom { mathml.attlist-mphantom, mathml.PresExpression }
  mathml.any |= mathml.mphantom
  mathml.mrow =
    element mrow { mathml.attlist-mrow, mathml.PresExpression }
  mathml.any |= mathml.mrow
  mathml.mfrac =
    element mfrac { mathml.attlist-mfrac, mathml.PresExpression }
  mathml.any |= mathml.mfrac
  mathml.msqrt =
    element msqrt { mathml.attlist-msqrt, mathml.PresExpression }
  mathml.any |= mathml.msqrt
  mathml.menclose =
    element menclose { mathml.attlist-menclose, mathml.PresExpression }
  mathml.any |= mathml.menclose
  mathml.mroot =
    element mroot { mathml.attlist-mroot, mathml.PresExpression }
  mathml.any |= mathml.mroot
  mathml.msub =
    element msub { mathml.attlist-msub, mathml.PresExpression }
  mathml.any |= mathml.msub
  mathml.msup =
    element msup { mathml.attlist-msup, mathml.PresExpression }
  mathml.any |= mathml.msup
  mathml.msubsup =
    element msubsup { mathml.attlist-msubsup, mathml.PresExpression }
  mathml.any |= mathml.msubsup
  mathml.mmultiscripts =
    element mmultiscripts {
      mathml.attlist-mmultiscripts, mathml.PresExpression
    }
  mathml.any |= mathml.mmultiscripts
  mathml.munder =
    element munder { mathml.attlist-munder, mathml.PresExpression }
  mathml.any |= mathml.munder
  mathml.mover =
    element mover { mathml.attlist-mover, mathml.PresExpression }
  mathml.any |= mathml.mover
  mathml.munderover =
    element munderover {
      mathml.attlist-munderover, mathml.PresExpression
    }
  mathml.any |= mathml.munderover
  mathml.mtable =
    element mtable { mathml.attlist-mtable, mathml.PresExpression }
  mathml.any |= mathml.mtable
  mathml.mtr = element mtr { mathml.attlist-mtr, mathml.PresExpression }
  mathml.any |= mathml.mtr
  mathml.mlabeledtr =
    element mlabeledtr {
      mathml.attlist-mlabeledtr, mathml.PresExpression
    }
  mathml.any |= mathml.mlabeledtr
  mathml.mtd = element mtd { mathml.attlist-mtd, mathml.PresExpression }
  mathml.any |= mathml.mtd
  mathml.maction =
    element maction { mathml.attlist-maction, mathml.PresExpression }
  mathml.any |= mathml.maction
  mathml.mfenced =
    element mfenced { mathml.attlist-mfenced, mathml.PresExpression }
  mathml.any |= mathml.mfenced
  mathml.mpadded =
    element mpadded { mathml.attlist-mpadded, mathml.PresExpression }
  mathml.any |= mathml.mpadded
  mathml.mi =
    element mi {
      mathml.attlist-mi, (mathml.MathMLCharacters | mathml.malignmark)*
    }
  mathml.any |= mathml.mi
  mathml.mn =
    element mn {
      mathml.attlist-mn, (mathml.MathMLCharacters | mathml.malignmark)*
    }
  mathml.any |= mathml.mn
  mathml.mo =
    element mo {
      mathml.attlist-mo, (mathml.MathMLCharacters | mathml.malignmark)*
    }
  mathml.any |= mathml.mo
  mathml.mtext =
    element mtext {
      mathml.attlist-mtext,
      (mathml.MathMLCharacters | mathml.malignmark)*
    }
  mathml.any |= mathml.mtext
  mathml.ms =
    element ms {
      mathml.attlist-ms, (mathml.MathMLCharacters | mathml.malignmark)*
    }
  mathml.any |= mathml.ms
  mathml.att-macros = attribute macros { text }?
  mathml.att-mode = attribute mode { text }?
  mathml.att-display = attribute display { text }?
  mathml.att-topinfo =
    MATHML.Common.attrib,
    mathml.att-macros,
    mathml.att-mode,
    mathml.att-display
  mathml.att-baseline = attribute baseline { text }?
  mathml.att-overflow =
    [ a:defaultValue = "scroll" ]
    attribute overflow { "scroll" | "elide" | "truncate" | "scale" }?
  mathml.att-altimg = attribute altimg { text }?
  mathml.att-alttext = attribute alttext { text }?
  mathml.att-browif =
    mathml.att-type,
    mathml.att-name,
    mathml.att-height,
    mathml.att-width,
    mathml.att-baseline,
    mathml.att-overflow,
    mathml.att-altimg,
    mathml.att-alttext
  mathml.math =
    element math { mathml.attlist-math, mathml.MathExpression }
  mathml.any |= mathml.math
  mathml.attlist-math &= mathml.att-topinfo, mathml.att-browif
  mathml.any |= text
}
div {
  extrapattern = anyDoc?, pattern, anyDoc?
  pattern =
    element rng:element {
      attribute name { xsd:QName },
      extrapattern+,
      attribute ns { xsd:anyURI }?
    }
    | element rng:element {
        element rng:choice {
          attribute xml:base { xsd:anyURI }?,
          nameClass+
        },
        attribute ns { xsd:anyURI }?,
        extrapattern+
      }
    | element rng:element { nameClass, extrapattern+ }
    | element rng:attribute {
        attribute name { xsd:QName },
        attribute ns { xsd:anyURI }?,
        anyAttDoc?,
        extrapattern?
      }
    | element rng:attribute { nameClass, extrapattern? }
    | element rng:group { extrapattern+ }
    | element rng:interleave { extrapattern+ }
    | element rng:choice { extrapattern+ }
    | element rng:optional { extrapattern+ }
    | element rng:zeroOrMore { extrapattern+ }
    | element rng:oneOrMore { extrapattern+ }
    | element rng:list { extrapattern+ }
    | element rng:mixed { extrapattern+ }
    | element rng:ref {
        attribute name { xsd:NCName }
      }
    | element rng:parentRef {
        attribute name { xsd:NCName }
      }
    | element rng:empty { empty }
    | element rng:text { empty }
    | element rng:value {
        attribute type { xsd:NCName }?,
        xsd:string
      }
    | element rng:data {
        attribute type { xsd:NCName },
        param*,
        exceptExtrapattern?
      }
    | element rng:notAllowed { empty }
    | element rng:externalRef {
        attribute href { xsd:anyURI },
        empty
      }
    | element rng:grammar {
        attribute datatypeLibrary { xsd:anyURI }?,
        attribute ns { xsd:anyURI },
        grammarContent*
      }
  anyDoc =
    element a:* {
      attribute ns { xsd:anyURI }?,
      (anyDoc | text)*
    }
  anyAttDoc = attribute a:defaultValue { text }
  param =
    element rng:param {
      attribute name { xsd:NCName },
      xsd:string
    }
  exceptExtrapattern = element rng:except { extrapattern+ }
  grammarContent =
    \start
    | define
    | element rng:div { grammarContent* }
    | element rng:include {
        attribute href { xsd:anyURI },
        includeContent*
      }
  includeContent =
    \start
    | define
    | element rng:div { includeContent* }
  \start =
    element rng:start {
      attribute combine { method }?,
      extrapattern
    }
  define =
    element rng:define {
      attribute name { xsd:NCName },
      attribute combine { method }?,
      extrapattern+
    }
  method = "choice" | "interleave"
  nameClass =
    element rng:name {
      xsd:QName,
      attribute ns { xsd:anyURI }?
    }
    | element rng:anyName { exceptNameClass? }
    | element rng:nsName {
        attribute ns { xsd:anyURI }?,
        exceptNameClass?
      }
    | element rng:choice { nameClass+ }
  exceptNameClass = element rng:except { nameClass+ }
}
TEI_macro.paraContent =
  (text
   | TEI_model.gLike
   | TEI_model.phrase
   | TEI_model.inter
   | TEI_model.global
   | TEI_lg
   | TEI_model.lLike)*
TEI_macro.limitedContent =
  (text | TEI_model.limitedPhrase | TEI_model.inter)*
TEI_macro.phraseSeq =
  (text
   | TEI_model.gLike
   | TEI_model.attributable
   | TEI_model.phrase
   | TEI_model.global)*
TEI_macro.phraseSeq.limited =
  (text | TEI_model.limitedPhrase | TEI_model.global)*
TEI_macro.specialPara =
  (text
   | TEI_model.gLike
   | TEI_model.phrase
   | TEI_model.inter
   | TEI_model.divPart
   | TEI_model.global)*
TEI_macro.xtext = (text | TEI_model.gLike)*
TEI_anyISOSchematron =
  element sch:* {
    (attribute * { text }
     | TEI_anyISOSchematron
     | TEI_anySchematronQuickFix
     | text)*
  }
TEI_anySchematronQuickFix =
  element sqf:* {
    (attribute * { text }
     | TEI_anySchematronQuickFix
     | TEI_anyISOSchematron
     | text)*
  }
TEI_anyRelax =
  element rng:* {
    (attribute * { text }
     | TEI_anyRelax
     | text)*
  }
anyElement-xenoData =
  element * - (tei:* | teix:egXML) {
    attribute * { text }*,
    (text | anyElement-xenoData)*
  }
anyElement-egXML =
  element * - (tei:* | teix:egXML) {
    attribute * { text }*,
    (text | anyElement-egXML)*
  }
anyElement-constraint =
  element * - (tei:* | teix:egXML) {
    attribute * { text }*,
    (text | anyElement-constraint)*
  }
anyElement-datatype =
  element * - (tei:* | teix:egXML) {
    attribute * { text }*,
    (text | anyElement-datatype)*
  }
  >> sch:pattern [
       id = "d8e71258-constraint"
       "\x{a}" ~
       "         "
       sch:rule [
         context = "tei:datatype"
         "\x{a}" ~
         "            "
         sch:report [
           test =
             "descendant::*[not(namespace-uri(.) =               ('http://relaxng.org/ns/structure/1.0', 'http://www.tei-c.org/ns/1.0'))]"
           "datatype descendants must be in the\x{a}" ~
           "              namespaces\x{a}" ~
           "              'http://relaxng.org/ns/structure/1.0', 'http://www.tei-c.org/ns/1.0'"
         ]
         "\x{a}" ~
         "         "
       ]
       "\x{a}" ~
       "      "
     ]
TEI_att.anchoring.attributes =
  TEI_att.anchoring.attribute.anchored,
  TEI_att.anchoring.attribute.targetEnd
TEI_att.anchoring.attribute.anchored =
  
  ## (anchored) indicates whether the copy text shows the exact place of reference for the note.
  [ a:defaultValue = "true" ] attribute anchored { xsd:boolean }?
TEI_att.anchoring.attribute.targetEnd =
  
  ## (target end) points to the end of the span to which the note is attached, if the note is not embedded in the text at that point.
  attribute targetEnd {
    list { xsd:anyURI+ }
  }?
TEI_att.ascribed.attributes = TEI_att.ascribed.attribute.who
TEI_att.ascribed.attribute.who =
  
  ## indicates the person, or group of people, to whom the element content is ascribed.
  attribute who {
    list { xsd:anyURI+ }
  }?
TEI_att.ascribed.directed.attributes =
  TEI_att.ascribed.attributes,
  TEI_att.ascribed.directed.attribute.toWhom
TEI_att.ascribed.directed.attribute.toWhom =
  
  ## indicates the person, or group of people, to whom a speech act or action is directed.
  attribute toWhom {
    list { xsd:anyURI+ }
  }?
TEI_att.canonical.attributes =
  TEI_att.canonical.attribute.key, TEI_att.canonical.attribute.ref
TEI_att.canonical.attribute.key =
  
  ## provides an externally-defined means of identifying the entity (or entities) being named, using a coded value of some kind.
  attribute key { xsd:string }?
TEI_att.canonical.attribute.ref =
  
  ## (reference) provides an explicit means of locating a full definition or identity for the entity being named by means of one or more URIs.
  attribute ref {
    list { xsd:anyURI+ }
  }?
TEI_att.ranging.attributes =
  TEI_att.ranging.attribute.atLeast,
  TEI_att.ranging.attribute.atMost,
  TEI_att.ranging.attribute.min,
  TEI_att.ranging.attribute.max,
  TEI_att.ranging.attribute.confidence
TEI_att.ranging.attribute.atLeast =
  
  ## gives a minimum estimated value for the approximate measurement.
  attribute atLeast {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.ranging.attribute.atMost =
  
  ## gives a maximum estimated value for the approximate measurement.
  attribute atMost {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.ranging.attribute.min =
  
  ## where the measurement summarizes more than one observation or a range, supplies the minimum value observed.
  attribute min {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.ranging.attribute.max =
  
  ## where the measurement summarizes more than one observation or a range, supplies the maximum value observed.
  attribute max {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.ranging.attribute.confidence =
  [
    a:documentation [
      "specifies the degree of statistical confidence (between zero and one) that a value falls within the range specified by "
      ns2:code [ "@min" ]
      " and "
      ns2:code [ "@max" ]
      ", or the proportion of observed values that fall within that range."
    ]
  ]
  attribute confidence { xsd:double }?
TEI_att.dimensions.attributes =
  TEI_att.ranging.attributes,
  TEI_att.dimensions.attribute.unit,
  TEI_att.dimensions.attribute.quantity,
  TEI_att.dimensions.attribute.extent,
  TEI_att.dimensions.attribute.precision,
  TEI_att.dimensions.attribute.scope
TEI_att.dimensions.attribute.unit =
  
  ## names the unit used for the measurement
  ## Suggested values include: 1] cm (centimetres); 2] mm (millimetres); 3] in (inches); 4] line; 5] char (characters)
  attribute unit {
    
    ## (centimetres) 
    "cm"
    | 
      ## (millimetres) 
      "mm"
    | 
      ## (inches) 
      "in"
    | 
      ## lines of text
      "line"
    | 
      ## (characters) characters of text
      "char"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.dimensions.attribute.quantity =
  
  ## specifies the length in the units specified
  attribute quantity {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.dimensions.attribute.extent =
  
  ## indicates the size of the object concerned using a project-specific vocabulary combining quantity and units in a single string of words.
  attribute extent { xsd:string }?
TEI_att.dimensions.attribute.precision =
  
  ## characterizes the precision of the values specified by the other attributes.
  attribute precision {
    
    ##
    "high"
    | 
      ##
      "medium"
    | 
      ##
      "low"
    | 
      ##
      "unknown"
  }?
TEI_att.dimensions.attribute.scope =
  
  ## where the measurement summarizes more than one observation, specifies the applicability of this measurement.
  ## Sample values include: 1] all; 2] most; 3] range
  attribute scope {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.written.attributes = TEI_att.written.attribute.hand
TEI_att.written.attribute.hand =
  [
    a:documentation [
      "points to a "
      ns2:code [ "<handNote>" ]
      " element describing the hand considered responsible for the content of the element concerned."
    ]
  ]
  attribute hand { xsd:anyURI }?
TEI_att.breaking.attributes = TEI_att.breaking.attribute.break
TEI_att.breaking.attribute.break =
  
  ## indicates whether or not the element bearing this attribute should be considered to mark the end of an orthographic token in the same way as whitespace.
  attribute break {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.cReferencing.attributes = TEI_att.cReferencing.attribute.cRef
TEI_att.cReferencing.attribute.cRef =
  [
    a:documentation [
      "(canonical reference) specifies the destination of the pointer by supplying a canonical reference expressed using the scheme defined in a "
      ns2:code [ "<refsDecl>" ]
      " element in the TEI header"
    ]
  ]
  attribute cRef { xsd:string }?
TEI_att.datable.w3c.attributes =
  TEI_att.datable.w3c.attribute.when,
  TEI_att.datable.w3c.attribute.notBefore,
  TEI_att.datable.w3c.attribute.notAfter,
  TEI_att.datable.w3c.attribute.from,
  TEI_att.datable.w3c.attribute.to
TEI_att.datable.w3c.attribute.when =
  
  ## supplies the value of the date or time in a standard form, e.g. yyyy-mm-dd.
  attribute when {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?
TEI_att.datable.w3c.attribute.notBefore =
  
  ## specifies the earliest possible date for the event in standard form, e.g. yyyy-mm-dd.
  attribute notBefore {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?
TEI_att.datable.w3c.attribute.notAfter =
  
  ## specifies the latest possible date for the event in standard form, e.g. yyyy-mm-dd.
  attribute notAfter {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?
TEI_att.datable.w3c.attribute.from =
  
  ## indicates the starting point of the period in standard form, e.g. yyyy-mm-dd.
  attribute from {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?
TEI_att.datable.w3c.attribute.to =
  
  ## indicates the ending point of the period in standard form, e.g. yyyy-mm-dd.
  attribute to {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?
sch:pattern [
  id = "p5odds-att.datable.w3c-att-datable-w3c-when-constraint-rule-1"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@when]"
    "\x{a}" ~
    "        "
    sch:report [
      test = "@notBefore|@notAfter|@from|@to"
      role = "nonfatal"
      "The @when attribute cannot be used with any other att.datable.w3c attributes."
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id = "p5odds-att.datable.w3c-att-datable-w3c-from-constraint-rule-2"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@from]"
    "\x{a}" ~
    "        "
    sch:report [
      test = "@notBefore"
      role = "nonfatal"
      "The @from and @notBefore attributes cannot be used together."
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id = "p5odds-att.datable.w3c-att-datable-w3c-to-constraint-rule-3"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@to]"
    "\x{a}" ~
    "        "
    sch:report [
      test = "@notAfter"
      role = "nonfatal"
      "The @to and @notAfter attributes cannot be used together."
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.datable.attributes =
  TEI_att.datable.w3c.attributes,
  TEI_att.datable.iso.attributes,
  TEI_att.datable.custom.attributes,
  TEI_att.datable.attribute.calendar,
  TEI_att.datable.attribute.period
TEI_att.datable.attribute.calendar =
  
  ## indicates the system or calendar to which the date represented by the content of this element belongs.
  attribute calendar { xsd:anyURI }?
sch:pattern [
  id = "p5odds-att.datable-calendar-calendar-constraint-rule-4"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@calendar]"
    "\x{a}" ~
    "            "
    sch:assert [
      test = "string-length(.) gt 0"
      " @calendar indicates the system or calendar to\x{a}" ~
      "              which the date represented by the content of this element belongs, but this\x{a}" ~
      "              "
      sch:name [ ]
      " element has no textual content."
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.datable.attribute.period =
  
  ## supplies a pointer to some location defining a named period of time within which the datable item is understood to have occurred.
  attribute period { xsd:anyURI }?
TEI_att.datcat.attributes =
  TEI_att.datcat.attribute.datcat, TEI_att.datcat.attribute.valueDatcat
TEI_att.datcat.attribute.datcat =
  
  ## contains a PID (persistent identifier) that aligns the given element with the appropriate Data Category (or categories) in ISOcat.
  attribute ns1:datcat {
    list { xsd:anyURI+ }
  }?
TEI_att.datcat.attribute.valueDatcat =
  
  ## contains a PID (persistent identifier) that aligns the content of the given element or the value of the given attribute with the appropriate simple Data Category (or categories) in ISOcat.
  attribute ns1:valueDatcat {
    list { xsd:anyURI+ }
  }?
TEI_att.declarable.attributes = TEI_att.declarable.attribute.default
TEI_att.declarable.attribute.default =
  
  ## indicates whether or not this element is selected by default when its parent is selected.
  [ a:defaultValue = "false" ]
  attribute default {
    
    ## This element is selected if its parent is selected
    "true"
    | 
      ## This element can only be selected explicitly, unless it is the only one of its kind, in which case it is selected if its parent is selected.
      "false"
  }?
TEI_att.declaring.attributes = TEI_att.declaring.attribute.decls
TEI_att.declaring.attribute.decls =
  
  ## identifies one or more declarable elements within the header, which are understood to apply to the element bearing this attribute and its content.
  attribute decls {
    list { xsd:anyURI+ }
  }?
TEI_att.fragmentable.attributes = TEI_att.fragmentable.attribute.part
TEI_att.fragmentable.attribute.part =
  
  ## specifies whether or not its parent element is fragmented in some way, typically by some other overlapping structure: for example a speech which is divided between two or more verse stanzas, a paragraph which is split across a page division, a verse line which is divided between two speakers.
  [ a:defaultValue = "N" ]
  attribute part {
    
    ## (yes) the element is fragmented in some (unspecified) respect
    "Y"
    | 
      ## (no) the element is not fragmented, or no claim is made as to its completeness
      "N"
    | 
      ## (initial) this is the initial part of a fragmented element
      "I"
    | 
      ## (medial) this is a medial part of a fragmented element
      "M"
    | 
      ## (final) this is the final part of a fragmented element
      "F"
  }?
TEI_att.divLike.attributes =
  TEI_att.fragmentable.attributes,
  TEI_att.divLike.attribute.org,
  TEI_att.divLike.attribute.sample
TEI_att.divLike.attribute.org =
  
  ## (organization) specifies how the content of the division is organized.
  [ a:defaultValue = "uniform" ]
  attribute org {
    
    ## no claim is made about the sequence in which the immediate contents of this division are to be processed, or their inter-relationships.
    "composite"
    | 
      ## the immediate contents of this element are regarded as forming a logical unit, to be processed in sequence.
      "uniform"
  }?
TEI_att.divLike.attribute.sample =
  
  ## indicates whether this division is a sample of the original source and if so, from which part.
  [ a:defaultValue = "complete" ]
  attribute sample {
    
    ## division lacks material present at end in source.
    "initial"
    | 
      ## division lacks material at start and end.
      "medial"
    | 
      ## division lacks material at start.
      "final"
    | 
      ## position of sampled material within original unknown.
      "unknown"
    | 
      ## division is not a sample.
      "complete"
  }?
TEI_att.docStatus.attributes = TEI_att.docStatus.attribute.status
TEI_att.docStatus.attribute.status =
  
  ## describes the status of a document either currently or, when associated with a dated element, at the time indicated.
  ## Sample values include: 1] approved; 2] candidate; 3] cleared; 4] deprecated; 5] draft; 6] embargoed; 7] expired; 8] frozen; 9] galley; 10] proposed; 11] published; 12] recommendation; 13] submitted; 14] unfinished; 15] withdrawn
  [ a:defaultValue = "draft" ]
  attribute status {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.global.responsibility.attributes =
  TEI_att.global.responsibility.attribute.cert,
  TEI_att.global.responsibility.attribute.resp
TEI_att.global.responsibility.attribute.cert =
  
  ## (certainty) signifies the degree of certainty associated with the intervention or interpretation.
  attribute cert {
    xsd:double
    | (
       ##
       "high"
       | 
         ##
         "medium"
       | 
         ##
         "low"
       | 
         ##
         "unknown")
  }?
TEI_att.global.responsibility.attribute.resp =
  
  ## (responsible party) indicates the agency responsible for the intervention or interpretation, for example an editor or transcriber.
  attribute resp {
    list { xsd:anyURI+ }
  }?
TEI_att.editLike.attributes =
  TEI_att.editLike.attribute.evidence,
  TEI_att.editLike.attribute.instant
TEI_att.editLike.attribute.evidence =
  
  ## indicates the nature of the evidence supporting the reliability or accuracy of the intervention or interpretation.
  ## Suggested values include: 1] internal; 2] external; 3] conjecture
  attribute evidence {
    list {
      (
       ## there is internal evidence to support the intervention.
       "internal"
       | 
         ## there is external evidence to support the intervention.
         "external"
       | 
         ## the intervention or interpretation has been made by the editor, cataloguer, or scholar on the basis of their expertise.
         "conjecture"
       | xsd:token { pattern = "[^\p{C}\p{Z}]+" })+
    }
  }?
TEI_att.editLike.attribute.instant =
  
  ## indicates whether this is an instant revision or not.
  [ a:defaultValue = "false" ]
  attribute instant {
    xsd:boolean
    | (
       ##
       "unknown"
       | 
         ##
         "inapplicable")
  }?
TEI_att.global.rendition.attributes =
  TEI_att.global.rendition.attribute.rend,
  TEI_att.global.rendition.attribute.style,
  TEI_att.global.rendition.attribute.rendition
TEI_att.global.rendition.attribute.rend =
  
  ## (rendition) indicates how the element in question was rendered or presented in the source text.
  attribute rend {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.global.rendition.attribute.style =
  
  ## contains an expression in some formal style definition language which defines the rendering or presentation used for this element in the source text
  attribute style { xsd:string }?
TEI_att.global.rendition.attribute.rendition =
  
  ## points to a description of the rendering or presentation used for this element in the source text.
  attribute rendition {
    list { xsd:anyURI+ }
  }?
TEI_att.global.source.attributes =
  TEI_att.global.source.attribute.source
TEI_att.global.source.attribute.source =
  
  ## specifies the source from which some aspect of this element is drawn.
  attribute source {
    list { xsd:anyURI+ }
  }?
TEI_att.global.attributes =
  TEI_att.global.rendition.attributes,
  TEI_att.global.linking.attributes,
  TEI_att.global.responsibility.attributes,
  TEI_att.global.source.attributes,
  TEI_att.global.attribute.xmlid,
  TEI_att.global.attribute.n,
  TEI_att.global.attribute.xmllang,
  TEI_att.global.attribute.xmlbase,
  TEI_att.global.attribute.xmlspace
TEI_att.global.attribute.xmlid =
  
  ## (identifier) provides a unique identifier for the element bearing the attribute.
  attribute xml:id { xsd:ID }?
TEI_att.global.attribute.n =
  
  ## (number) gives a number (or other label) for an element, which is not necessarily unique within the document.
  attribute n { xsd:string }?
TEI_att.global.attribute.xmllang =
  [
    a:documentation [
      "(language) indicates the language of the element content using a tag generated according to "
      ns2:a [
        href = "http://www.rfc-editor.org/rfc/bcp/bcp47.txt"
        "BCP 47"
      ]
      "."
    ]
  ]
  attribute xml:lang {
    xsd:language
    | (
       ##
       "")
  }?
TEI_att.global.attribute.xmlbase =
  
  ## provides a base URI reference with which applications can resolve relative URI references into absolute URI references.
  attribute xml:base { xsd:anyURI }?
TEI_att.global.attribute.xmlspace =
  
  ## signals an intention about how white space should be managed by applications.
  attribute xml:space {
    
    ## signals that the application's default white-space processing modes are acceptable
    "default"
    | 
      ## indicates the intent that applications preserve all white space
      "preserve"
  }?
TEI_att.handFeatures.attribute.scribe =
  
  ## gives a name or other identifier for the scribe believed to be responsible for this hand.
  attribute scribe { xsd:Name }?
TEI_att.handFeatures.attribute.scribeRef =
  [
    a:documentation [
      "points to a full description of the scribe concerned, typically supplied by a "
      ns2:code [ "<person>" ]
      " element elsewhere in the description."
    ]
  ]
  attribute scribeRef {
    list { xsd:anyURI+ }
  }?
TEI_att.handFeatures.attribute.script =
  
  ## characterizes the particular script or writing style used by this hand, for example secretary, copperplate, Chancery, Italian, etc.
  attribute script {
    list { xsd:Name+ }
  }?
TEI_att.handFeatures.attribute.scriptRef =
  [
    a:documentation [
      "points to a full description of the script or writing style used by this hand, typically supplied by a "
      ns2:code [ "<scriptNote>" ]
      " element elsewhere in the description."
    ]
  ]
  attribute scriptRef {
    list { xsd:anyURI+ }
  }?
TEI_att.handFeatures.attribute.medium =
  
  ## describes the tint or type of ink, e.g. brown, or other writing medium, e.g. pencil
  attribute medium {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.handFeatures.attribute.scope =
  
  ## specifies how widely this hand is used in the manuscript.
  attribute scope {
    
    ## only this hand is used throughout the manuscript
    "sole"
    | 
      ## this hand is used through most of the manuscript
      "major"
    | 
      ## this hand is used occasionally in the manuscript
      "minor"
  }?
TEI_att.internetMedia.attributes =
  TEI_att.internetMedia.attribute.mimeType
TEI_att.internetMedia.attribute.mimeType =
  
  ## (MIME media type) specifies the applicable multimedia internet mail extension (MIME) media type
  attribute mimeType {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.media.attributes =
  TEI_att.internetMedia.attributes,
  TEI_att.media.attribute.width,
  TEI_att.media.attribute.height,
  TEI_att.media.attribute.scale
TEI_att.media.attribute.width =
  
  ## Where the media are displayed, indicates the display width
  attribute width {
    xsd:token {
      pattern =
        "[\-+]?\d+(\.\d+)?(%|cm|mm|in|pt|pc|px|em|ex|gd|rem|vw|vh|vm)"
    }
  }?
TEI_att.media.attribute.height =
  
  ## Where the media are displayed, indicates the display height
  attribute height {
    xsd:token {
      pattern =
        "[\-+]?\d+(\.\d+)?(%|cm|mm|in|pt|pc|px|em|ex|gd|rem|vw|vh|vm)"
    }
  }?
TEI_att.media.attribute.scale =
  
  ## Where the media are displayed, indicates a scale factor to be applied when generating the desired display size
  attribute scale {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.resourced.attributes = TEI_att.resourced.attribute.url
TEI_att.resourced.attribute.url =
  
  ## (uniform resource locator) specifies the URL from which the media concerned may be obtained.
  attribute url { xsd:anyURI }
TEI_att.measurement.attributes =
  TEI_att.measurement.attribute.unit,
  TEI_att.measurement.attribute.unitRef,
  TEI_att.measurement.attribute.quantity,
  TEI_att.measurement.attribute.commodity
TEI_att.measurement.attribute.unit =
  
  ## (unit) indicates the units used for the measurement, usually using the standard symbol for the desired units.
  ## Suggested values include: 1] m (metre); 2] kg (kilogram); 3] s (second); 4] Hz (hertz); 5] Pa (pascal); 6] Ω (ohm); 7] L (litre); 8] t (tonne); 9] ha (hectare); 10] Å (ångström); 11] mL (millilitre); 12] cm (centimetre); 13] dB (decibel); 14] kbit (kilobit); 15] Kibit (kibibit); 16] kB (kilobyte); 17] KiB (kibibyte); 18] MB (megabyte); 19] MiB (mebibyte)
  attribute unit {
    
    ## (metre) SI base unit of length
    "m"
    | 
      ## (kilogram) SI base unit of mass
      "kg"
    | 
      ## (second) SI base unit of time
      "s"
    | 
      ## (hertz) SI unit of frequency
      "Hz"
    | 
      ## (pascal) SI unit of pressure or stress
      "Pa"
    | 
      ## (ohm) SI unit of electric resistance
      "Ω"
    | 
      ## (litre) 1 dm³
      "L"
    | 
      ## (tonne) 10³ kg
      "t"
    | 
      ## (hectare) 1 hm²
      "ha"
    | 
      ## (ångström) 10⁻¹⁰ m
      "Å"
    | 
      ## (millilitre) 
      "mL"
    | 
      ## (centimetre) 
      "cm"
    | 
      ## (decibel) see remarks, below
      "dB"
    | 
      ## (kilobit) 10³ or 1000 bits
      "kbit"
    | 
      ## (kibibit) 2¹⁰ or 1024 bits
      "Kibit"
    | 
      ## (kilobyte) 10³ or 1000 bytes
      "kB"
    | 
      ## (kibibyte) 2¹⁰ or 1024 bytes
      "KiB"
    | 
      ## (megabyte) 10⁶ or 1 000 000 bytes
      "MB"
    | 
      ## (mebibyte) 2²⁰ or 1 048 576 bytes
      "MiB"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.measurement.attribute.unitRef =
  [
    a:documentation [
      "points to a unique identifier stored in the "
      ns2:code [ "@xml:id" ]
      " of a "
      ns2:code [ "<unitDef>" ]
      " element that defines a unit of measure."
    ]
  ]
  attribute unitRef { xsd:anyURI }?
TEI_att.measurement.attribute.quantity =
  
  ## (quantity) specifies the number of the specified units that comprise the measurement
  attribute quantity {
    xsd:double
    | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
    | xsd:decimal
  }?
TEI_att.measurement.attribute.commodity =
  
  ## (commodity) indicates the substance that is being measured
  attribute commodity {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
sch:pattern [
  id =
    "p5odds-att.measurement-att-measurement-unitRef-constraint-rule-5"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@unitRef]"
    "\x{a}" ~
    "        "
    sch:report [
      test = "@unit"
      role = "info"
      "The @unit attribute may be unnecessary when @unitRef is present."
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.naming.attributes =
  TEI_att.canonical.attributes,
  TEI_att.naming.attribute.role,
  TEI_att.naming.attribute.nymRef
TEI_att.naming.attribute.role =
  
  ## may be used to specify further information about the entity referenced by this name in the form of a set of whitespace-separated values, for example the occupation of a person, or the status of a place.
  attribute role {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.naming.attribute.nymRef =
  
  ## (reference to the canonical name) provides a means of locating the canonical form (nym) of the names associated with the object named by the element bearing it.
  attribute nymRef {
    list { xsd:anyURI+ }
  }?
TEI_att.notated.attributes = TEI_att.notated.attribute.notation
TEI_att.notated.attribute.notation =
  
  ## names the notation used for the content of the element.
  attribute notation {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.placement.attributes = TEI_att.placement.attribute.place
TEI_att.placement.attribute.place =
  
  ## specifies where this item is placed.
  ## Suggested values include: 1] top; 2] bottom; 3] margin; 4] opposite; 5] overleaf; 6] above; 7] right; 8] below; 9] left; 10] end; 11] inline; 12] inspace
  attribute place {
    list {
      (
       ## at the top of the page
       "top"
       | 
         ## at the foot of the page
         "bottom"
       | 
         ## in the margin (left, right, or both)
         "margin"
       | 
         ## on the opposite, i.e. facing, page
         "opposite"
       | 
         ## on the other side of the leaf
         "overleaf"
       | 
         ## above the line
         "above"
       | 
         ## to the right, e.g. to the right of a vertical line of text, or to the right of a figure
         "right"
       | 
         ## below the line
         "below"
       | 
         ## to the left, e.g. to the left of a vertical line of text, or to the left of a figure
         "left"
       | 
         ## at the end of e.g. chapter or volume.
         "end"
       | 
         ## within the body of the text.
         "inline"
       | 
         ## in a predefined space, for example left by an earlier scribe.
         "inspace"
       | xsd:token { pattern = "[^\p{C}\p{Z}]+" })+
    }
  }?
TEI_att.typed.attributes =
  TEI_att.typed.attribute.type, TEI_att.typed.attribute.subtype
TEI_att.typed.attribute.type =
  
  ## characterizes the element in some sense, using any convenient classification scheme or typology.
  attribute type {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.typed.attribute.subtype =
  
  ## (subtype) provides a sub-categorization of the element, if needed
  attribute subtype {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
sch:pattern [
  id = "p5odds-att.typed-subtypeTyped-constraint-rule-6"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@subtype]"
    "\x{a}" ~
    "        "
    sch:assert [
      test = "@type"
      "The "
      sch:name [ ]
      " element should not be categorized in detail with @subtype unless also categorized in general with @type"
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.pointing.attributes =
  TEI_att.pointing.attribute.targetLang,
  TEI_att.pointing.attribute.target,
  TEI_att.pointing.attribute.evaluate
TEI_att.pointing.attribute.targetLang =
  [
    a:documentation [
      "specifies the language of the content to be found at the destination referenced by "
      ns2:code [ "@target" ]
      ", using a language tag generated according to "
      ns2:a [
        href = "http://www.rfc-editor.org/rfc/bcp/bcp47.txt"
        "BCP 47"
      ]
      "."
    ]
  ]
  attribute targetLang {
    xsd:language
    | (
       ##
       "")
  }?
sch:pattern [
  id = "p5odds-att.pointing-targetLang-targetLang-constraint-rule-7"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[not(self::tei:schemaSpec)][@targetLang]"
    "\x{a}" ~
    "            "
    sch:assert [
      test = "@target"
      "@targetLang should only be used on "
      sch:name [ ]
      " if @target is specified."
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.pointing.attribute.target =
  
  ## specifies the destination of the reference by supplying one or more URI References
  attribute target {
    list { xsd:anyURI+ }
  }?
TEI_att.pointing.attribute.evaluate =
  
  ## (evaluate) specifies the intended meaning when the target of a pointer is itself a pointer.
  attribute evaluate {
    
    ## if the element pointed to is itself a pointer, then the target of that pointer will be taken, and so on, until an element is found which is not a pointer.
    "all"
    | 
      ## if the element pointed to is itself a pointer, then its target (whether a pointer or not) is taken as the target of this pointer.
      "one"
    | 
      ## no further evaluation of targets is carried out beyond that needed to find the element specified in the pointer's target.
      "none"
  }?
TEI_att.pointing.group.attributes =
  TEI_att.pointing.attributes,
  TEI_att.typed.attributes,
  TEI_att.pointing.group.attribute.domains,
  TEI_att.pointing.group.attribute.targFunc
TEI_att.pointing.group.attribute.domains =
  
  ## optionally specifies the identifiers of the elements within which all elements indicated by the contents of this element lie.
  attribute domains {
    list { xsd:anyURI, xsd:anyURI, xsd:anyURI* }
  }?
TEI_att.pointing.group.attribute.targFunc =
  [
    a:documentation [
      "(target function) describes the function of each of the values of the "
      ns2:code [ "@target" ]
      " attribute of the enclosed "
      ns2:code [ "<link>" ]
      ", "
      ns2:code [ "<join>" ]
      ", or "
      ns2:code [ "<alt>" ]
      " tags."
    ]
  ]
  attribute targFunc {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" },
      xsd:token { pattern = "[^\p{C}\p{Z}]+" },
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }*
    }
  }?
TEI_att.segLike.attributes =
  TEI_att.datcat.attributes,
  TEI_att.fragmentable.attributes,
  TEI_att.segLike.attribute.function
TEI_att.segLike.attribute.function =
  
  ## (function) characterizes the function of the segment.
  attribute function {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.sortable.attributes = TEI_att.sortable.attribute.sortKey
TEI_att.sortable.attribute.sortKey =
  
  ## supplies the sort key for this element in an index, list or group which contains it.
  attribute sortKey {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.edition.attributes =
  TEI_att.edition.attribute.ed, TEI_att.edition.attribute.edRef
TEI_att.edition.attribute.ed =
  
  ## (edition) supplies a sigil or other arbitrary identifier for the source edition in which the associated feature (for example, a page, column, or line break) occurs at this point in the text.
  attribute ed {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.edition.attribute.edRef =
  
  ## (edition reference) provides a pointer to the source edition in which the associated feature (for example, a page, column, or line break) occurs at this point in the text.
  attribute edRef {
    list { xsd:anyURI+ }
  }?
TEI_att.spanning.attributes = TEI_att.spanning.attribute.spanTo
TEI_att.spanning.attribute.spanTo =
  
  ## indicates the end of a span initiated by the element bearing this attribute.
  attribute spanTo { xsd:anyURI }?
sch:pattern [
  id = "p5odds-att.spanning-spanTo-spanTo-2-constraint-rule-8"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@spanTo]"
    "\x{a}" ~
    "            "
    sch:assert [
      test =
        "id(substring(@spanTo,2)) and following::*[@xml:id=substring(current()/@spanTo,2)]"
      "\x{a}" ~
      "The element indicated by @spanTo ("
      sch:value-of [ select = "@spanTo" ]
      ") must follow the current element "
      sch:name [ ]
      "\x{a}" ~
      "                  "
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.styleDef.attributes =
  TEI_att.styleDef.attribute.scheme,
  TEI_att.styleDef.attribute.schemeVersion
TEI_att.styleDef.attribute.scheme =
  
  ## identifies the language used to describe the rendition.
  attribute scheme {
    
    ## Cascading Stylesheet Language
    "css"
    | 
      ## Extensible Stylesheet Language Formatting Objects
      "xslfo"
    | 
      ## Informal free text description
      "free"
    | 
      ## A user-defined rendition description language
      "other"
  }?
TEI_att.styleDef.attribute.schemeVersion =
  [
    a:documentation [
      "supplies a version number for the style language provided in "
      ns2:code [ "@scheme" ]
      "."
    ]
  ]
  attribute schemeVersion {
    xsd:token { pattern = "[\d]+[a-z]*[\d]*(\.[\d]+[a-z]*[\d]*){0,3}" }
  }?
sch:pattern [
  id =
    "p5odds-att.styleDef-schemeVersion-schemeVersionRequiresScheme-constraint-rule-9"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@schemeVersion]"
    "\x{a}" ~
    "            "
    sch:assert [
      test = "@scheme and not(@scheme = 'free')"
      "\x{a}" ~
      "              @schemeVersion can only be used if @scheme is specified.\x{a}" ~
      "            "
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.timed.attributes =
  TEI_att.timed.attribute.start, TEI_att.timed.attribute.end
TEI_att.timed.attribute.start =
  
  ## indicates the location within a temporal alignment at which this element begins.
  attribute start { xsd:anyURI }?
TEI_att.timed.attribute.end =
  
  ## indicates the location within a temporal alignment at which this element ends.
  attribute end { xsd:anyURI }?
TEI_att.transcriptional.attributes =
  TEI_att.editLike.attributes,
  TEI_att.written.attributes,
  TEI_att.transcriptional.attribute.status,
  TEI_att.transcriptional.attribute.cause,
  TEI_att.transcriptional.attribute.seq
TEI_att.transcriptional.attribute.status =
  
  ## indicates the effect of the intervention, for example in the case of a deletion, strikeouts which include too much or too little text, or in the case of an addition, an insertion which duplicates some of the text already present.
  ## Sample values include: 1] duplicate; 2] duplicate-partial; 3] excessStart; 4] excessEnd; 5] shortStart; 6] shortEnd; 7] partial; 8] unremarkable
  [ a:defaultValue = "unremarkable" ]
  attribute status {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.transcriptional.attribute.cause =
  
  ## documents the presumed cause for the intervention.
  attribute cause {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.transcriptional.attribute.seq =
  
  ## (sequence) assigns a sequence number related to the order in which the encoded features carrying this attribute are believed to have occurred.
  attribute seq { xsd:nonNegativeInteger }?
TEI_att.citing.attributes =
  TEI_att.citing.attribute.unit,
  TEI_att.citing.attribute.from,
  TEI_att.citing.attribute.to
TEI_att.citing.attribute.unit =
  
  ## identifies the unit of information conveyed by the element, e.g. columns, pages, volume, entry.
  ## Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line; 5] chapter (chapter); 6] part; 7] column; 8] entry
  attribute unit {
    
    ## (volume) the element contains a volume number.
    "volume"
    | 
      ## the element contains an issue number, or volume and issue numbers.
      "issue"
    | 
      ## (page) the element contains a page number or page range.
      "page"
    | 
      ## the element contains a line number or line range.
      "line"
    | 
      ## (chapter) the element contains a chapter indication (number and/or title)
      "chapter"
    | 
      ## the element identifies a part of a book or collection.
      "part"
    | 
      ## the element identifies a column.
      "column"
    | 
      ## the element identifies an entry number or label in a list of entries.
      "entry"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.citing.attribute.from =
  [
    a:documentation [
      "specifies the starting point of the range of units indicated by the "
      ns2:code [ "@unit" ]
      " attribute."
    ]
  ]
  attribute from {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.citing.attribute.to =
  [
    a:documentation [
      "specifies the end-point of the range of units indicated by the "
      ns2:code [ "@unit" ]
      " attribute."
    ]
  ]
  attribute to {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_model.nameLike.agent = TEI_name | TEI_orgName | TEI_persName
TEI_model.nameLike.agent_alternation =
  TEI_name | TEI_orgName | TEI_persName
TEI_model.nameLike.agent_sequence = TEI_name, TEI_orgName, TEI_persName
TEI_model.nameLike.agent_sequenceOptional =
  TEI_name?, TEI_orgName?, TEI_persName?
TEI_model.nameLike.agent_sequenceOptionalRepeatable =
  TEI_name*, TEI_orgName*, TEI_persName*
TEI_model.nameLike.agent_sequenceRepeatable =
  TEI_name+, TEI_orgName+, TEI_persName+
TEI_model.segLike = TEI_seg
TEI_model.hiLike = TEI_hi | TEI_q
TEI_model.hiLike_alternation = TEI_hi | TEI_q
TEI_model.hiLike_sequence = TEI_hi, TEI_q
TEI_model.hiLike_sequenceOptional = TEI_hi?, TEI_q?
TEI_model.hiLike_sequenceOptionalRepeatable = TEI_hi*, TEI_q*
TEI_model.hiLike_sequenceRepeatable = TEI_hi+, TEI_q+
TEI_model.emphLike =
  TEI_foreign
  | TEI_emph
  | TEI_distinct
  | TEI_mentioned
  | TEI_soCalled
  | TEI_gloss
  | TEI_term
  | TEI_title
  | TEI_code
  | TEI_ident
TEI_model.emphLike_alternation =
  TEI_foreign
  | TEI_emph
  | TEI_distinct
  | TEI_mentioned
  | TEI_soCalled
  | TEI_gloss
  | TEI_term
  | TEI_title
  | TEI_code
  | TEI_ident
TEI_model.emphLike_sequence =
  TEI_foreign,
  TEI_emph,
  TEI_distinct,
  TEI_mentioned,
  TEI_soCalled,
  TEI_gloss,
  TEI_term,
  TEI_title,
  TEI_code,
  TEI_ident
TEI_model.emphLike_sequenceOptional =
  TEI_foreign?,
  TEI_emph?,
  TEI_distinct?,
  TEI_mentioned?,
  TEI_soCalled?,
  TEI_gloss?,
  TEI_term?,
  TEI_title?,
  TEI_code?,
  TEI_ident?
TEI_model.emphLike_sequenceOptionalRepeatable =
  TEI_foreign*,
  TEI_emph*,
  TEI_distinct*,
  TEI_mentioned*,
  TEI_soCalled*,
  TEI_gloss*,
  TEI_term*,
  TEI_title*,
  TEI_code*,
  TEI_ident*
TEI_model.emphLike_sequenceRepeatable =
  TEI_foreign+,
  TEI_emph+,
  TEI_distinct+,
  TEI_mentioned+,
  TEI_soCalled+,
  TEI_gloss+,
  TEI_term+,
  TEI_title+,
  TEI_code+,
  TEI_ident+
TEI_model.highlighted = TEI_model.hiLike | TEI_model.emphLike
TEI_model.dateLike = TEI_date | TEI_time
TEI_model.dateLike_alternation = TEI_date | TEI_time
TEI_model.dateLike_sequence = TEI_date, TEI_time
TEI_model.dateLike_sequenceOptional = TEI_date?, TEI_time?
TEI_model.dateLike_sequenceOptionalRepeatable = TEI_date*, TEI_time*
TEI_model.dateLike_sequenceRepeatable = TEI_date+, TEI_time+
TEI_model.measureLike =
  TEI_num | TEI_measure | TEI_measureGrp | TEI_unit | TEI_geo
TEI_model.measureLike_alternation =
  TEI_num | TEI_measure | TEI_measureGrp | TEI_unit | TEI_geo
TEI_model.measureLike_sequence =
  TEI_num, TEI_measure, TEI_measureGrp, TEI_unit, TEI_geo
TEI_model.measureLike_sequenceOptional =
  TEI_num?, TEI_measure?, TEI_measureGrp?, TEI_unit?, TEI_geo?
TEI_model.measureLike_sequenceOptionalRepeatable =
  TEI_num*, TEI_measure*, TEI_measureGrp*, TEI_unit*, TEI_geo*
TEI_model.measureLike_sequenceRepeatable =
  TEI_num+, TEI_measure+, TEI_measureGrp+, TEI_unit+, TEI_geo+
TEI_model.egLike = TEI_eg | TEI_egXML
TEI_model.egLike_alternation = TEI_eg | TEI_egXML
TEI_model.egLike_sequence = TEI_eg, TEI_egXML
TEI_model.egLike_sequenceOptional = TEI_eg?, TEI_egXML?
TEI_model.egLike_sequenceOptionalRepeatable = TEI_eg*, TEI_egXML*
TEI_model.egLike_sequenceRepeatable = TEI_eg+, TEI_egXML+
TEI_model.graphicLike =
  TEI_media | TEI_graphic | TEI_binaryObject | TEI_formula
TEI_model.offsetLike = TEI_offset | TEI_geogFeat
TEI_model.offsetLike_alternation = TEI_offset | TEI_geogFeat
TEI_model.offsetLike_sequence = TEI_offset, TEI_geogFeat
TEI_model.offsetLike_sequenceOptional = TEI_offset?, TEI_geogFeat?
TEI_model.offsetLike_sequenceOptionalRepeatable =
  TEI_offset*, TEI_geogFeat*
TEI_model.offsetLike_sequenceRepeatable = TEI_offset+, TEI_geogFeat+
TEI_model.pPart.msdesc = notAllowed
TEI_model.pPart.editorial = TEI_choice | TEI_abbr | TEI_expan
TEI_model.pPart.editorial_alternation =
  TEI_choice | TEI_abbr | TEI_expan
TEI_model.pPart.editorial_sequence = TEI_choice, TEI_abbr, TEI_expan
TEI_model.pPart.editorial_sequenceOptional =
  TEI_choice?, TEI_abbr?, TEI_expan?
TEI_model.pPart.editorial_sequenceOptionalRepeatable =
  TEI_choice*, TEI_abbr*, TEI_expan*
TEI_model.pPart.editorial_sequenceRepeatable =
  TEI_choice+, TEI_abbr+, TEI_expan+
TEI_model.pPart.transcriptional =
  TEI_sic
  | TEI_corr
  | TEI_reg
  | TEI_orig
  | TEI_add
  | TEI_del
  | TEI_unclear
TEI_model.pPart.transcriptional_alternation =
  TEI_sic
  | TEI_corr
  | TEI_reg
  | TEI_orig
  | TEI_add
  | TEI_del
  | TEI_unclear
TEI_model.pPart.transcriptional_sequence =
  TEI_sic, TEI_corr, TEI_reg, TEI_orig, TEI_add, TEI_del, TEI_unclear
TEI_model.pPart.transcriptional_sequenceOptional =
  TEI_sic?,
  TEI_corr?,
  TEI_reg?,
  TEI_orig?,
  TEI_add?,
  TEI_del?,
  TEI_unclear?
TEI_model.pPart.transcriptional_sequenceOptionalRepeatable =
  TEI_sic*,
  TEI_corr*,
  TEI_reg*,
  TEI_orig*,
  TEI_add*,
  TEI_del*,
  TEI_unclear*
TEI_model.pPart.transcriptional_sequenceRepeatable =
  TEI_sic+,
  TEI_corr+,
  TEI_reg+,
  TEI_orig+,
  TEI_add+,
  TEI_del+,
  TEI_unclear+
TEI_model.pPart.edit =
  TEI_model.pPart.editorial | TEI_model.pPart.transcriptional
TEI_model.ptrLike = TEI_ptr | TEI_ref
TEI_model.lPart = notAllowed
TEI_model.global.meta =
  TEI_index
  | TEI_link
  | TEI_linkGrp
  | TEI_timeline
  | TEI_join
  | TEI_joinGrp
  | TEI_alt
  | TEI_altGrp
TEI_model.milestoneLike =
  TEI_milestone | TEI_gb | TEI_pb | TEI_lb | TEI_cb | TEI_anchor
TEI_model.gLike = TEI_g
TEI_model.oddDecl =
  TEI_moduleSpec
  | TEI_specGrp
  | TEI_specGrpRef
  | TEI_elementSpec
  | TEI_classSpec
  | TEI_dataSpec
  | TEI_macroSpec
  | TEI_listRef
  | TEI_outputRendition
  | TEI_constraintSpec
TEI_model.oddDecl_alternation =
  TEI_moduleSpec
  | TEI_specGrp
  | TEI_specGrpRef
  | TEI_elementSpec
  | TEI_classSpec
  | TEI_dataSpec
  | TEI_macroSpec
  | TEI_listRef
  | TEI_outputRendition
  | TEI_constraintSpec
TEI_model.oddDecl_sequence =
  TEI_moduleSpec,
  TEI_specGrp,
  TEI_specGrpRef,
  TEI_elementSpec,
  TEI_classSpec,
  TEI_dataSpec,
  TEI_macroSpec,
  TEI_listRef,
  TEI_outputRendition,
  TEI_constraintSpec
TEI_model.oddDecl_sequenceOptional =
  TEI_moduleSpec?,
  TEI_specGrp?,
  TEI_specGrpRef?,
  TEI_elementSpec?,
  TEI_classSpec?,
  TEI_dataSpec?,
  TEI_macroSpec?,
  TEI_listRef?,
  TEI_outputRendition?,
  TEI_constraintSpec?
TEI_model.oddDecl_sequenceOptionalRepeatable =
  TEI_moduleSpec*,
  TEI_specGrp*,
  TEI_specGrpRef*,
  TEI_elementSpec*,
  TEI_classSpec*,
  TEI_dataSpec*,
  TEI_macroSpec*,
  TEI_listRef*,
  TEI_outputRendition*,
  TEI_constraintSpec*
TEI_model.oddDecl_sequenceRepeatable =
  TEI_moduleSpec+,
  TEI_specGrp+,
  TEI_specGrpRef+,
  TEI_elementSpec+,
  TEI_classSpec+,
  TEI_dataSpec+,
  TEI_macroSpec+,
  TEI_listRef+,
  TEI_outputRendition+,
  TEI_constraintSpec+
TEI_model.oddRef =
  TEI_classRef
  | TEI_elementRef
  | TEI_macroRef
  | TEI_moduleRef
  | TEI_dataRef
TEI_model.phrase.xml = TEI_att | TEI_gi | TEI_tag | TEI_val
TEI_model.specDescLike = TEI_specList | TEI_specDesc
TEI_model.biblLike =
  TEI_bibl | TEI_biblStruct | TEI_listBibl | TEI_biblFull
TEI_model.biblLike_alternation =
  TEI_bibl | TEI_biblStruct | TEI_listBibl | TEI_biblFull
TEI_model.biblLike_sequence =
  TEI_bibl, TEI_biblStruct, TEI_listBibl, TEI_biblFull
TEI_model.biblLike_sequenceOptional =
  TEI_bibl?, TEI_biblStruct?, TEI_listBibl?, TEI_biblFull?
TEI_model.biblLike_sequenceOptionalRepeatable =
  TEI_bibl*, TEI_biblStruct*, TEI_listBibl*, TEI_biblFull*
TEI_model.biblLike_sequenceRepeatable =
  TEI_bibl+, TEI_biblStruct+, TEI_listBibl+, TEI_biblFull+
TEI_model.headLike = TEI_head
TEI_model.headLike_alternation = TEI_head
TEI_model.headLike_sequence = TEI_head
TEI_model.headLike_sequenceOptional = TEI_head?
TEI_model.headLike_sequenceOptionalRepeatable = TEI_head*
TEI_model.headLike_sequenceRepeatable = TEI_head+
TEI_model.labelLike = TEI_desc | TEI_label
TEI_model.labelLike_alternation = TEI_desc | TEI_label
TEI_model.labelLike_sequence = TEI_desc, TEI_label
TEI_model.labelLike_sequenceOptional = TEI_desc?, TEI_label?
TEI_model.labelLike_sequenceOptionalRepeatable = TEI_desc*, TEI_label*
TEI_model.labelLike_sequenceRepeatable = TEI_desc+, TEI_label+
TEI_model.listLike =
  TEI_list
  | TEI_listOrg
  | TEI_listEvent
  | TEI_listPerson
  | TEI_listPlace
  | TEI_listRelation
  | TEI_listObject
  | TEI_listNym
  | TEI_table
TEI_model.listLike_alternation =
  TEI_list
  | TEI_listOrg
  | TEI_listEvent
  | TEI_listPerson
  | TEI_listPlace
  | TEI_listRelation
  | TEI_listObject
  | TEI_listNym
  | TEI_table
TEI_model.listLike_sequence =
  TEI_list,
  TEI_listOrg,
  TEI_listEvent,
  TEI_listPerson,
  TEI_listPlace,
  TEI_listRelation,
  TEI_listObject,
  TEI_listNym,
  TEI_table
TEI_model.listLike_sequenceOptional =
  TEI_list?,
  TEI_listOrg?,
  TEI_listEvent?,
  TEI_listPerson?,
  TEI_listPlace?,
  TEI_listRelation?,
  TEI_listObject?,
  TEI_listNym?,
  TEI_table?
TEI_model.listLike_sequenceOptionalRepeatable =
  TEI_list*,
  TEI_listOrg*,
  TEI_listEvent*,
  TEI_listPerson*,
  TEI_listPlace*,
  TEI_listRelation*,
  TEI_listObject*,
  TEI_listNym*,
  TEI_table*
TEI_model.listLike_sequenceRepeatable =
  TEI_list+,
  TEI_listOrg+,
  TEI_listEvent+,
  TEI_listPerson+,
  TEI_listPlace+,
  TEI_listRelation+,
  TEI_listObject+,
  TEI_listNym+,
  TEI_table+
TEI_model.noteLike = TEI_note | TEI_noteGrp
TEI_model.lLike = TEI_l
TEI_model.lLike_alternation = TEI_l
TEI_model.lLike_sequence = TEI_l
TEI_model.lLike_sequenceOptional = TEI_l?
TEI_model.lLike_sequenceOptionalRepeatable = TEI_l*
TEI_model.lLike_sequenceRepeatable = TEI_l+
TEI_model.pLike = TEI_p | TEI_ab
TEI_model.pLike_alternation = TEI_p | TEI_ab
TEI_model.pLike_sequence = TEI_p, TEI_ab
TEI_model.pLike_sequenceOptional = TEI_p?, TEI_ab?
TEI_model.pLike_sequenceOptionalRepeatable = TEI_p*, TEI_ab*
TEI_model.pLike_sequenceRepeatable = TEI_p+, TEI_ab+
TEI_model.stageLike = TEI_stage
TEI_model.stageLike_alternation = TEI_stage
TEI_model.stageLike_sequence = TEI_stage
TEI_model.stageLike_sequenceOptional = TEI_stage?
TEI_model.stageLike_sequenceOptionalRepeatable = TEI_stage*
TEI_model.stageLike_sequenceRepeatable = TEI_stage+
TEI_model.entryPart =
  TEI_superEntry
  | TEI_hom
  | TEI_sense
  | TEI_form
  | TEI_orth
  | TEI_pron
  | TEI_hyph
  | TEI_syll
  | TEI_gramGrp
  | TEI_pos
  | TEI_subc
  | TEI_colloc
  | TEI_def
  | TEI_etym
  | TEI_usg
  | TEI_lbl
  | TEI_xr
  | TEI_re
TEI_model.entryPart.top =
  TEI_cit
  | TEI_entry
  | TEI_dictScrap
  | TEI_form
  | TEI_gramGrp
  | TEI_def
  | TEI_etym
  | TEI_usg
  | TEI_lbl
  | TEI_xr
  | TEI_re
TEI_model.eventLike = TEI_event | TEI_listEvent
TEI_model.global.edit = TEI_gap
TEI_model.divPart =
  TEI_model.lLike | TEI_model.pLike | TEI_lg | TEI_sp | TEI_schemaSpec
TEI_model.persStateLike =
  TEI_persName
  | TEI_affiliation
  | TEI_age
  | TEI_education
  | TEI_faith
  | TEI_floruit
  | TEI_langKnowledge
  | TEI_nationality
  | TEI_occupation
  | TEI_persona
  | TEI_persPronouns
  | TEI_residence
  | TEI_sex
  | TEI_socecStatus
  | TEI_state
  | TEI_trait
TEI_model.personLike = TEI_org | TEI_person | TEI_personGrp
TEI_model.personPart =
  TEI_model.biblLike
  | TEI_model.eventLike
  | TEI_model.persStateLike
  | TEI_name
  | TEI_idno
  | TEI_birth
  | TEI_death
TEI_model.placeNamePart =
  TEI_placeName
  | TEI_bloc
  | TEI_country
  | TEI_region
  | TEI_settlement
  | TEI_district
  | TEI_geogName
TEI_model.placeNamePart_alternation =
  TEI_placeName
  | TEI_bloc
  | TEI_country
  | TEI_region
  | TEI_settlement
  | TEI_district
  | TEI_geogName
TEI_model.placeNamePart_sequence =
  TEI_placeName,
  TEI_bloc,
  TEI_country,
  TEI_region,
  TEI_settlement,
  TEI_district,
  TEI_geogName
TEI_model.placeNamePart_sequenceOptional =
  TEI_placeName?,
  TEI_bloc?,
  TEI_country?,
  TEI_region?,
  TEI_settlement?,
  TEI_district?,
  TEI_geogName?
TEI_model.placeNamePart_sequenceOptionalRepeatable =
  TEI_placeName*,
  TEI_bloc*,
  TEI_country*,
  TEI_region*,
  TEI_settlement*,
  TEI_district*,
  TEI_geogName*
TEI_model.placeNamePart_sequenceRepeatable =
  TEI_placeName+,
  TEI_bloc+,
  TEI_country+,
  TEI_region+,
  TEI_settlement+,
  TEI_district+,
  TEI_geogName+
TEI_model.placeStateLike =
  TEI_model.placeNamePart
  | TEI_climate
  | TEI_location
  | TEI_population
  | TEI_state
  | TEI_terrain
  | TEI_trait
TEI_model.placeStateLike_alternation =
  TEI_model.placeNamePart_alternation
  | TEI_climate
  | TEI_location
  | TEI_population
  | TEI_state
  | TEI_terrain
  | TEI_trait
TEI_model.placeStateLike_sequence =
  TEI_model.placeNamePart_sequence,
  TEI_climate,
  TEI_location,
  TEI_population,
  TEI_state,
  TEI_terrain,
  TEI_trait
TEI_model.placeStateLike_sequenceOptional =
  TEI_model.placeNamePart_sequenceOptional?,
  TEI_climate?,
  TEI_location?,
  TEI_population?,
  TEI_state?,
  TEI_terrain?,
  TEI_trait?
TEI_model.placeStateLike_sequenceOptionalRepeatable =
  TEI_model.placeNamePart_sequenceOptionalRepeatable*,
  TEI_climate*,
  TEI_location*,
  TEI_population*,
  TEI_state*,
  TEI_terrain*,
  TEI_trait*
TEI_model.placeStateLike_sequenceRepeatable =
  TEI_model.placeNamePart_sequenceRepeatable+,
  TEI_climate+,
  TEI_location+,
  TEI_population+,
  TEI_state+,
  TEI_terrain+,
  TEI_trait+
TEI_model.orgPart =
  TEI_model.eventLike | TEI_listOrg | TEI_listPerson | TEI_listPlace
TEI_model.publicationStmtPart.agency =
  TEI_publisher | TEI_distributor | TEI_authority
TEI_model.publicationStmtPart.detail =
  TEI_model.ptrLike
  | TEI_address
  | TEI_date
  | TEI_pubPlace
  | TEI_idno
  | TEI_availability
TEI_model.availabilityPart = TEI_licence
TEI_model.certLike = notAllowed
TEI_model.descLike = TEI_desc
TEI_model.glossLike = TEI_gloss | TEI_equiv | TEI_altIdent
TEI_model.quoteLike = TEI_quote | TEI_cit
TEI_model.quoteLike_alternation = TEI_quote | TEI_cit
TEI_model.quoteLike_sequence = TEI_quote, TEI_cit
TEI_model.quoteLike_sequenceOptional = TEI_quote?, TEI_cit?
TEI_model.quoteLike_sequenceOptionalRepeatable = TEI_quote*, TEI_cit*
TEI_model.quoteLike_sequenceRepeatable = TEI_quote+, TEI_cit+
TEI_model.attributable =
  TEI_model.quoteLike | TEI_said | TEI_floatingText
TEI_model.attributable_alternation =
  TEI_model.quoteLike_alternation | TEI_said | TEI_floatingText
TEI_model.attributable_sequence =
  TEI_model.quoteLike_sequence, TEI_said, TEI_floatingText
TEI_model.attributable_sequenceOptional =
  TEI_model.quoteLike_sequenceOptional?, TEI_said?, TEI_floatingText?
TEI_model.attributable_sequenceOptionalRepeatable =
  TEI_model.quoteLike_sequenceOptionalRepeatable*,
  TEI_said*,
  TEI_floatingText*
TEI_model.attributable_sequenceRepeatable =
  TEI_model.quoteLike_sequenceRepeatable+, TEI_said+, TEI_floatingText+
TEI_model.respLike =
  TEI_author
  | TEI_editor
  | TEI_respStmt
  | TEI_meeting
  | TEI_sponsor
  | TEI_funder
  | TEI_principal
TEI_model.divWrapper =
  TEI_meeting
  | TEI_byline
  | TEI_dateline
  | TEI_argument
  | TEI_epigraph
  | TEI_salute
  | TEI_docAuthor
  | TEI_docDate
TEI_model.divTopPart = TEI_model.headLike | TEI_opener | TEI_signed
TEI_model.divTop = TEI_model.divWrapper | TEI_model.divTopPart
TEI_model.frontPart.drama = notAllowed
TEI_model.pLike.front =
  TEI_head
  | TEI_byline
  | TEI_dateline
  | TEI_argument
  | TEI_epigraph
  | TEI_docTitle
  | TEI_titlePart
  | TEI_docAuthor
  | TEI_docEdition
  | TEI_docImprint
  | TEI_docDate
TEI_model.divBottomPart =
  TEI_trailer | TEI_closer | TEI_signed | TEI_postscript
TEI_model.divBottom = TEI_model.divWrapper | TEI_model.divBottomPart
TEI_model.titlepagePart =
  TEI_graphic
  | TEI_binaryObject
  | TEI_byline
  | TEI_argument
  | TEI_epigraph
  | TEI_docTitle
  | TEI_titlePart
  | TEI_docAuthor
  | TEI_imprimatur
  | TEI_docEdition
  | TEI_docImprint
  | TEI_docDate
TEI_model.choicePart =
  TEI_sic
  | TEI_corr
  | TEI_reg
  | TEI_orig
  | TEI_unclear
  | TEI_abbr
  | TEI_expan
  | TEI_seg
TEI_model.imprintPart =
  TEI_publisher | TEI_biblScope | TEI_pubPlace | TEI_distributor
TEI_model.catDescPart = notAllowed
TEI_model.addressLike = TEI_email | TEI_address | TEI_affiliation
TEI_model.addressLike_alternation =
  TEI_email | TEI_address | TEI_affiliation
TEI_model.addressLike_sequence = TEI_email, TEI_address, TEI_affiliation
TEI_model.addressLike_sequenceOptional =
  TEI_email?, TEI_address?, TEI_affiliation?
TEI_model.addressLike_sequenceOptionalRepeatable =
  TEI_email*, TEI_address*, TEI_affiliation*
TEI_model.addressLike_sequenceRepeatable =
  TEI_email+, TEI_address+, TEI_affiliation+
TEI_model.nameLike =
  TEI_model.nameLike.agent
  | TEI_model.offsetLike
  | TEI_model.placeStateLike
  | TEI_rs
  | TEI_idno
  | TEI_model.persNamePart
  | TEI_objectName
  | TEI_lang
TEI_model.nameLike_alternation =
  TEI_model.nameLike.agent_alternation
  | TEI_model.offsetLike_alternation
  | TEI_model.placeStateLike_alternation
  | TEI_rs
  | TEI_idno
  | TEI_model.persNamePart_alternation
  | TEI_objectName
  | TEI_lang
TEI_model.nameLike_sequence =
  TEI_model.nameLike.agent_sequence,
  TEI_model.offsetLike_sequence,
  TEI_model.placeStateLike_sequence,
  TEI_rs,
  TEI_idno,
  TEI_model.persNamePart_sequence,
  TEI_objectName,
  TEI_lang
TEI_model.nameLike_sequenceOptional =
  TEI_model.nameLike.agent_sequenceOptional?,
  TEI_model.offsetLike_sequenceOptional?,
  TEI_model.placeStateLike_sequenceOptional?,
  TEI_rs?,
  TEI_idno?,
  TEI_model.persNamePart_sequenceOptional?,
  TEI_objectName?,
  TEI_lang?
TEI_model.nameLike_sequenceOptionalRepeatable =
  TEI_model.nameLike.agent_sequenceOptionalRepeatable*,
  TEI_model.offsetLike_sequenceOptionalRepeatable*,
  TEI_model.placeStateLike_sequenceOptionalRepeatable*,
  TEI_rs*,
  TEI_idno*,
  TEI_model.persNamePart_sequenceOptionalRepeatable*,
  TEI_objectName*,
  TEI_lang*
TEI_model.nameLike_sequenceRepeatable =
  TEI_model.nameLike.agent_sequenceRepeatable+,
  TEI_model.offsetLike_sequenceRepeatable+,
  TEI_model.placeStateLike_sequenceRepeatable+,
  TEI_rs+,
  TEI_idno+,
  TEI_model.persNamePart_sequenceRepeatable+,
  TEI_objectName+,
  TEI_lang+
TEI_model.global =
  TEI_model.global.meta
  | TEI_model.milestoneLike
  | TEI_model.noteLike
  | TEI_model.global.edit
  | TEI_notatedMusic
  | TEI_figure
TEI_model.biblPart =
  TEI_model.respLike
  | TEI_model.imprintPart
  | TEI_series
  | TEI_citedRange
  | TEI_bibl
  | TEI_relatedItem
  | TEI_textLang
  | TEI_edition
  | TEI_extent
  | TEI_availability
  | TEI_listRelation
  | TEI_objectIdentifier
TEI_model.frontPart =
  TEI_model.frontPart.drama | TEI_listBibl | TEI_divGen | TEI_titlePage
TEI_model.addrPart =
  TEI_model.nameLike
  | TEI_addrLine
  | TEI_street
  | TEI_postCode
  | TEI_postBox
TEI_model.pPart.data =
  TEI_model.dateLike
  | TEI_model.measureLike
  | TEI_model.addressLike
  | TEI_model.nameLike
TEI_model.inter =
  TEI_model.egLike
  | TEI_model.oddDecl
  | TEI_model.biblLike
  | TEI_model.labelLike
  | TEI_model.listLike
  | TEI_model.stageLike
  | TEI_model.attributable
TEI_model.common =
  TEI_model.divPart | TEI_model.inter | TEI_q | TEI_model.entryLike
TEI_model.phrase =
  TEI_model.segLike
  | TEI_model.highlighted
  | TEI_model.graphicLike
  | TEI_model.pPart.msdesc
  | TEI_model.pPart.edit
  | TEI_model.ptrLike
  | TEI_model.lPart
  | TEI_model.phrase.xml
  | TEI_model.specDescLike
  | TEI_model.pPart.data
  | TEI_ruby
  | TEI_model.ptrLike.form
TEI_model.limitedPhrase =
  TEI_model.hiLike
  | TEI_model.emphLike
  | TEI_model.pPart.msdesc
  | TEI_model.pPart.editorial
  | TEI_model.ptrLike
  | TEI_model.phrase.xml
  | TEI_model.pPart.data
TEI_model.divLike = TEI_div
TEI_model.divGenLike = TEI_divGen
TEI_model.div1Like = notAllowed
TEI_model.annotationLike = TEI_note | TEI_annotation
TEI_model.annotationPart.body = TEI_ptr | TEI_ref | TEI_note
TEI_model.applicationLike = TEI_application
TEI_model.teiHeaderPart =
  TEI_encodingDesc | TEI_profileDesc | TEI_xenoData
TEI_model.sourceDescPart = notAllowed
TEI_model.encodingDescPart =
  TEI_schemaRef
  | TEI_projectDesc
  | TEI_samplingDecl
  | TEI_editorialDecl
  | TEI_tagsDecl
  | TEI_styleDefDecl
  | TEI_refsDecl
  | TEI_listPrefixDef
  | TEI_classDecl
  | TEI_geoDecl
  | TEI_unitDecl
  | TEI_appInfo
  | TEI_charDecl
  | TEI_schemaSpec
TEI_model.editorialDeclPart =
  TEI_correction
  | TEI_normalization
  | TEI_quotation
  | TEI_hyphenation
  | TEI_segmentation
  | TEI_stdVals
  | TEI_interpretation
  | TEI_punctuation
TEI_model.profileDescPart =
  TEI_abstract
  | TEI_creation
  | TEI_langUsage
  | TEI_textClass
  | TEI_calendarDesc
  | TEI_correspDesc
TEI_model.standOffPart =
  TEI_model.global.meta
  | TEI_model.biblLike
  | TEI_model.listLike
  | TEI_model.annotationLike
  | TEI_listChange
  | TEI_model.entryLike
  | TEI_seg
  | TEI_listAnnotation
TEI_att.citeStructurePart.attributes =
  TEI_att.citeStructurePart.attribute.use
TEI_att.citeStructurePart.attribute.use =
  [
    a:documentation [
      "(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
      ns2:code [ "@match" ]
      ", which will either be a sibling attribute in the case of  or on the parent  in the case of ."
    ]
  ]
  attribute use { text }
TEI_att.formula.attributes = TEI_att.formula.attribute.formula
TEI_att.formula.attribute.formula =
  [
    a:documentation [
      "A "
      ns2:code [ "@formula" ]
      " is provided to describe a mathematical calculation such as a conversion between measurement systems."
    ]
  ]
  attribute formula { text }?
TEI_model.correspActionPart =
  TEI_model.dateLike
  | TEI_model.addressLike
  | TEI_model.nameLike
  | TEI_note
  | TEI_noteGrp
TEI_model.correspContextPart =
  TEI_model.ptrLike | TEI_model.pLike | TEI_note | TEI_noteGrp
TEI_model.correspDescPart =
  TEI_note | TEI_noteGrp | TEI_correspAction | TEI_correspContext
TEI_att.partials.attributes = TEI_att.partials.attribute.extent
TEI_att.partials.attribute.extent =
  
  ## indicates whether the pronunciation or orthography applies to all or part of a word.
  ## Suggested values include: 1] full (full form); 2] pref (prefix); 3] suff (suffix); 4] inf (infix); 5] part (partial)
  attribute extent {
    
    ## (full form) 
    "full"
    | 
      ## (prefix) 
      "pref"
    | 
      ## (suffix) 
      "suff"
    | 
      ## (infix) 
      "inf"
    | 
      ## (partial) 
      "part"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_model.resource = TEI_text | TEI_standOff
TEI_model.describedResource = TEI_teiCorpus | TEI_TEI
TEI_model.objectLike = TEI_object | TEI_listObject
TEI_att.personal.attributes =
  TEI_att.naming.attributes,
  TEI_att.personal.attribute.full,
  TEI_att.personal.attribute.sort
TEI_att.personal.attribute.full =
  
  ## indicates whether the name component is given in full, as an abbreviation or simply as an initial.
  [ a:defaultValue = "yes" ]
  attribute full {
    
    ## (yes) the name component is spelled out in full.
    "yes"
    | 
      ## (abbreviated) the name component is given in an abbreviated form.
      "abb"
    | 
      ## (initial letter) the name component is indicated only by one initial.
      "init"
  }?
TEI_att.personal.attribute.sort =
  
  ## (sort) specifies the sort order of the name component in relation to others within the name.
  attribute sort { xsd:nonNegativeInteger }?
TEI_model.placeLike = TEI_place
TEI_att.milestoneUnit.attributes = TEI_att.milestoneUnit.attribute.unit
TEI_att.milestoneUnit.attribute.unit =
  
  ## provides a conventional name for the kind of section changing at this milestone.
  ## Suggested values include: 1] page; 2] column; 3] line; 4] book; 5] poem; 6] canto; 7] speaker; 8] stanza; 9] act; 10] scene; 11] section; 12] absent; 13] unnumbered
  attribute unit {
    [
      a:documentation [
        "physical page breaks (synonymous with the "
        ns2:code [ "<pb>" ]
        " element)."
      ]
    ]
    "page"
    | 
      ## column breaks.
      "column"
    | [
        a:documentation [
          "line breaks (synonymous with the "
          ns2:code [ "<lb>" ]
          " element)."
        ]
      ]
      "line"
    | 
      ## any units termed book, liber, etc.
      "book"
    | 
      ## individual poems in a collection.
      "poem"
    | 
      ## cantos or other major sections of a poem.
      "canto"
    | 
      ## changes of speaker or narrator.
      "speaker"
    | 
      ## stanzas within a poem, book, or canto.
      "stanza"
    | 
      ## acts within a play.
      "act"
    | 
      ## scenes within a play or act.
      "scene"
    | 
      ## sections of any kind.
      "section"
    | 
      ## passages not present in the reference edition.
      "absent"
    | 
      ## passages present in the text, but not to be included as part of the reference.
      "unnumbered"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }
TEI_p =
  
  ## (paragraph) marks paragraphs in prose. [3.1. Paragraphs 7.2.5. Speech Contents]
  element tei:p {
    TEI_macro.paraContent
    >> sch:pattern [
         id = "p5odds-p-abstractModel-structure-p-constraint-report-5"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:p"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "not(ancestor::tei:floatingText) and (ancestor::tei:p or ancestor::tei:ab)          and not(parent::tei:exemplum                |parent::tei:item                |parent::tei:note                |parent::tei:q                |parent::tei:quote                |parent::tei:remarks                |parent::tei:said                |parent::tei:sp                |parent::tei:stage                |parent::tei:cell                |parent::tei:figure                )"
             "\x{a}" ~
             "        Abstract model violation: Paragraphs may not occur inside other paragraphs or ab elements.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-p-abstractModel-structure-l-constraint-report-6"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:p"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "ancestor::tei:l[not(.//tei:note//tei:p[. = current()])]"
             "\x{a}" ~
             "        Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.fragmentable.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_foreign =
  
  ## (foreign) identifies a word or phrase as belonging to some language other than that of the surrounding text. [3.3.2.1. Foreign Words or Expressions]
  element tei:foreign {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_emph =
  
  ## (emphasized) marks words or phrases which are stressed or emphasized for linguistic or rhetorical effect. [3.3.2.2. Emphatic Words and Phrases 3.3.2. Emphasis, Foreign Words, and Unusual Language]
  element tei:emph {
    TEI_macro.paraContent, TEI_att.global.attributes, empty
  }
TEI_hi =
  
  ## (highlighted) marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made. [3.3.2.2. Emphatic Words and Phrases 3.3.2. Emphasis, Foreign Words, and Unusual Language]
  element tei:hi {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_distinct =
  
  ## identifies any word or phrase which is regarded as linguistically distinct, for example as archaic, technical, dialectal, non-preferred, etc., or as forming part of a sublanguage. [3.3.2.3. Other Linguistically Distinct Material]
  element tei:distinct {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## specifies the sublanguage or register to which the word or phrase is being assigned
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## specifies how the phrase is distinct diachronically
    attribute time { xsd:string }?,
    
    ## specifies how the phrase is distinct diatopically
    attribute space { xsd:string }?,
    
    ## specifies how the phrase is distinct diastratically
    attribute social { xsd:string }?,
    empty
  }
TEI_said =
  
  ## (speech or thought) indicates passages thought or spoken aloud, whether explicitly indicated in the source or not, whether directly or indirectly reported, whether by real people or fictional characters. [3.3.3. Quotation]
  element tei:said {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.ascribed.directed.attributes,
    
    ## may be used to indicate whether the quoted matter is regarded as having been vocalized or signed.
    attribute aloud {
      xsd:boolean
      | (
         ##
         "unknown"
         | 
           ##
           "inapplicable")
    }?,
    
    ## may be used to indicate whether the quoted matter is regarded as direct or indirect speech.
    [ a:defaultValue = "true" ]
    attribute direct {
      xsd:boolean
      | (
         ##
         "unknown"
         | 
           ##
           "inapplicable")
    }?,
    empty
  }
TEI_quote =
  
  ## (quotation) contains a phrase or passage attributed by the narrator or author to some agency external to the text. [3.3.3. Quotation 4.3.1. Grouped Texts]
  element tei:quote {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_q =
  
  ## (quoted) contains material which is distinguished from the surrounding text using quotation marks or a similar method, for any one of a variety of reasons including, but not limited to: direct speech or thought, technical terms or jargon, authorial distance, quotations from elsewhere, and passages that are mentioned but not used. [3.3.3. Quotation]
  element tei:q {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.ascribed.directed.attributes,
    
    ## (type) may be used to indicate whether the offset passage is spoken or thought, or to characterize it more finely.
    ## Suggested values include: 1] spoken (spoken); 2] thought (thought); 3] written (written); 4] soCalled (so called); 5] foreign (foreign); 6] distinct (distinct); 7] term; 8] emph (emph); 9] mentioned (mentioned)
    attribute type {
      
      ## (spoken) representation of speech
      "spoken"
      | 
        ## (thought) representation of thought, e.g. internal monologue
        "thought"
      | 
        ## (written) quotation from a written source
        "written"
      | 
        ## (so called) authorial distance
        "soCalled"
      | 
        ## (foreign) 
        "foreign"
      | 
        ## (distinct) linguistically distinct
        "distinct"
      | 
        ## technical term
        "term"
      | 
        ## (emph) rhetorically emphasized
        "emph"
      | 
        ## (mentioned) refering to itself, not its normal referent
        "mentioned"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_cit =
  
  ## (cited quotation) contains a quotation from some other document, together with a bibliographic reference to its source. In a dictionary it may contain an example text with at least one occurrence of the word form, used in the sense being described, or a translation of the headword, or an example. [3.3.3. Quotation 4.3.1. Grouped Texts 9.3.5.1. Examples]
  element tei:cit {
    (TEI_model.biblLike
     | TEI_model.egLike
     | TEI_model.entryPart
     | TEI_model.global
     | TEI_model.graphicLike
     | TEI_model.ptrLike
     | TEI_model.attributable
     | TEI_q)+,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_mentioned =
  
  ## marks words or phrases mentioned, not used. [3.3.3. Quotation]
  element tei:mentioned {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_soCalled =
  
  ## (so called) contains a word or phrase for which the author or narrator indicates a disclaiming of responsibility, for example by the use of scare quotes or italics. [3.3.3. Quotation]
  element tei:soCalled {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_desc =
  
  ## (description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity. [22.4.1. Description of Components]
  element tei:desc {
    TEI_macro.limitedContent
    >> sch:pattern [
         id =
           "p5odds-desc-deprecationInfo-only-in-deprecated-constraint-rule-11"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:desc[ @type eq 'deprecationInfo']"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "../@validUntil"
             "Information about a\x{a}" ~
             "        deprecation should only be present in a specification element\x{a}" ~
             "        that is being deprecated: that is, only an element that has a\x{a}" ~
             "        @validUntil attribute should have a child <desc\x{a}" ~
             '        type="deprecationInfo">.'
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.translatable.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_gloss =
  
  ## (gloss) identifies a phrase or word used to provide a gloss or definition for some other word or phrase. [3.4.1. Terms and Glosses 22.4.1. Description of Components]
  element tei:gloss {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.translatable.attributes,
    TEI_att.typed.attributes,
    TEI_att.pointing.attributes,
    TEI_att.cReferencing.attributes,
    empty
  }
TEI_term =
  
  ## (term) contains a single-word, multi-word, or symbolic designation which is regarded as a technical term. [3.4.1. Terms and Glosses]
  element tei:term {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    TEI_att.canonical.attributes,
    TEI_att.sortable.attributes,
    TEI_att.cReferencing.attributes,
    empty
  }
TEI_ruby =
  
  ## (ruby container) contains a passage of base text along with its associated ruby gloss(es). [3.4.2. Ruby Annotations]
  element tei:ruby {
    (TEI_rb, TEI_rt+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_rb =
  
  ## (ruby base) contains the base text annotated by a ruby gloss. [3.4.2. Ruby Annotations]
  element tei:rb {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_rt =
  
  ## (ruby text) contains a ruby text, an annotation closely associated with a passage of the main text. [3.4.2. Ruby Annotations]
  element tei:rt {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.placement.attributes,
    TEI_att.transcriptional.attributes,
    (
     ## supplies a pointer to the base being glossed by this ruby text.
     attribute target { xsd:anyURI }?)
    >> sch:pattern [
         id = "p5odds-rt-target-rt-target-not-span-constraint-report-7"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:rt/@target"
           "\x{a}" ~
           "               "
           sch:report [
             test = "../@from | ../@to"
             "When target= is\x{a}" ~
             "            present, neither from= nor to= should be."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    (
     ## points to the starting point of the span of text being glossed by this ruby text.
     attribute from { xsd:anyURI }?)
    >> sch:pattern [
         id = "p5odds-rt-from-rt-from-constraint-assert-8"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:rt/@from"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "../@to"
             "When from= is present, the to=\x{a}" ~
             "            attribute of "
             sch:name [ ]
             " is required."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    (
     ## points to the ending point of the span of text being glossed.
     attribute to { xsd:anyURI }?)
    >> sch:pattern [
         id = "p5odds-rt-to-rt-to-constraint-assert-9"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:rt/@to"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "../@from"
             "When to= is present, the from=\x{a}" ~
             "            attribute of "
             sch:name [ ]
             " is required."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    empty
  }
TEI_sic =
  
  ## (Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate. [3.5.1. Apparent Errors]
  element tei:sic {
    TEI_macro.paraContent, TEI_att.global.attributes, empty
  }
TEI_corr =
  
  ## (correction) contains the correct form of a passage apparently erroneous in the copy text. [3.5.1. Apparent Errors]
  element tei:corr {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_choice =
  
  ## (choice) groups a number of alternative encodings for the same point in a text. [3.5. Simple Editorial Changes]
  element tei:choice {
    (TEI_model.choicePart | TEI_choice)+,
    TEI_att.global.attributes,
    empty
  }
TEI_reg =
  
  ## (regularization) contains a reading which has been regularized or normalized in some sense. [3.5.2. Regularization and
  ## Normalization 12. Critical Apparatus]
  element tei:reg {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_orig =
  
  ## (original form) contains a reading which is marked as following the original, rather than being normalized or corrected. [3.5.2. Regularization and
  ## Normalization 12. Critical Apparatus]
  element tei:orig {
    TEI_macro.paraContent, TEI_att.global.attributes, empty
  }
TEI_gap =
  
  ## (gap) indicates a point where material has been omitted in a transcription, whether for editorial reasons described in the TEI header, as part of sampling practice, or because the material is illegible, invisible, or inaudible. [3.5.3. Additions, Deletions, and Omissions]
  element tei:gap {
    (TEI_model.descLike | TEI_model.certLike)*,
    TEI_att.global.attributes,
    TEI_att.timed.attributes,
    TEI_att.editLike.attributes,
    TEI_att.dimensions.attributes,
    
    ## (reason) gives the reason for omission
    ## Suggested values include: 1] cancelled (cancelled); 2] deleted (deleted); 3] editorial (editorial); 4] illegible (illegible); 5] inaudible (inaudible); 6] irrelevant (irrelevant); 7] sampling (sampling)
    attribute reason {
      list {
        (
         ## (cancelled) 
         "cancelled"
         | 
           ## (deleted) 
           "deleted"
         | 
           ## (editorial) for features omitted from transcription due to editorial policy
           "editorial"
         | 
           ## (illegible) 
           "illegible"
         | 
           ## (inaudible) 
           "inaudible"
         | 
           ## (irrelevant) 
           "irrelevant"
         | 
           ## (sampling) 
           "sampling"
         | xsd:token { pattern = "[^\p{C}\p{Z}]+" })+
      }
    }?,
    
    ## (agent) in the case of text omitted because of damage, categorizes the cause of the damage, if it can be identified.
    ## Sample values include: 1] rubbing (rubbing); 2] mildew (mildew); 3] smoke (smoke)
    attribute agent {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_add =
  
  ## (addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector. [3.5.3. Additions, Deletions, and Omissions]
  element tei:add {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.transcriptional.attributes,
    TEI_att.placement.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_del =
  
  ## (deletion) contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector. [3.5.3. Additions, Deletions, and Omissions]
  element tei:del {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.transcriptional.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_unclear =
  
  ## (unclear) contains a word, phrase, or passage which cannot be transcribed with certainty because it is illegible or inaudible in the source. [11.3.3.1. Damage, Illegibility, and Supplied Text 3.5.3. Additions, Deletions, and Omissions]
  element tei:unclear {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.dimensions.attributes,
    
    ## indicates why the material is hard to transcribe.
    ## Suggested values include: 1] illegible (illegible); 2] inaudible (inaudible); 3] faded (faded); 4] background_noise (background_noise); 5] eccentric_ductus (eccentric_ductus)
    attribute reason {
      list {
        (
         ## (illegible) 
         "illegible"
         | 
           ## (inaudible) 
           "inaudible"
         | 
           ## (faded) 
           "faded"
         | 
           ## (background_noise) 
           "background_noise"
         | 
           ## (eccentric_ductus) indicates illegibility due to an unusual, awkward, or incompetent execution of a glyph or glyphs 
           "eccentric_ductus"
         | xsd:token { pattern = "[^\p{C}\p{Z}]+" })+
      }
    }?,
    
    ## Where the difficulty in transcription arises from damage, categorizes the cause of the damage, if it can be identified.
    ## Sample values include: 1] rubbing; 2] mildew; 3] smoke
    attribute agent {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_name =
  
  ## (name, proper noun) contains a proper noun or noun phrase. [3.6.1. Referring Strings]
  element tei:name {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_rs =
  
  ## (referencing string) contains a general purpose name or referring string. [13.2.1. Personal Names 3.6.1. Referring Strings]
  element tei:rs {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_email =
  
  ## (electronic mail address) contains an email address identifying a location to which email messages can be delivered. [3.6.2. Addresses]
  element tei:email {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_address =
  
  ## (address) contains a postal address, for example of a publisher, an organization, or an individual. [3.6.2. Addresses 2.2.4. Publication, Distribution, Licensing, etc. 3.12.2.4. Imprint, Size of a Document, and Reprint Information]
  element tei:address {
    (TEI_model.global*, (TEI_model.addrPart, TEI_model.global*)+),
    TEI_att.global.attributes,
    empty
  }
TEI_addrLine =
  
  ## (address line) contains one line of a postal address. [3.6.2. Addresses 2.2.4. Publication, Distribution, Licensing, etc. 3.12.2.4. Imprint, Size of a Document, and Reprint Information]
  element tei:addrLine {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_street =
  
  ## contains a full street address including any name or number identifying a building as well as the name of the street or route on which it is located. [3.6.2. Addresses]
  element tei:street {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_postCode =
  
  ## (postal code) contains a numerical or alphanumeric code used as part of a postal address to simplify sorting or delivery of mail. [3.6.2. Addresses]
  element tei:postCode { text, TEI_att.global.attributes, empty }
TEI_postBox =
  
  ## (postal box or post office box) contains a number or other identifier for some postal delivery point other than a street address. [3.6.2. Addresses]
  element tei:postBox { text, TEI_att.global.attributes, empty }
TEI_num =
  
  ## (number) contains a number, written in any form. [3.6.3. Numbers and
  ## Measures]
  element tei:num {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.ranging.attributes,
    
    ## indicates the type of numeric value.
    ## Suggested values include: 1] cardinal; 2] ordinal; 3] fraction; 4] percentage
    attribute type {
      
      ## absolute number, e.g. 21, 21.5
      "cardinal"
      | 
        ## ordinal number, e.g. 21st
        "ordinal"
      | 
        ## fraction, e.g. one half or three-quarters
        "fraction"
      | 
        ## a percentage
        "percentage"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies the value of the number in standard form.
    attribute value {
      xsd:double
      | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
      | xsd:decimal
    }?,
    empty
  }
TEI_measure =
  
  ## (measure) contains a word or phrase referring to some quantity of an object or commodity, usually comprising a number, a unit, and a commodity name. [3.6.3. Numbers and
  ## Measures]
  element tei:measure {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.measurement.attributes,
    
    ## specifies the type of measurement in any convenient typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_measureGrp =
  
  ## (measure group) contains a group of dimensional specifications which relate to the same object, for example the height and width of a manuscript page. [10.3.4. Dimensions]
  element tei:measureGrp {
    (text | TEI_model.gLike | TEI_model.measureLike)*,
    TEI_att.global.attributes,
    TEI_att.measurement.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_unit =
  
  ## contains a symbol, a word or a phrase referring to a unit of measurement in any kind of formal or informal system. [3.6.3. Numbers and
  ## Measures]
  element tei:unit {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.measurement.attributes,
    empty
  }
TEI_date =
  
  ## (date) contains a date in any format. [3.6.4. Dates and Times 2.2.4. Publication, Distribution, Licensing, etc. 2.6. The Revision Description 3.12.2.4. Imprint, Size of a Document, and Reprint Information 15.2.3. The Setting Description 13.4. Dates]
  element tei:date {
    (text | TEI_model.gLike | TEI_model.phrase | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.dimensions.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_time =
  
  ## (time) contains a phrase defining a time of day in any format. [3.6.4. Dates and Times]
  element tei:time {
    (text | TEI_model.gLike | TEI_model.phrase | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.canonical.attributes,
    TEI_att.editLike.attributes,
    TEI_att.dimensions.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_abbr =
  
  ## (abbreviation) contains an abbreviation of any sort. [3.6.5. Abbreviations and Their Expansions]
  element tei:abbr {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## (type) allows the encoder to classify the abbreviation according to some convenient typology.
    ## Sample values include: 1] suspension (suspension); 2] contraction (contraction); 3] brevigraph; 4] superscription (superscription); 5] acronym (acronym); 6] title (title); 7] organization (organization); 8] geographic (geographic)
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_expan =
  
  ## (expansion) contains the expansion of an abbreviation. [3.6.5. Abbreviations and Their Expansions]
  element tei:expan {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    empty
  }
TEI_ptr =
  
  ## (pointer) defines a pointer to another location. [3.7. Simple Links and Cross-References 16.1. Links]
  element tei:ptr {
    empty
    >> sch:pattern [
         id = "p5odds-ptr-ptrAtts-constraint-report-8"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:ptr"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@target and @cRef"
             "Only one of the\x{a}" ~
             "attributes @target and @cRef may be supplied on "
             sch:name [ ]
             "."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.cReferencing.attributes,
    TEI_att.declaring.attributes,
    TEI_att.global.attributes,
    TEI_att.internetMedia.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_ref =
  
  ## (reference) defines a reference to another location, possibly modified by additional text or comment. [3.7. Simple Links and Cross-References 16.1. Links]
  element tei:ref {
    TEI_macro.paraContent
    >> sch:pattern [
         id = "p5odds-ref-refAtts-constraint-report-9"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:ref"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@target and @cRef"
             "Only one of the\x{a}" ~
             "	attributes @target' and @cRef' may be supplied on "
             sch:name [ ]
             "\x{a}" ~
             "               "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.cReferencing.attributes,
    TEI_att.declaring.attributes,
    TEI_att.global.attributes,
    TEI_att.internetMedia.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_list =
  
  ## (list) contains any sequence of items organized as a list. [3.8. Lists]
  element tei:list {
    ((TEI_model.divTop | TEI_model.global | TEI_desc*)*,
     ((TEI_item, TEI_model.global*)+
      | (TEI_headLabel?,
         TEI_headItem?,
         (TEI_label, TEI_model.global*, TEI_item, TEI_model.global*)+)),
     (TEI_model.divBottom, TEI_model.global*)*)
    >> sch:pattern [
         id =
           "p5odds-list-gloss-list-must-have-labels-constraint-rule-12"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:list[@type='gloss']"
           "\x{a}" ~
           "	              "
           sch:assert [
             test = "tei:label"
             'The content of a "gloss" list should include a sequence of one or more pairs of a label element followed by an item element'
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attribute.xmlid,
    TEI_att.global.attribute.n,
    TEI_att.global.attribute.xmllang,
    TEI_att.global.attribute.xmlbase,
    TEI_att.global.attribute.xmlspace,
    TEI_att.global.rendition.attribute.style,
    TEI_att.global.rendition.attribute.rendition,
    TEI_att.global.linking.attribute.corresp,
    TEI_att.global.linking.attribute.synch,
    TEI_att.global.linking.attribute.sameAs,
    TEI_att.global.linking.attribute.copyOf,
    TEI_att.global.linking.attribute.next,
    TEI_att.global.linking.attribute.prev,
    TEI_att.global.linking.attribute.exclude,
    TEI_att.global.linking.attribute.select,
    TEI_att.global.responsibility.attribute.cert,
    TEI_att.global.responsibility.attribute.resp,
    TEI_att.global.source.attribute.source,
    TEI_att.sortable.attributes,
    TEI_att.typed.attribute.subtype,
    
    ##
    attribute rend {
      
      ## (Specification list) 
      "specList"
      | 
        ## (Numbered list) 
        "numbered"
      | 
        ## (Numbered list) 
        "ordered"
      | 
        ## (Plain list) 
        "simple"
      | 
        ## (Glossary list) 
        "gloss"
      | 
        ## (Inline list) 
        "inline"
      | 
        ## (Bulleted list) 
        "bulleted"
    }?,
    
    ##
    attribute type {
      
      ## (Numbered list) 
      "ordered"
      | 
        ## (Plain list) 
        "simple"
      | 
        ## (Glossary list) 
        "gloss"
      | 
        ## (Inline list) 
        "inline"
    }?,
    empty
  }
TEI_item =
  
  ## (item) contains one component of a list. [3.8. Lists 2.6. The Revision Description]
  element tei:item {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_label =
  
  ## (label) contains any label or heading used to identify part of a text, typically but not exclusively in a list or glossary. [3.8. Lists]
  element tei:label {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.placement.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_head =
  
  ## (heading) contains any type of heading, for example the title of a section, or the heading of a list, glossary, manuscript description, etc. [4.2.1. Headings and Trailers]
  element tei:head {
    (text
     | TEI_lg
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.lLike
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.placement.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_headLabel =
  
  ## (heading for list labels) contains the heading for the label or term column in a glossary list or similar structured list. [3.8. Lists]
  element tei:headLabel {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_headItem =
  
  ## (heading for list items) contains the heading for the item or gloss column in a glossary list or similar structured list. [3.8. Lists]
  element tei:headItem {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_note =
  
  ## (note) contains a note or annotation. [3.9.1. Notes and Simple Annotation 2.2.6. The Notes Statement 3.12.2.8. Notes and Statement of Language 9.3.5.4. Notes within Entries]
  element tei:note {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.placement.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    TEI_att.written.attributes,
    TEI_att.anchoring.attributes,
    empty
  }
TEI_noteGrp =
  
  ## contains a group of notes [3.9.1.1. Encoding Grouped Notes]
  element tei:noteGrp {
    (TEI_desc*, (TEI_note | TEI_noteGrp)+),
    TEI_att.global.attributes,
    TEI_att.placement.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    TEI_att.written.attributes,
    TEI_att.anchoring.attributes,
    empty
  }
TEI_index =
  
  ## (index entry) marks a location to be indexed for whatever purpose. [3.9.2. Index Entries]
  element tei:index {
    (TEI_term, TEI_index?)*,
    TEI_att.global.attributes,
    TEI_att.spanning.attributes,
    
    ## a single word which follows the rules defining a legal XML name (see ), supplying a name to specify which index (of several) the index entry belongs to.
    attribute indexName { xsd:Name }?,
    empty
  }
TEI_media =
  
  ## indicates the location of any form of external media such as an audio or video clip etc. [3.10. Graphics and Other Non-textual Components]
  element tei:media {
    TEI_model.descLike*,
    TEI_att.typed.attributes,
    TEI_att.global.attributes,
    TEI_att.media.attribute.width,
    TEI_att.media.attribute.height,
    TEI_att.media.attribute.scale,
    TEI_att.resourced.attributes,
    TEI_att.declaring.attributes,
    TEI_att.timed.attributes,
    
    ## (MIME media type) specifies the applicable multimedia internet mail extension (MIME) media type
    attribute mimeType {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    },
    empty
  }
TEI_graphic =
  
  ## (graphic) indicates the location of a graphic or illustration, either forming part of a text, or providing an image of it. [3.10. Graphics and Other Non-textual Components 11.1. Digital Facsimiles]
  element tei:graphic {
    TEI_model.descLike*,
    TEI_att.global.attributes,
    TEI_att.media.attributes,
    TEI_att.resourced.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_binaryObject =
  
  ## provides encoded binary data representing an inline graphic, audio, video or other object. [3.10. Graphics and Other Non-textual Components]
  element tei:binaryObject {
    text,
    TEI_att.global.attributes,
    TEI_att.media.attributes,
    TEI_att.timed.attributes,
    TEI_att.typed.attributes,
    [
      a:documentation [
        "The encoding used to encode the binary data. If not specified, this is assumed to be "
        ns2:a [ href = "http://en.wikipedia.org/wiki/Base64" "Base64" ]
        "."
      ]
    ]
    attribute encoding {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    empty
  }
TEI_milestone =
  
  ## (milestone) marks a boundary point separating any kind of section of a text, typically but not necessarily indicating a point at which some part of a standard reference system changes, where the change is not represented by a structural element. [3.11.3. Milestone
  ## Elements]
  element tei:milestone {
    empty,
    TEI_att.global.attributes,
    TEI_att.milestoneUnit.attributes,
    TEI_att.typed.attributes,
    TEI_att.edition.attributes,
    TEI_att.spanning.attributes,
    TEI_att.breaking.attributes,
    empty
  }
TEI_gb =
  
  ## (gathering beginning) marks the beginning of a new gathering or quire in a transcribed codex. [3.11.3. Milestone
  ## Elements]
  element tei:gb {
    empty,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.spanning.attributes,
    TEI_att.breaking.attributes,
    TEI_att.edition.attributes,
    empty
  }
TEI_pb =
  
  ## (page beginning) marks the beginning of a new page in a paginated document. [3.11.3. Milestone
  ## Elements]
  element tei:pb {
    empty,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.edition.attributes,
    TEI_att.spanning.attributes,
    TEI_att.breaking.attributes,
    empty
  }
TEI_lb =
  
  ## (line beginning) marks the beginning of a new (typographic) line in some edition or version of a text. [3.11.3. Milestone
  ## Elements 7.2.5. Speech Contents]
  element tei:lb {
    empty,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.edition.attributes,
    TEI_att.spanning.attributes,
    TEI_att.breaking.attributes,
    empty
  }
TEI_cb =
  
  ## (column beginning) marks the beginning of a new column of a text on a multi-column page. [3.11.3. Milestone
  ## Elements]
  element tei:cb {
    empty,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.edition.attributes,
    TEI_att.spanning.attributes,
    TEI_att.breaking.attributes,
    empty
  }
TEI_analytic =
  
  ## (analytic level) contains bibliographic elements describing an item (e.g. an article or poem) published within a monograph or journal and not as an independent publication. [3.12.2.1. Analytic, Monographic, and Series Levels]
  element tei:analytic {
    (TEI_author
     | TEI_editor
     | TEI_respStmt
     | TEI_title
     | TEI_model.ptrLike
     | TEI_date
     | TEI_textLang
     | TEI_idno
     | TEI_availability)*,
    TEI_att.global.attributes,
    empty
  }
TEI_monogr =
  
  ## (monographic level) contains bibliographic elements describing an item (e.g. a book or journal) published as an independent item (i.e. as a separate physical object). [3.12.2.1. Analytic, Monographic, and Series Levels]
  element tei:monogr {
    ((((TEI_author | TEI_editor | TEI_meeting | TEI_respStmt),
       (TEI_author | TEI_editor | TEI_meeting | TEI_respStmt)*,
       TEI_title+,
       (TEI_model.ptrLike
        | TEI_idno
        | TEI_textLang
        | TEI_editor
        | TEI_respStmt)*)
      | ((TEI_title | TEI_model.ptrLike | TEI_idno)+,
         (TEI_textLang
          | TEI_author
          | TEI_editor
          | TEI_meeting
          | TEI_respStmt)*)
      | (TEI_authority, TEI_idno))?,
     TEI_availability*,
     TEI_model.noteLike*,
     (TEI_edition,
      (TEI_idno
       | TEI_model.ptrLike
       | TEI_editor
       | TEI_sponsor
       | TEI_funder
       | TEI_respStmt)*)*,
     TEI_imprint,
     (TEI_imprint | TEI_extent | TEI_biblScope)*),
    TEI_att.global.attributes,
    empty
  }
TEI_series =
  
  ## (series information) contains information about the series in which a book or other bibliographic item has appeared. [3.12.2.1. Analytic, Monographic, and Series Levels]
  element tei:series {
    (text
     | TEI_model.gLike
     | TEI_title
     | TEI_model.ptrLike
     | TEI_editor
     | TEI_respStmt
     | TEI_biblScope
     | TEI_idno
     | TEI_textLang
     | TEI_model.global
     | TEI_availability)*,
    TEI_att.global.attributes,
    empty
  }
TEI_author =
  
  ## (author) in a bibliographic reference, contains the name(s) of an author, personal or corporate, of a work; for example in the same form as that provided by a recognized bibliographic name authority. [3.12.2.2. Titles, Authors, and Editors 2.2.1. The Title Statement]
  element tei:author {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_editor =
  
  ## contains a secondary statement of responsibility for a bibliographic item, for example the name of an individual, institution or organization, (or of several such) acting as editor, compiler, translator, etc. [3.12.2.2. Titles, Authors, and Editors]
  element tei:editor {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_respStmt =
  
  ## (statement of responsibility) supplies a statement of responsibility for the intellectual content of a text, edition, recording, or series, where the specialized elements for authors, editors, etc. do not suffice or do not apply. May also be used to encode information about individuals or organizations which have played a role in the production or distribution of a bibliographic work. [3.12.2.2. Titles, Authors, and Editors 2.2.1. The Title Statement 2.2.2. The Edition Statement 2.2.5. The Series Statement]
  element tei:respStmt {
    (((TEI_resp+, TEI_model.nameLike.agent+)
      | (TEI_model.nameLike.agent+, TEI_resp+)),
     TEI_note*),
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_resp =
  
  ## (responsibility) contains a phrase describing the nature of a person's intellectual responsibility, or an organization's role in the production or distribution of a work. [3.12.2.2. Titles, Authors, and Editors 2.2.1. The Title Statement 2.2.2. The Edition Statement 2.2.5. The Series Statement]
  element tei:resp {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_title =
  
  ## (title) contains a title for any kind of work. [3.12.2.2. Titles, Authors, and Editors 2.2.1. The Title Statement 2.2.5. The Series Statement]
  element tei:title {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    
    ## classifies the title according to some convenient typology.
    ## Sample values include: 1] main; 2] sub (subordinate); 3] alt (alternate); 4] short; 5] desc (descriptive)
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## indicates the bibliographic level for a title, that is, whether it identifies an article, book, journal, series, or unpublished material.
    attribute level {
      
      ## (analytic) the title applies to an analytic item, such as an article, poem, or other work published as part of a larger item.
      "a"
      | 
        ## (monographic) the title applies to a monograph such as a book or other item considered to be a distinct publication, including single volumes of multi-volume works
        "m"
      | 
        ## (journal) the title applies to any serial or periodical publication such as a journal, magazine, or newspaper
        "j"
      | 
        ## (series) the title applies to a series of otherwise distinct publications such as a collection
        "s"
      | 
        ## (unpublished) the title applies to any unpublished material (including theses and dissertations unless published by a commercial press)
        "u"
    }?,
    empty
  }
TEI_meeting =
  
  ## contains the formalized descriptive title for a meeting or conference, for use in a bibliographic description for an item derived from such a meeting, or as a heading or preamble to publications emanating from it. [3.12.2.2. Titles, Authors, and Editors]
  element tei:meeting {
    TEI_macro.limitedContent,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_imprint =
  
  ## groups information relating to the publication or distribution of a bibliographic item. [3.12.2.4. Imprint, Size of a Document, and Reprint Information]
  element tei:imprint {
    ((TEI_classCode | TEI_catRef)*,
     ((TEI_model.imprintPart | TEI_model.dateLike),
      TEI_respStmt*,
      TEI_model.global*)+),
    TEI_att.global.attributes,
    empty
  }
TEI_publisher =
  
  ## (publisher) provides the name of the organization responsible for the publication or distribution of a bibliographic item. [3.12.2.4. Imprint, Size of a Document, and Reprint Information 2.2.4. Publication, Distribution, Licensing, etc.]
  element tei:publisher {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_biblScope =
  
  ## (scope of bibliographic reference) defines the scope of a bibliographic reference, for example as a list of page numbers, or a named subdivision of a larger work. [3.12.2.5. Scopes and Ranges in Bibliographic Citations]
  element tei:biblScope {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.citing.attributes,
    
    ##
    attribute type {
      
      ## (Chapter) 
      "chap"
      | 
        ## (Issue) 
        "issue"
      | 
        ## (Note) 
        "note"
      | 
        ## (Part) 
        "part"
      | 
        ## (Pages) 
        "pp"
      | 
        ## (Volume) 
        "vol"
    }?,
    empty
  }
TEI_citedRange =
  
  ## (cited range) defines the range of cited content, often represented by pages or other units [3.12.2.5. Scopes and Ranges in Bibliographic Citations]
  element tei:citedRange {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    TEI_att.citing.attributes,
    empty
  }
TEI_pubPlace =
  
  ## (publication place) contains the name of the place where a bibliographic item was published. [3.12.2.4. Imprint, Size of a Document, and Reprint Information]
  element tei:pubPlace {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    empty
  }
TEI_bibl =
  
  ## (bibliographic citation) contains a loosely-structured bibliographic citation of which the sub-components may or may not be explicitly tagged. [3.12.1. Methods of Encoding Bibliographic References and Lists of References 2.2.7. The Source Description 15.3.2. Declarable Elements]
  element tei:bibl {
    (text
     | TEI_model.gLike
     | TEI_model.highlighted
     | TEI_model.pPart.data
     | TEI_model.pPart.edit
     | TEI_model.segLike
     | TEI_model.ptrLike
     | TEI_model.biblPart
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    TEI_att.typed.attributes,
    TEI_att.sortable.attributes,
    TEI_att.docStatus.attributes,
    empty
  }
TEI_biblStruct =
  
  ## (structured bibliographic citation) contains a structured bibliographic citation, in which only bibliographic sub-elements appear and in a specified order. [3.12.1. Methods of Encoding Bibliographic References and Lists of References 2.2.7. The Source Description 15.3.2. Declarable Elements]
  element tei:biblStruct {
    (TEI_analytic*,
     (TEI_monogr, TEI_series*)+,
     (TEI_model.noteLike
      | TEI_model.ptrLike
      | TEI_relatedItem
      | TEI_citedRange)*),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    TEI_att.typed.attributes,
    TEI_att.sortable.attributes,
    TEI_att.docStatus.attributes,
    empty
  }
TEI_listBibl =
  
  ## (citation list) contains a list of bibliographic citations of any kind. [3.12.1. Methods of Encoding Bibliographic References and Lists of References 2.2.7. The Source Description 15.3.2. Declarable Elements]
  element tei:listBibl {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_model.milestoneLike | TEI_relation | TEI_listRelation)*,
     (TEI_model.biblLike+,
      (TEI_model.milestoneLike | TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    TEI_att.declarable.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_relatedItem =
  
  ## contains or references some other bibliographic item which is related to the present one in some specified manner, for example as a constituent or alternative version of it. [3.12.2.7. Related Items]
  element tei:relatedItem {
    ((TEI_model.biblLike | TEI_model.ptrLike)?)
    >> sch:pattern [
         id = "p5odds-relatedItem-targetorcontent1-constraint-report-10"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:relatedItem"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@target and count( child::* ) > 0"
             "\x{a}" ~
             "If the @target attribute on "
             sch:name [ ]
             " is used, the\x{a}" ~
             "relatedItem element must be empty"
           ]
           "\x{a}" ~
           "               "
           sch:assert [
             test = "@target or child::*"
             "A relatedItem element should have either a 'target' attribute\x{a}" ~
             "        or a child element to indicate the related bibliographic item"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## points to the related bibliographic element by means of an absolute or relative URI reference
    attribute target { xsd:anyURI }?,
    empty
  }
TEI_l =
  
  ## (verse line) contains a single, possibly incomplete, line of verse. [3.13.1. Core Tags for Verse 3.13. Passages of Verse or Drama 7.2.5. Speech Contents]
  element tei:l {
    ((text
      | TEI_model.gLike
      | TEI_model.phrase
      | TEI_model.inter
      | TEI_model.global)*)
    >> sch:pattern [
         id = "p5odds-l-abstractModel-structure-l-constraint-report-11"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:l"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "ancestor::tei:l[not(.//tei:note//tei:l[. = current()])]"
             "\x{a}" ~
             "        Abstract model violation: Lines may not contain lines or lg elements.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.fragmentable.attributes,
    empty
  }
TEI_lg =
  
  ## (line group) contains one or more verse lines functioning as a formal unit, e.g. a stanza, refrain, verse paragraph, etc. [3.13.1. Core Tags for Verse 3.13. Passages of Verse or Drama 7.2.5. Speech Contents]
  element tei:lg {
    ((TEI_model.divTop | TEI_model.global)*,
     (TEI_model.lLike
      | TEI_model.stageLike
      | TEI_model.labelLike
      | TEI_lg),
     (TEI_model.lLike
      | TEI_model.stageLike
      | TEI_model.labelLike
      | TEI_model.global
      | TEI_lg)*,
     (TEI_model.divBottom, TEI_model.global*)*)
    >> sch:pattern [
         id = "p5odds-lg-atleast1oflggapl-constraint-assert-12"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:lg"
           "\x{a}" ~
           "               "
           sch:assert [
             test =
               "count(descendant::tei:lg|descendant::tei:l|descendant::tei:gap) > 0"
             "An lg element\x{a}" ~
             "        must contain at least one child l, lg, or gap element."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-lg-abstractModel-structure-l-constraint-report-12"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:lg"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "ancestor::tei:l[not(.//tei:note//tei:lg[. = current()])]"
             "\x{a}" ~
             "        Abstract model violation: Lines may not contain line groups.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.divLike.attributes,
    TEI_att.typed.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_sp =
  
  ## (speech) contains an individual speech in a performance text, or a passage presented as such in a prose or verse text. [3.13.2. Core Tags for Drama 3.13. Passages of Verse or Drama 7.2.2. Speeches and Speakers]
  element tei:sp {
    (TEI_model.global*,
     (TEI_speaker, TEI_model.global*)?,
     ((TEI_lg
       | TEI_model.lLike
       | TEI_model.pLike
       | TEI_model.listLike
       | TEI_model.stageLike
       | TEI_model.attributable),
      (TEI_model.global* | TEI_q))+),
    TEI_att.global.attributes,
    TEI_att.ascribed.directed.attributes,
    empty
  }
TEI_speaker =
  
  ## contains a specialized form of heading or label, giving the name of one or more speakers in a dramatic text or fragment. [3.13.2. Core Tags for Drama]
  element tei:speaker {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_stage =
  
  ## (stage direction) contains any kind of stage direction within a dramatic text or fragment. [3.13.2. Core Tags for Drama 3.13. Passages of Verse or Drama 7.2.4. Stage Directions]
  element tei:stage {
    TEI_macro.specialPara,
    TEI_att.ascribed.directed.attributes,
    TEI_att.global.attributes,
    TEI_att.placement.attributes,
    
    ## indicates the kind of stage direction.
    ## Suggested values include: 1] setting; 2] entrance; 3] exit; 4] business; 5] novelistic; 6] delivery; 7] modifier; 8] location; 9] mixed
    attribute type {
      list {
        (
         ## describes a setting.
         "setting"
         | 
           ## describes an entrance.
           "entrance"
         | 
           ## describes an exit.
           "exit"
         | 
           ## describes stage business.
           "business"
         | 
           ## is a narrative, motivating stage direction.
           "novelistic"
         | 
           ## describes how a character speaks.
           "delivery"
         | 
           ## gives some detail about a character.
           "modifier"
         | 
           ## describes a location.
           "location"
         | 
           ## more than one of the above
           "mixed"
         | xsd:token { pattern = "[^\p{C}\p{Z}]+" })*
      }
    }?,
    empty
  }
TEI_teiCorpus =
  [
    a:documentation [
      "(TEI corpus) contains the whole of a TEI encoded corpus, comprising a single corpus header and one or more "
      ns2:code [ "<TEI>" ]
      " elements, each containing a single text header and a text. [4. Default Text Structure 15.1. Varieties of Composite Text]"
    ]
  ]
  element tei:teiCorpus {
    (TEI_teiHeader, TEI_model.resource*, TEI_model.describedResource+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## (version) specifies the version number of the TEI Guidelines against which this document is valid.
    attribute version {
      xsd:token { pattern = "[\d]+(\.[\d]+){0,2}" }
    }?,
    empty
  }
TEI_divGen =
  
  ## (automatically generated text division) indicates the location at which a textual division generated automatically by a text-processing application is to appear. [3.9.2. Index Entries]
  element tei:divGen {
    TEI_model.headLike*,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ##
    attribute type {
      
      ## (Catalogue of Attributes) 
      "attcat"
      | 
        ## (Catalogue of Attribute Classes) 
        "attclasscat"
      | 
        ## ( Catalogue of Elements) 
        "elementcat"
      | 
        ## ( Index) 
        "index"
      | 
        ## ( Catalogue of Macros) 
        "macrocat"
      | 
        ## (Catalogue of Model Classes) 
        "modelclasscat"
      | 
        ## (Catalogue of Deprecations) 
        "deprecationcat"
      | 
        ## (Table of Contents) 
        "toc"
    }?,
    empty
  }
TEI_textLang =
  
  ## (text language) describes the languages and writing systems identified within the bibliographic work being described, rather than its description. [3.12.2.4. Imprint, Size of a Document, and Reprint Information 10.6.6. Languages and Writing Systems]
  element tei:textLang {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    
    ## (main language) supplies a code which identifies the chief language used in the bibliographic work.
    attribute mainLang {
      xsd:language
      | (
         ##
         "")
    }?,
    
    ## (other languages) one or more codes identifying any other languages used in the bibliographic work.
    attribute otherLangs {
      list {
        (xsd:language
         | (
            ##
            ""))*
      }
    }?,
    empty
  }
TEI_att.patternReplacement.attributes =
  TEI_att.patternReplacement.attribute.matchPattern,
  TEI_att.patternReplacement.attribute.replacementPattern
TEI_att.patternReplacement.attribute.matchPattern =
  
  ## specifies a regular expression against which the values of other attributes can be matched.
  attribute matchPattern { xsd:token }
TEI_att.patternReplacement.attribute.replacementPattern =
  [
    a:documentation [
      "specifies a replacement pattern, that is, the skeleton of a relative or absolute URI containing references to groups in the "
      ns2:code [ "@matchPattern" ]
      " which, once subpattern substitution has been performed, complete the URI."
    ]
  ]
  attribute replacementPattern { text }
TEI_teiHeader =
  
  ## (TEI header) supplies descriptive and declarative metadata associated with a digital resource or set of resources. [2.1.1. The TEI Header and Its Components 15.1. Varieties of Composite Text]
  element tei:teiHeader {
    (TEI_fileDesc, TEI_model.teiHeaderPart*, TEI_revisionDesc?),
    TEI_att.global.attributes,
    empty
  }
TEI_fileDesc =
  
  ## (file description) contains a full bibliographic description of an electronic file. [2.2. The File Description 2.1.1. The TEI Header and Its Components]
  element tei:fileDesc {
    ((TEI_titleStmt,
      TEI_editionStmt?,
      TEI_extent?,
      TEI_publicationStmt,
      TEI_seriesStmt*,
      TEI_notesStmt?),
     TEI_sourceDesc+),
    TEI_att.global.attributes,
    empty
  }
TEI_titleStmt =
  
  ## (title statement) groups information about the title of a work and those responsible for its content. [2.2.1. The Title Statement 2.2. The File Description]
  element tei:titleStmt {
    (TEI_title+, TEI_model.respLike*), TEI_att.global.attributes, empty
  }
TEI_sponsor =
  
  ## (sponsor) specifies the name of a sponsoring organization or institution. [2.2.1. The Title Statement]
  element tei:sponsor {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_funder =
  
  ## (funding body) specifies the name of an individual, institution, or organization responsible for the funding of a project or text. [2.2.1. The Title Statement]
  element tei:funder {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_principal =
  
  ## (principal researcher) supplies the name of the principal researcher responsible for the creation of an electronic text. [2.2.1. The Title Statement]
  element tei:principal {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_editionStmt =
  
  ## (edition statement) groups information relating to one edition of a text. [2.2.2. The Edition Statement 2.2. The File Description]
  element tei:editionStmt {
    (TEI_model.pLike+ | (TEI_edition, TEI_model.respLike*)),
    TEI_att.global.attributes,
    empty
  }
TEI_edition =
  
  ## (edition) describes the particularities of one edition of a text. [2.2.2. The Edition Statement]
  element tei:edition {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_extent =
  
  ## (extent) describes the approximate size of a text stored on some carrier medium or of some other object, digital or non-digital, specified in any convenient units. [2.2.3. Type and Extent of File 2.2. The File Description 3.12.2.4. Imprint, Size of a Document, and Reprint Information 10.7.1. Object Description]
  element tei:extent {
    TEI_macro.phraseSeq, TEI_att.global.attributes, empty
  }
TEI_publicationStmt =
  
  ## (publication statement) groups information concerning the publication or distribution of an electronic or other text. [2.2.4. Publication, Distribution, Licensing, etc. 2.2. The File Description]
  element tei:publicationStmt {
    ((TEI_model.publicationStmtPart.agency,
      TEI_model.publicationStmtPart.detail*)+
     | TEI_model.pLike+),
    TEI_att.global.attributes,
    empty
  }
TEI_distributor =
  
  ## (distributor) supplies the name of a person or other agency responsible for the distribution of a text. [2.2.4. Publication, Distribution, Licensing, etc.]
  element tei:distributor {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_authority =
  
  ## (release authority) supplies the name of a person or other agency responsible for making a work available, other than a publisher or distributor. [2.2.4. Publication, Distribution, Licensing, etc.]
  element tei:authority {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_idno =
  
  ## (identifier) supplies any form of identifier used to identify some object, such as a bibliographic item, a person, a title, an organization, etc. in a standardized way. [13.3.1. Basic Principles 2.2.4. Publication, Distribution, Licensing, etc. 2.2.5. The Series Statement 3.12.2.4. Imprint, Size of a Document, and Reprint Information]
  element tei:idno {
    (text | TEI_model.gLike | TEI_idno)*,
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    TEI_att.datable.attributes,
    TEI_att.typed.attribute.subtype,
    
    ##
    attribute type {
      
      ## (Digital Object Identifier) 
      "DOI"
      | 
        ## (International Standard Book Number) 
        "ISBN"
      | 
        ## (any form of web address) 
        "url"
    }?,
    empty
  }
TEI_availability =
  
  ## (availability) supplies information about the availability of a text, for example any restrictions on its use or distribution, its copyright status, any licence applying to it, etc. [2.2.4. Publication, Distribution, Licensing, etc.]
  element tei:availability {
    (TEI_model.availabilityPart | TEI_model.pLike)+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## (status) supplies a code identifying the current availability of the text.
    attribute status {
      
      ## (free) the text is freely available.
      "free"
      | 
        ## (unknown) the status of the text is unknown.
        "unknown"
      | 
        ## (restricted) the text is not freely available.
        "restricted"
    }?,
    empty
  }
TEI_licence =
  
  ## contains information about a licence or other legal agreement applicable to the text. [2.2.4. Publication, Distribution, Licensing, etc.]
  element tei:licence {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_seriesStmt =
  
  ## (series statement) groups information about the series, if any, to which a publication belongs. [2.2.5. The Series Statement 2.2. The File Description]
  element tei:seriesStmt {
    (TEI_model.pLike+
     | (TEI_title+,
        (TEI_editor | TEI_respStmt)*,
        (TEI_idno | TEI_biblScope)*)),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_notesStmt =
  
  ## (notes statement) collects together any notes providing information about a text additional to that recorded in other parts of the bibliographic description. [2.2.6. The Notes Statement 2.2. The File Description]
  element tei:notesStmt {
    (TEI_model.noteLike | TEI_relatedItem)+,
    TEI_att.global.attributes,
    empty
  }
TEI_sourceDesc =
  
  ## (source description) describes the source(s) from which an electronic text was derived or generated, typically a bibliographic description in the case of a digitized text, or a phrase such as "born digital" for a text which has no previous existence. [2.2.7. The Source Description]
  element tei:sourceDesc {
    (TEI_model.pLike+
     | (TEI_model.biblLike
        | TEI_model.sourceDescPart
        | TEI_model.listLike)+),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_biblFull =
  
  ## (fully-structured bibliographic citation) contains a fully-structured bibliographic citation, in which all components of the TEI file description are present. [3.12.1. Methods of Encoding Bibliographic References and Lists of References 2.2. The File Description 2.2.7. The Source Description 15.3.2. Declarable Elements]
  element tei:biblFull {
    (((TEI_titleStmt,
       TEI_editionStmt?,
       TEI_extent?,
       TEI_publicationStmt,
       TEI_seriesStmt*,
       TEI_notesStmt?),
      TEI_sourceDesc*)
     | (TEI_fileDesc, TEI_profileDesc)),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    TEI_att.docStatus.attributes,
    empty
  }
TEI_encodingDesc =
  
  ## (encoding description) documents the relationship between an electronic text and the source or sources from which it was derived. [2.3. The Encoding Description 2.1.1. The TEI Header and Its Components]
  element tei:encodingDesc {
    (TEI_model.encodingDescPart | TEI_model.pLike)+,
    TEI_att.global.attributes,
    empty
  }
TEI_schemaRef =
  
  ## (schema reference) describes or points to a related customization or schema file [2.3.10. The Schema Specification]
  element tei:schemaRef {
    TEI_model.descLike?,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.resourced.attributes,
    
    ## the identifier used for the customization or schema
    attribute key { xsd:NCName }?,
    empty
  }
TEI_projectDesc =
  
  ## (project description) describes in detail the aim or purpose for which an electronic file was encoded, together with any other relevant information concerning the process by which it was assembled or collected. [2.3.1. The Project Description 2.3. The Encoding Description 15.3.2. Declarable Elements]
  element tei:projectDesc {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_samplingDecl =
  
  ## (sampling declaration) contains a prose description of the rationale and methods used in sampling texts in the creation of a corpus or collection. [2.3.2. The Sampling Declaration 2.3. The Encoding Description 15.3.2. Declarable Elements]
  element tei:samplingDecl {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_editorialDecl =
  
  ## (editorial practice declaration) provides details of editorial principles and practices applied during the encoding of a text. [2.3.3. The Editorial Practices Declaration 2.3. The Encoding Description 15.3.2. Declarable Elements]
  element tei:editorialDecl {
    (TEI_model.pLike | TEI_model.editorialDeclPart)+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_correction =
  
  ## (correction principles) states how and under what circumstances corrections have been made in the text. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:correction {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## indicates the degree of correction applied to the text.
    attribute status {
      
      ## the text has been thoroughly checked and proofread.
      "high"
      | 
        ## the text has been checked at least once.
        "medium"
      | 
        ## the text has not been checked.
        "low"
      | 
        ## the correction status of the text is unknown.
        "unknown"
    }?,
    
    ## indicates the method adopted to indicate corrections within the text.
    [ a:defaultValue = "silent" ]
    attribute method {
      
      ## corrections have been made silently
      "silent"
      | 
        ## corrections have been represented using markup
        "markup"
    }?,
    empty
  }
TEI_normalization =
  
  ## (normalization) indicates the extent of normalization or regularization of the original source carried out in converting it to electronic form. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:normalization {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## indicates the method adopted to indicate normalizations within the text.
    [ a:defaultValue = "silent" ]
    attribute method {
      
      ## normalization made silently
      "silent"
      | 
        ## normalization represented using markup
        "markup"
    }?,
    empty
  }
TEI_quotation =
  
  ## (quotation) specifies editorial practice adopted with respect to quotation marks in the original. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:quotation {
    (TEI_model.pLike*)
    >> sch:pattern [
         id = "p5odds-quotation-quotationContents-constraint-report-13"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:quotation"
           "\x{a}" ~
           "               "
           sch:report [
             test = "not(@marks) and not (tei:p)"
             "\x{a}" ~
             "On "
             sch:name [ ]
             ", either the @marks attribute should be used, or a paragraph of description provided"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## (quotation marks) indicates whether or not quotation marks have been retained as content within the text.
    attribute marks {
      
      ## no quotation marks have been retained
      "none"
      | 
        ## some quotation marks have been retained
        "some"
      | 
        ## all quotation marks have been retained
        "all"
    }?,
    empty
  }
TEI_hyphenation =
  
  ## (hyphenation) summarizes the way in which hyphenation in a source text has been treated in an encoded version of it. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:hyphenation {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## (end-of-line) indicates whether or not end-of-line hyphenation has been retained in a text.
    [ a:defaultValue = "some" ]
    attribute eol {
      
      ## all end-of-line hyphenation has been retained, even though the lineation of the original may not have been.
      "all"
      | 
        ## end-of-line hyphenation has been retained in some cases.
        "some"
      | 
        ## all soft end-of-line hyphenation has been removed: any remaining end-of-line hyphenation should be retained.
        "hard"
      | 
        ## all end-of-line hyphenation has been removed: any remaining hyphenation occurred within the line.
        "none"
    }?,
    empty
  }
TEI_segmentation =
  
  ## (segmentation) describes the principles according to which the text has been segmented, for example into sentences, tone-units, graphemic strata, etc. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:segmentation {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_stdVals =
  
  ## (standard values) specifies the format used when standardized date or number values are supplied. [2.3.3. The Editorial Practices Declaration 15.3.2. Declarable Elements]
  element tei:stdVals {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_interpretation =
  
  ## (interpretation) describes the scope of any analytic or interpretive information added to the text in addition to the transcription. [2.3.3. The Editorial Practices Declaration]
  element tei:interpretation {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_punctuation =
  
  ## specifies editorial practice adopted with respect to punctuation marks in the original. [2.3.3. The Editorial Practices Declaration 3.2. Treatment of Punctuation]
  element tei:punctuation {
    TEI_model.pLike*,
    TEI_att.declarable.attributes,
    TEI_att.global.attributes,
    
    ## indicates whether or not punctation marks have been retained as content within the text.
    attribute marks {
      
      ## no punctuation marks have been retained
      "none"
      | 
        ## some punctuation marks have been retained
        "some"
      | 
        ## all punctuation marks have been retained
        "all"
    }?,
    
    ## indicates the positioning of punctuation marks that are associated with marked up text as being encoded within the element surrounding the text or immediately before or after it.
    attribute placement {
      
      ## punctuation marks found at the start or end of a marked up text component are included within its surrounding element;
      "internal"
      | 
        ## punctuation marks found at the start or end of a marked up text component appear immediately before or after the surrounding element
        "external"
    }?,
    empty
  }
TEI_tagsDecl =
  
  ## (tagging declaration) provides detailed information about the tagging applied to a document. [2.3.4. The Tagging Declaration 2.3. The Encoding Description]
  element tei:tagsDecl {
    (TEI_rendition*, TEI_namespace*),
    TEI_att.global.attributes,
    [
      a:documentation [
        "indicates whether the element types listed exhaustively include all those found within "
        ns2:code [ "<text>" ]
        ", or represent only a subset."
      ]
    ]
    attribute partial { xsd:boolean }?,
    empty
  }
TEI_tagUsage =
  
  ## (element usage) documents the usage of a specific element within a specified document. [2.3.4. The Tagging Declaration]
  element tei:tagUsage {
    TEI_macro.limitedContent,
    TEI_att.global.attributes,
    [
      a:documentation [
        "(generic identifier) specifies the name (generic identifier) of the element indicated by the tag, within the namespace indicated by the parent "
        ns2:code [ "<namespace>" ]
        " element."
      ]
    ]
    attribute gi { xsd:Name },
    
    ## specifies the number of occurrences of this element within the text.
    attribute occurs { xsd:nonNegativeInteger }?,
    [
      a:documentation [
        "(with unique identifier) specifies the number of occurrences of this element within the text which bear a distinct value for the global "
        ns2:code [ "@xml:id" ]
        " attribute."
      ]
    ]
    attribute withId { xsd:nonNegativeInteger }?,
    empty
  }
TEI_namespace =
  
  ## (namespace) supplies the formal name of the namespace to which the elements documented by its children belong. [2.3.4. The Tagging Declaration]
  element tei:namespace {
    TEI_tagUsage+,
    TEI_att.global.attributes,
    
    ## specifies the full formal name of the namespace concerned.
    attribute name { xsd:anyURI },
    empty
  }
TEI_rendition =
  
  ## (rendition) supplies information about the rendition or appearance of one or more elements in the source text. [2.3.4. The Tagging Declaration]
  element tei:rendition {
    TEI_macro.limitedContent,
    TEI_att.global.attributes,
    TEI_att.styleDef.attributes,
    
    ## where CSS is used, provides a way of defining pseudo-elements, that is, styling rules applicable to specific sub-portions of an element.
    ## Sample values include: 1] first-line; 2] first-letter; 3] before; 4] after
    attribute scope {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    [
      a:documentation [
        "contains a selector or series of selectors specifying the elements to which the contained style description applies, expressed in the language specified in the "
        ns2:code [ "@scheme" ]
        " attribute."
      ]
    ]
    attribute selector { xsd:string }?,
    empty
  }
TEI_styleDefDecl =
  
  ## (style definition language declaration) specifies the name of the formal language in which style or renditional information is supplied elsewhere in the document. The specific version of the scheme may also be supplied. [2.3.5. The Default Style Definition Language Declaration]
  element tei:styleDefDecl {
    TEI_model.pLike*,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    TEI_att.styleDef.attributes,
    empty
  }
TEI_refsDecl =
  
  ## (references declaration) specifies how canonical references are constructed for this text. [2.3.6.3. Milestone Method 2.3. The Encoding Description 2.3.6. The Reference System Declaration]
  element tei:refsDecl {
    (TEI_model.pLike+
     | TEI_citeStructure+
     | TEI_cRefPattern+
     | TEI_refState+),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_citeStructure =
  
  ## (citation structure) declares a structure and method for citing the current document. [3.11.4. Declaring Reference Systems 16.2.5.4. Citation Structures]
  element tei:citeStructure {
    (TEI_citeData*, TEI_citeStructure*, TEI_model.descLike*),
    TEI_att.global.attributes,
    TEI_att.citeStructurePart.attributes,
    (
     ## (delimiter) supplies a delimiting string preceding the structural component.
     attribute delim {
       xsd:string { pattern = ".+" }
     }?)
    >> sch:pattern [
         id =
           "p5odds-citeStructure-delim-citestructure-inner-delim-constraint-rule-13"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:citeStructure[parent::tei:citeStructure]"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "@delim"
             "A "
             sch:name [ ]
             " with a parent "
             sch:name [ ]
             " must have a @delim attribute."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    [
      a:documentation [
        "(match) supplies an XPath selection pattern using the syntax defined in  which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
        ns2:code [ "@match" ]
        " on a "
        ns2:code [ "<citeStructure>" ]
        " without a "
        ns2:code [ "<citeStructure>" ]
        " parent must be an absolute XPath. If it is relative, its context is set by the "
        ns2:code [ "@match" ]
        " of the parent "
        ns2:code [ "<citeStructure>" ]
        "."
      ]
    ]
    attribute match { text }
    >> sch:pattern [
         id =
           "p5odds-citeStructure-match-citestructure-outer-match-constraint-rule-14"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:citeStructure[not(parent::tei:citeStructure)]"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "starts-with(@match,'/')"
             "An XPath in @match on the outer "
             sch:name [ ]
             " must start with '/'."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id =
           "p5odds-citeStructure-match-citestructure-inner-match-constraint-rule-15"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:citeStructure[parent::tei:citeStructure]"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "not(starts-with(@match,'/'))"
             "An XPath in @match must not start with '/' except on the outer "
             sch:name [ ]
             "."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    [
      a:documentation [
        "(unit) describes the structural unit indicated by the "
        ns2:code [ "<citeStructure>" ]
        ".\x{a}" ~
        "Sample values include: 1] book; 2] chapter; 3] entry; 4] poem; 5] letter; 6] line; 7] section; 8] verse; 9] volume"
      ]
    ]
    attribute unit {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_citeData =
  
  ## (citation data) specifies how information may be extracted from citation structures. [3.11.4. Declaring Reference Systems 16.2.5.4. Citation Structures]
  element tei:citeData {
    empty,
    TEI_att.global.attributes,
    TEI_att.citeStructurePart.attributes,
    
    ## (property) A URI indicating a property definition.
    attribute property { xsd:anyURI },
    empty
  }
TEI_cRefPattern =
  
  ## (canonical reference pattern) specifies an expression and replacement pattern for transforming a canonical reference into a URI. [2.3.6.3. Milestone Method 2.3.6. The Reference System Declaration 2.3.6.2. Search-and-Replace Method]
  element tei:cRefPattern {
    TEI_model.pLike*,
    TEI_att.global.attributes,
    TEI_att.patternReplacement.attributes,
    empty
  }
TEI_prefixDef =
  
  ## (prefix definition) defines a prefixing scheme used in teidata.pointer values, showing how abbreviated URIs using the scheme may be expanded into full URIs. [16.2.3. Using Abbreviated Pointers]
  element tei:prefixDef {
    TEI_model.pLike*,
    TEI_att.global.attributes,
    TEI_att.patternReplacement.attributes,
    
    ## supplies a name which functions as the prefix for an abbreviated pointing scheme such as a private URI scheme. The prefix constitutes the text preceding the first colon.
    attribute ident {
      xsd:token { pattern = "[a-z][a-z0-9\+\.\-]*" }
    },
    empty
  }
TEI_listPrefixDef =
  
  ## (list of prefix definitions) contains a list of definitions of prefixing schemes used in teidata.pointer values, showing how abbreviated URIs using each scheme may be expanded into full URIs. [16.2.3. Using Abbreviated Pointers]
  element tei:listPrefixDef {
    (TEI_desc*, (TEI_prefixDef | TEI_listPrefixDef)+),
    TEI_att.global.attributes,
    empty
  }
TEI_refState =
  
  ## (reference state) specifies one component of a canonical reference defined by the milestone method. [2.3.6.3. Milestone Method 2.3.6. The Reference System Declaration]
  element tei:refState {
    empty,
    TEI_att.global.attributes,
    TEI_att.milestoneUnit.attributes,
    TEI_att.edition.attributes,
    
    ## specifies the fixed length of the reference component.
    attribute length { xsd:nonNegativeInteger }?,
    
    ## (delimiter) supplies a delimiting string following the reference component.
    attribute delim { xsd:string }?,
    empty
  }
TEI_classDecl =
  
  ## (classification declarations) contains one or more taxonomies defining any classificatory codes used elsewhere in the text. [2.3.7. The Classification Declaration 2.3. The Encoding Description]
  element tei:classDecl {
    TEI_taxonomy+, TEI_att.global.attributes, empty
  }
TEI_taxonomy =
  
  ## (taxonomy) defines a typology either implicitly, by means of a bibliographic citation, or explicitly by a structured taxonomy. [2.3.7. The Classification Declaration]
  element tei:taxonomy {
    (((TEI_category | TEI_taxonomy)+
      | ((TEI_model.descLike | TEI_equiv | TEI_gloss)+,
         (TEI_category | TEI_taxonomy)*))
     | (TEI_model.biblLike, (TEI_category | TEI_taxonomy)*)),
    TEI_att.global.attributes,
    empty
  }
TEI_category =
  
  ## (category) contains an individual descriptive category, possibly nested within a superordinate category, within a user-defined taxonomy. [2.3.7. The Classification Declaration]
  element tei:category {
    ((TEI_catDesc+ | (TEI_model.descLike | TEI_equiv | TEI_gloss)*),
     TEI_category*),
    TEI_att.global.attributes,
    empty
  }
TEI_catDesc =
  [
    a:documentation [
      "(category description) describes some category within a taxonomy or text typology, either in the form of a brief prose description or in terms of the situational parameters used by the TEI formal "
      ns2:code [ "<textDesc>" ]
      ". [2.3.7. The Classification Declaration]"
    ]
  ]
  element tei:catDesc {
    (text | TEI_model.limitedPhrase | TEI_model.catDescPart)*,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_geoDecl =
  [
    a:documentation [
      "(geographic coordinates declaration) documents the notation and the datum used for geographic coordinates expressed as content of the "
      ns2:code [ "<geo>" ]
      " element elsewhere within the document. [2.3.8. The Geographic Coordinates Declaration]"
    ]
  ]
  element tei:geoDecl {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    
    ## supplies a commonly used code name for the datum employed.
    ## Suggested values include: 1] WGS84 (World Geodetic System); 2] MGRS (Military Grid Reference System); 3] OSGB36 (ordnance survey great britain); 4] ED50 (European Datum coordinate system)
    [ a:defaultValue = "WGS84" ]
    attribute datum {
      
      ## (World Geodetic System) a pair of numbers to be interpreted as latitude followed by longitude according to the World Geodetic System.
      "WGS84"
      | 
        ## (Military Grid Reference System) the values supplied are geospatial entity object codes, based on
        "MGRS"
      | 
        ## (ordnance survey great britain) the value supplied is to be interpreted as a British National Grid Reference.
        "OSGB36"
      | 
        ## (European Datum coordinate system) the value supplied is to be interpreted as latitude followed by longitude according to the European Datum coordinate system.
        "ED50"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_unitDecl =
  
  ## (unit declarations) provides information about units of measurement that are not members of the International System of Units. [2.3.9. The Unit Declaration]
  element tei:unitDecl {
    TEI_unitDef+,
    TEI_att.canonical.attributes,
    TEI_att.datable.attributes,
    TEI_att.global.attributes,
    empty
  }
TEI_unitDef =
  
  ## (unit definition) contains descriptive information related to a specific unit of measurement. [2.3.9. The Unit Declaration]
  element tei:unitDef {
    (TEI_model.labelLike
     | TEI_model.placeNamePart?
     | TEI_conversion?
     | TEI_unit?)+,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.canonical.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_conversion =
  
  ## defines how to calculate one unit of measure in terms of another. [2.3.9. The Unit Declaration]
  element tei:conversion {
    empty,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.formula.attributes,
    [
      a:documentation [
        "indicates a source unit of measure that is to be converted into another unit indicated in "
        ns2:code [ "@toUnit" ]
        "."
      ]
    ]
    attribute fromUnit { xsd:anyURI },
    [
      a:documentation [
        "the target unit of measurement for a conversion from a source unit referenced in "
        ns2:code [ "@fromUnit" ]
        "."
      ]
    ]
    attribute toUnit { xsd:anyURI },
    empty
  }
TEI_appInfo =
  
  ## (application information) records information about an application which has edited the TEI file. [2.3.11. The Application Information Element]
  element tei:appInfo {
    TEI_model.applicationLike+, TEI_att.global.attributes, empty
  }
TEI_application =
  
  ## provides information about an application which has acted upon the document. [2.3.11. The Application Information Element]
  element tei:application {
    (TEI_model.labelLike+, (TEI_model.ptrLike* | TEI_model.pLike*)),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    
    ## supplies an identifier for the application, independent of its version number or display name.
    attribute ident { xsd:Name },
    
    ## supplies a version number for the application, independent of its identifier or display name.
    attribute version {
      xsd:token {
        pattern = "[\d]+[a-z]*[\d]*(\.[\d]+[a-z]*[\d]*){0,3}"
      }
    },
    empty
  }
TEI_profileDesc =
  
  ## (text-profile description) provides a detailed description of non-bibliographic aspects of a text, specifically the languages and sublanguages used, the situation in which it was produced, the participants and their setting. [2.4. The Profile Description 2.1.1. The TEI Header and Its Components]
  element tei:profileDesc {
    TEI_model.profileDescPart*, TEI_att.global.attributes, empty
  }
TEI_abstract =
  
  ## contains a summary or formal abstract prefixed to an existing source document by the encoder. [2.4.4. Abstracts]
  element tei:abstract {
    (TEI_model.pLike | TEI_model.listLike)+,
    TEI_att.global.attributes,
    empty
  }
TEI_creation =
  
  ## (creation) contains information about the creation of a text. [2.4.1. Creation 2.4. The Profile Description]
  element tei:creation {
    (text | TEI_model.limitedPhrase | TEI_listChange)*,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_langUsage =
  
  ## (language usage) describes the languages, sublanguages, registers, dialects, etc. represented within a text. [2.4.2. Language Usage 2.4. The Profile Description 15.3.2. Declarable Elements]
  element tei:langUsage {
    (TEI_model.pLike+ | TEI_language+),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_language =
  
  ## (language) characterizes a single language or sublanguage used within a text. [2.4.2. Language Usage]
  element tei:language {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    [
      a:documentation [
        "(identifier) Supplies a language code constructed as defined in "
        ns2:a [ href = "https://tools.ietf.org/html/bcp47" "BCP 47" ]
        " which is used to identify the language documented by this element, and which is referenced by the global "
        ns2:code [ "@xml:lang" ]
        " attribute."
      ]
    ]
    attribute ident {
      xsd:language
      | (
         ##
         "")
    },
    
    ## specifies the approximate percentage (by volume) of the text which uses this language.
    attribute usage { xsd:nonNegativeInteger }?,
    empty
  }
TEI_textClass =
  
  ## (text classification) groups information which describes the nature or topic of a text in terms of a standard classification scheme, thesaurus, etc. [2.4.3. The Text Classification]
  element tei:textClass {
    (TEI_classCode | TEI_catRef | TEI_keywords)*,
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    empty
  }
TEI_keywords =
  
  ## (keywords) contains a list of keywords or phrases identifying the topic or nature of a text. [2.4.3. The Text Classification]
  element tei:keywords {
    (TEI_term+ | TEI_list),
    TEI_att.global.attributes,
    [
      a:documentation [
        "identifies the controlled vocabulary within which the set of keywords concerned is defined, for example by a "
        ns2:code [ "<taxonomy>" ]
        " element, or by some other resource."
      ]
    ]
    attribute scheme { xsd:anyURI }?,
    empty
  }
TEI_classCode =
  
  ## (classification code) contains the classification code used for this text in some standard classification system. [2.4.3. The Text Classification]
  element tei:classCode {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    [
      a:documentation [
        "identifies the classification system in use, as defined by, e.g. a "
        ns2:code [ "<taxonomy>" ]
        " element, or some other resource."
      ]
    ]
    attribute scheme { xsd:anyURI },
    empty
  }
TEI_catRef =
  
  ## (category reference) specifies one or more defined categories within some taxonomy or text typology. [2.4.3. The Text Classification]
  element tei:catRef {
    empty,
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    [
      a:documentation [
        "identifies the classification scheme within which the set of categories concerned is defined, for example by a "
        ns2:code [ "<taxonomy>" ]
        " element, or by some other resource."
      ]
    ]
    attribute scheme { xsd:anyURI }?,
    empty
  }
TEI_calendarDesc =
  
  ## (calendar description) contains a description of the calendar system used in any dating expression found in the text. [2.4. The Profile Description 2.4.5. Calendar Description]
  element tei:calendarDesc {
    TEI_calendar+, TEI_att.global.attributes, empty
  }
TEI_calendar =
  
  ## (calendar) describes a calendar or dating system used in a dating formula in the text. [2.4.5. Calendar Description]
  element tei:calendar {
    TEI_model.pLike+,
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    empty
  }
TEI_correspDesc =
  
  ## (correspondence
  ##     description) contains a description of the actions related to one act of correspondence. [2.4.6. Correspondence Description]
  element tei:correspDesc {
    (TEI_model.correspDescPart+ | TEI_model.pLike+),
    TEI_att.declarable.attributes,
    TEI_att.canonical.attributes,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_correspAction =
  
  ## (correspondence action) contains a structured description of the place, the name of a person/organization and the date related to the sending/receiving of a message or any other action related to the correspondence. [2.4.6. Correspondence Description]
  element tei:correspAction {
    (TEI_model.correspActionPart+ | TEI_model.pLike+),
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.sortable.attributes,
    
    ## describes the nature of the action.
    ## Suggested values include: 1] sent; 2] received; 3] transmitted; 4] redirected; 5] forwarded
    attribute type {
      
      ## information concerning the sending or dispatch of a message.
      "sent"
      | 
        ## information concerning the receipt of a message.
        "received"
      | 
        ## information concerning the transmission of a message, i.e. between the dispatch and the next receipt, redirect or forwarding.
        "transmitted"
      | 
        ## information concerning the redirection of an unread message.
        "redirected"
      | 
        ## information concerning the forwarding of a message.
        "forwarded"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_correspContext =
  
  ## (correspondence context) provides references to preceding or following correspondence related to this piece of correspondence. [2.4.6. Correspondence Description]
  element tei:correspContext {
    TEI_model.correspContextPart+, TEI_att.global.attributes, empty
  }
TEI_xenoData =
  
  ## (non-TEI metadata) provides a container element into which metadata in non-TEI formats may be placed. [2.5. Non-TEI Metadata]
  element tei:xenoData {
    (text | anyElement-xenoData),
    TEI_att.global.attributes,
    TEI_att.declarable.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_revisionDesc =
  
  ## (revision description) summarizes the revision history for a file. [2.6. The Revision Description 2.1.1. The TEI Header and Its Components]
  element tei:revisionDesc {
    (TEI_list | TEI_listChange | TEI_change+),
    TEI_att.global.attributes,
    TEI_att.docStatus.attributes,
    empty
  }
TEI_change =
  
  ## (change) documents a change or set of changes made during the production of a source document, or during the revision of an electronic file. [2.6. The Revision Description 2.4.1. Creation 11.7. Identifying Changes and Revisions]
  element tei:change {
    TEI_macro.specialPara,
    TEI_att.ascribed.attributes,
    TEI_att.datable.attributes,
    TEI_att.docStatus.attributes,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## (target) points to one or more elements that belong to this change.
    attribute target {
      list { xsd:anyURI+ }
    }?,
    empty
  }
TEI_listChange =
  
  ## groups a number of change descriptions associated with either the creation of a source text or the revision of an encoded text. [2.6. The Revision Description 11.7. Identifying Changes and Revisions]
  element tei:listChange {
    (TEI_desc*, (TEI_listChange | TEI_change)+),
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    TEI_att.typed.attributes,
    [
      a:defaultValue = "true"
      a:documentation [
        "indicates whether the ordering of its child "
        ns2:code [ "<change>" ]
        " elements is to be considered significant or not"
      ]
    ]
    attribute ordered { xsd:boolean }?,
    empty
  }
TEI_att.gaijiProp.attributes =
  TEI_att.gaijiProp.attribute.name,
  TEI_att.gaijiProp.attribute.value,
  TEI_att.gaijiProp.attribute.version
TEI_att.gaijiProp.attribute.name =
  
  ## provides the name of the character or glyph property being defined.
  attribute name { xsd:NCName }
TEI_att.gaijiProp.attribute.value =
  
  ## provides the value of the character or glyph property being defined.
  attribute value { xsd:string }
TEI_att.gaijiProp.attribute.version =
  
  ## specifies the version number of the Unicode Standard in which this property name is defined.
  ## Suggested values include: 1] 1.0.1; 2] 1.1; 3] 2.0; 4] 2.1; 5] 3.0; 6] 3.1; 7] 3.2; 8] 4.0; 9] 4.1; 10] 5.0; 11] 5.1; 12] 5.2; 13] 6.0; 14] 6.1; 15] 6.2; 16] 6.3; 17] 7.0; 18] 8.0; 19] 9.0; 20] 10.0; 21] 11.0; 22] 12.0; 23] 12.1; 24] unassigned
  attribute version {
    
    ##
    "1.0.1"
    | 
      ##
      "1.1"
    | 
      ##
      "2.0"
    | 
      ##
      "2.1"
    | 
      ##
      "3.0"
    | 
      ##
      "3.1"
    | 
      ##
      "3.2"
    | 
      ##
      "4.0"
    | 
      ##
      "4.1"
    | 
      ##
      "5.0"
    | 
      ##
      "5.1"
    | 
      ##
      "5.2"
    | 
      ##
      "6.0"
    | 
      ##
      "6.1"
    | 
      ##
      "6.2"
    | 
      ##
      "6.3"
    | 
      ##
      "7.0"
    | 
      ##
      "8.0"
    | 
      ##
      "9.0"
    | 
      ##
      "10.0"
    | 
      ##
      "11.0"
    | 
      ##
      "12.0"
    | 
      ##
      "12.1"
    | 
      ##
      "unassigned"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_g =
  
  ## (character or glyph) represents a glyph, or a non-standard character. [5. Characters, Glyphs, and Writing Modes]
  element tei:g {
    text,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## points to a description of the character or glyph intended.
    attribute ref { xsd:anyURI }?,
    empty
  }
TEI_charDecl =
  
  ## (character declarations) provides information about nonstandard characters and glyphs. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:charDecl {
    (TEI_desc?, (TEI_char | TEI_glyph)+),
    TEI_att.global.attributes,
    empty
  }
TEI_char =
  
  ## (character) provides descriptive information about a character. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:char {
    (TEI_charName
     | TEI_charProp
     | TEI_unicodeProp
     | TEI_unihanProp
     | TEI_localProp
     | TEI_mapping
     | TEI_figure
     | TEI_model.graphicLike
     | TEI_model.noteLike
     | TEI_model.descLike)*,
    TEI_att.global.attributes,
    empty
  }
TEI_glyph =
  
  ## (character glyph) provides descriptive information about a character glyph. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:glyph {
    (TEI_glyphName
     | TEI_charProp
     | TEI_unicodeProp
     | TEI_unihanProp
     | TEI_localProp
     | TEI_mapping
     | TEI_figure
     | TEI_model.graphicLike
     | TEI_model.noteLike
     | TEI_model.descLike)*,
    TEI_att.global.attributes,
    empty
  }
TEI_localProp =
  
  ## (locally defined property) provides a locally defined character (or glyph) property. [5.2.1. Character Properties]
  element tei:localProp {
    empty,
    TEI_att.global.attributes,
    TEI_att.gaijiProp.attributes,
    empty
  }
TEI_mapping =
  [
    a:documentation [
      "(character mapping) contains one or more characters which are related to the parent character or glyph in some respect, as specified by the "
      ns2:code [ "@type" ]
      " attribute. [5.2. Markup Constructs for Representation of Characters and Glyphs]"
    ]
  ]
  element tei:mapping {
    TEI_macro.xtext,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_unihanProp =
  
  ## (unihan property) holds the name and value of a normative or informative Unihan character (or glyph) property as part of its attributes. [5.2.1. Character Properties]
  element tei:unihanProp {
    empty,
    TEI_att.global.attributes,
    TEI_att.gaijiProp.attribute.version,
    
    ## specifies the normalized name of a unicode han database (Unihan) property
    attribute name {
      
      ##
      "kZVariant"
      | 
        ##
        "kAccountingNumeric"
      | 
        ##
        "kBigFive"
      | 
        ##
        "kCCCII"
      | 
        ##
        "kCNS1986"
      | 
        ##
        "kCNS1992"
      | 
        ##
        "kCangjie"
      | 
        ##
        "kCantonese"
      | 
        ##
        "kCheungBauer"
      | 
        ##
        "kCheungBauerIndex"
      | 
        ##
        "kCihaiT"
      | 
        ##
        "kCompatibilityVariant"
      | 
        ##
        "kCowles"
      | 
        ##
        "kDaeJaweon"
      | 
        ##
        "kDefinition"
      | 
        ##
        "kEACC"
      | 
        ##
        "kFenn"
      | 
        ##
        "kFennIndex"
      | 
        ##
        "kFourCornerCode"
      | 
        ##
        "kFrequency"
      | 
        ##
        "kGB0"
      | 
        ##
        "kGB1"
      | 
        ##
        "kGB3"
      | 
        ##
        "kGB5"
      | 
        ##
        "kGB7"
      | 
        ##
        "kGB8"
      | 
        ##
        "kGSR"
      | 
        ##
        "kGradeLevel"
      | 
        ##
        "kHDZRadBreak"
      | 
        ##
        "kHKGlyph"
      | 
        ##
        "kHKSCS"
      | 
        ##
        "kHanYu"
      | 
        ##
        "kHangul"
      | 
        ##
        "kHanyuPinlu"
      | 
        ##
        "kHanyuPinyin"
      | 
        ##
        "kIBMJapan"
      | 
        ##
        "kIICore"
      | 
        ##
        "kIRGDaeJaweon"
      | 
        ##
        "kIRGDaiKanwaZiten"
      | 
        ##
        "kIRGHanyuDaZidian"
      | 
        ##
        "kIRGKangXi"
      | 
        ##
        "kIRG_GSource"
      | 
        ##
        "kIRG_HSource"
      | 
        ##
        "kIRG_JSource"
      | 
        ##
        "kIRG_KPSource"
      | 
        ##
        "kIRG_KSource"
      | 
        ##
        "kIRG_MSource"
      | 
        ##
        "kIRG_TSource"
      | 
        ##
        "kIRG_USource"
      | 
        ##
        "kIRG_VSource"
      | 
        ##
        "kJIS0213"
      | 
        ##
        "kJa"
      | 
        ##
        "kJapaneseKun"
      | 
        ##
        "kJapaneseOn"
      | 
        ##
        "kJinmeiyoKanji"
      | 
        ##
        "kJis0"
      | 
        ##
        "kJis1"
      | 
        ##
        "kJoyoKanji"
      | 
        ##
        "kKPS0"
      | 
        ##
        "kKPS1"
      | 
        ##
        "kKSC0"
      | 
        ##
        "kKSC1"
      | 
        ##
        "kKangXi"
      | 
        ##
        "kKarlgren"
      | 
        ##
        "kKorean"
      | 
        ##
        "kKoreanEducationHanja"
      | 
        ##
        "kKoreanName"
      | 
        ##
        "kLau"
      | 
        ##
        "kMainlandTelegraph"
      | 
        ##
        "kMandarin"
      | 
        ##
        "kMatthews"
      | 
        ##
        "kMeyerWempe"
      | 
        ##
        "kMorohashi"
      | 
        ##
        "kNelson"
      | 
        ##
        "kOtherNumeric"
      | 
        ##
        "kPhonetic"
      | 
        ##
        "kPrimaryNumeric"
      | 
        ##
        "kPseudoGB1"
      | 
        ##
        "kRSAdobe_Japan1_6"
      | 
        ##
        "kRSJapanese"
      | 
        ##
        "kRSKanWa"
      | 
        ##
        "kRSKangXi"
      | 
        ##
        "kRSKorean"
      | 
        ##
        "kRSUnicode"
      | 
        ##
        "kSBGY"
      | 
        ##
        "kSemanticVariant"
      | 
        ##
        "kSimplifiedVariant"
      | 
        ##
        "kSpecializedSemanticVariant"
      | 
        ##
        "kTGH"
      | 
        ##
        "kTaiwanTelegraph"
      | 
        ##
        "kTang"
      | 
        ##
        "kTotalStrokes"
      | 
        ##
        "kTraditionalVariant"
      | 
        ##
        "kVietnamese"
      | 
        ##
        "kXHC1983"
      | 
        ##
        "kXerox"
    },
    
    ## specifies the value of a named Unihan property
    attribute value {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    },
    empty
  }
TEI_unicodeProp =
  
  ## (unicode property) provides a Unicode property for a character (or glyph). [5.2.1. Character Properties]
  element tei:unicodeProp {
    empty,
    TEI_att.global.attributes,
    TEI_att.gaijiProp.attribute.version,
    
    ## specifies the normalized name of a Unicode property.
    attribute name {
      
      ##
      "Age"
      | 
        ##
        "AHex"
      | 
        ##
        "Alpha"
      | 
        ##
        "Alphabetic"
      | 
        ##
        "ASCII_Hex_Digit"
      | 
        ##
        "bc"
      | 
        ##
        "Bidi_C"
      | 
        ##
        "Bidi_Class"
      | 
        ##
        "Bidi_Control"
      | 
        ##
        "Bidi_M"
      | 
        ##
        "Bidi_Mirrored"
      | 
        ##
        "Bidi_Mirroring_Glyph"
      | 
        ##
        "Bidi_Paired_Bracket"
      | 
        ##
        "Bidi_Paired_Bracket_Type"
      | 
        ##
        "blk"
      | 
        ##
        "Block"
      | 
        ##
        "bmg"
      | 
        ##
        "bpb"
      | 
        ##
        "bpt"
      | 
        ##
        "Canonical_Combining_Class"
      | 
        ##
        "Case_Folding"
      | 
        ##
        "Case_Ignorable"
      | 
        ##
        "Cased"
      | 
        ##
        "ccc"
      | 
        ##
        "CE"
      | 
        ##
        "cf"
      | 
        ##
        "Changes_When_Casefolded"
      | 
        ##
        "Changes_When_Casemapped"
      | 
        ##
        "Changes_When_Lowercased"
      | 
        ##
        "Changes_When_NFKC_Casefolded"
      | 
        ##
        "Changes_When_Titlecased"
      | 
        ##
        "Changes_When_Uppercased"
      | 
        ##
        "CI"
      | 
        ##
        "Comp_Ex"
      | 
        ##
        "Composition_Exclusion"
      | 
        ##
        "CWCF"
      | 
        ##
        "CWCM"
      | 
        ##
        "CWKCF"
      | 
        ##
        "CWL"
      | 
        ##
        "CWT"
      | 
        ##
        "CWU"
      | 
        ##
        "Dash"
      | 
        ##
        "Decomposition_Mapping"
      | 
        ##
        "Decomposition_Type"
      | 
        ##
        "Default_Ignorable_Code_Point"
      | 
        ##
        "Dep"
      | 
        ##
        "Deprecated"
      | 
        ##
        "DI"
      | 
        ##
        "Dia"
      | 
        ##
        "Diacritic"
      | 
        ##
        "dm"
      | 
        ##
        "dt"
      | 
        ##
        "ea"
      | 
        ##
        "East_Asian_Width"
      | 
        ##
        "EqUIdeo"
      | 
        ##
        "Equivalent_Unified_Ideograph"
      | 
        ##
        "Expands_On_NFC"
      | 
        ##
        "Expands_On_NFD"
      | 
        ##
        "Expands_On_NFKC"
      | 
        ##
        "Expands_On_NFKD"
      | 
        ##
        "Ext"
      | 
        ##
        "Extender"
      | 
        ##
        "FC_NFKC"
      | 
        ##
        "FC_NFKC_Closure"
      | 
        ##
        "Full_Composition_Exclusion"
      | 
        ##
        "gc"
      | 
        ##
        "GCB"
      | 
        ##
        "General_Category"
      | 
        ##
        "Gr_Base"
      | 
        ##
        "Gr_Ext"
      | 
        ##
        "Gr_Link"
      | 
        ##
        "Grapheme_Base"
      | 
        ##
        "Grapheme_Cluster_Break"
      | 
        ##
        "Grapheme_Extend"
      | 
        ##
        "Grapheme_Link"
      | 
        ##
        "Hangul_Syllable_Type"
      | 
        ##
        "Hex"
      | 
        ##
        "Hex_Digit"
      | 
        ##
        "hst"
      | 
        ##
        "Hyphen"
      | 
        ##
        "ID_Continue"
      | 
        ##
        "ID_Start"
      | 
        ##
        "IDC"
      | 
        ##
        "Ideo"
      | 
        ##
        "Ideographic"
      | 
        ##
        "IDS"
      | 
        ##
        "IDS_Binary_Operator"
      | 
        ##
        "IDS_Trinary_Operator"
      | 
        ##
        "IDSB"
      | 
        ##
        "IDST"
      | 
        ##
        "Indic_Positional_Category"
      | 
        ##
        "Indic_Syllabic_Category"
      | 
        ##
        "InPC"
      | 
        ##
        "InSC"
      | 
        ##
        "isc"
      | 
        ##
        "ISO_Comment"
      | 
        ##
        "Jamo_Short_Name"
      | 
        ##
        "jg"
      | 
        ##
        "Join_C"
      | 
        ##
        "Join_Control"
      | 
        ##
        "Joining_Group"
      | 
        ##
        "Joining_Type"
      | 
        ##
        "JSN"
      | 
        ##
        "jt"
      | 
        ##
        "kAccountingNumeric"
      | 
        ##
        "kCompatibilityVariant"
      | 
        ##
        "kIICore"
      | 
        ##
        "kIRG_GSource"
      | 
        ##
        "kIRG_HSource"
      | 
        ##
        "kIRG_JSource"
      | 
        ##
        "kIRG_KPSource"
      | 
        ##
        "kIRG_KSource"
      | 
        ##
        "kIRG_MSource"
      | 
        ##
        "kIRG_TSource"
      | 
        ##
        "kIRG_USource"
      | 
        ##
        "kIRG_VSource"
      | 
        ##
        "kOtherNumeric"
      | 
        ##
        "kPrimaryNumeric"
      | 
        ##
        "kRSUnicode"
      | 
        ##
        "lb"
      | 
        ##
        "lc"
      | 
        ##
        "Line_Break"
      | 
        ##
        "LOE"
      | 
        ##
        "Logical_Order_Exception"
      | 
        ##
        "Lower"
      | 
        ##
        "Lowercase"
      | 
        ##
        "Lowercase_Mapping"
      | 
        ##
        "Math"
      | 
        ##
        "na"
      | 
        ##
        "na1"
      | 
        ##
        "Name"
      | 
        ##
        "Name_Alias"
      | 
        ##
        "NChar"
      | 
        ##
        "NFC_QC"
      | 
        ##
        "NFC_Quick_Check"
      | 
        ##
        "NFD_QC"
      | 
        ##
        "NFD_Quick_Check"
      | 
        ##
        "NFKC_Casefold"
      | 
        ##
        "NFKC_CF"
      | 
        ##
        "NFKC_QC"
      | 
        ##
        "NFKC_Quick_Check"
      | 
        ##
        "NFKD_QC"
      | 
        ##
        "NFKD_Quick_Check"
      | 
        ##
        "Noncharacter_Code_Point"
      | 
        ##
        "nt"
      | 
        ##
        "Numeric_Type"
      | 
        ##
        "Numeric_Value"
      | 
        ##
        "nv"
      | 
        ##
        "OAlpha"
      | 
        ##
        "ODI"
      | 
        ##
        "OGr_Ext"
      | 
        ##
        "OIDC"
      | 
        ##
        "OIDS"
      | 
        ##
        "OLower"
      | 
        ##
        "OMath"
      | 
        ##
        "Other_Alphabetic"
      | 
        ##
        "Other_Default_Ignorable_Code_Point"
      | 
        ##
        "Other_Grapheme_Extend"
      | 
        ##
        "Other_ID_Continue"
      | 
        ##
        "Other_ID_Start"
      | 
        ##
        "Other_Lowercase"
      | 
        ##
        "Other_Math"
      | 
        ##
        "Other_Uppercase"
      | 
        ##
        "OUpper"
      | 
        ##
        "Pat_Syn"
      | 
        ##
        "Pat_WS"
      | 
        ##
        "Pattern_Syntax"
      | 
        ##
        "Pattern_White_Space"
      | 
        ##
        "PCM"
      | 
        ##
        "Prepended_Concatenation_Mark"
      | 
        ##
        "QMark"
      | 
        ##
        "Quotation_Mark"
      | 
        ##
        "Radical"
      | 
        ##
        "Regional_Indicator"
      | 
        ##
        "RI"
      | 
        ##
        "SB"
      | 
        ##
        "sc"
      | 
        ##
        "scf"
      | 
        ##
        "Script"
      | 
        ##
        "Script_Extensions"
      | 
        ##
        "scx"
      | 
        ##
        "SD"
      | 
        ##
        "Sentence_Break"
      | 
        ##
        "Sentence_Terminal"
      | 
        ##
        "Simple_Case_Folding"
      | 
        ##
        "Simple_Lowercase_Mapping"
      | 
        ##
        "Simple_Titlecase_Mapping"
      | 
        ##
        "Simple_Uppercase_Mapping"
      | 
        ##
        "slc"
      | 
        ##
        "Soft_Dotted"
      | 
        ##
        "stc"
      | 
        ##
        "STerm"
      | 
        ##
        "suc"
      | 
        ##
        "tc"
      | 
        ##
        "Term"
      | 
        ##
        "Terminal_Punctuation"
      | 
        ##
        "Titlecase_Mapping"
      | 
        ##
        "uc"
      | 
        ##
        "UIdeo"
      | 
        ##
        "Unicode_1_Name"
      | 
        ##
        "Unified_Ideograph"
      | 
        ##
        "Upper"
      | 
        ##
        "Uppercase"
      | 
        ##
        "Uppercase_Mapping"
      | 
        ##
        "Variation_Selector"
      | 
        ##
        "Vertical_Orientation"
      | 
        ##
        "vo"
      | 
        ##
        "VS"
      | 
        ##
        "WB"
      | 
        ##
        "White_Space"
      | 
        ##
        "Word_Break"
      | 
        ##
        "WSpace"
      | 
        ##
        "XID_Continue"
      | 
        ##
        "XID_Start"
      | 
        ##
        "XIDC"
      | 
        ##
        "XIDS"
      | 
        ##
        "XO_NFC"
      | 
        ##
        "XO_NFD"
      | 
        ##
        "XO_NFKC"
      | 
        ##
        "XO_NFKD"
    },
    
    ## specifies the value of a named Unicode property.
    attribute value { xsd:string },
    empty
  }
TEI_value =
  
  ## (value) contains a single value for some property, attribute, or other analysis. [5.2.1. Character Properties]
  element tei:value {
    TEI_macro.xtext, TEI_att.global.attributes, empty
  }
TEI_unicodeName =
  
  ## (Unicode property name) contains the name of a registered Unicode normative or informative property. [5.2.1. Character Properties]
  element tei:unicodeName {
    text,
    TEI_att.global.attributes,
    
    ## specifies the version number of the Unicode Standard in which this property name is defined.
    attribute version {
      xsd:token { pattern = "[\d]+(\.[\d]+){0,2}" }
    }?,
    empty
  }
TEI_localName =
  
  ## (locally-defined property name) contains a locally defined name for some property. [5.2.1. Character Properties]
  element tei:localName { text, TEI_att.global.attributes, empty }
TEI_glyphName =
  
  ## (character glyph name) contains the name of a glyph, expressed following Unicode conventions for character names. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:glyphName { text, TEI_att.global.attributes, empty }
TEI_charProp =
  
  ## (character property) provides a name and value for some property of the parent character or glyph. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:charProp {
    ((TEI_unicodeName | TEI_localName), TEI_value),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_charName =
  
  ## (character name) contains the name of a character, expressed following Unicode conventions. [5.2. Markup Constructs for Representation of Characters and Glyphs]
  element tei:charName { text, TEI_att.global.attributes, empty }
TEI_att.datable.custom.attributes =
  TEI_att.datable.custom.attribute.when-custom,
  TEI_att.datable.custom.attribute.notBefore-custom,
  TEI_att.datable.custom.attribute.notAfter-custom,
  TEI_att.datable.custom.attribute.from-custom,
  TEI_att.datable.custom.attribute.to-custom,
  TEI_att.datable.custom.attribute.datingPoint,
  TEI_att.datable.custom.attribute.datingMethod
TEI_att.datable.custom.attribute.when-custom =
  
  ## supplies the value of a date or time in some custom standard form.
  attribute when-custom {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.datable.custom.attribute.notBefore-custom =
  
  ## specifies the earliest possible date for the event in some custom standard form.
  attribute notBefore-custom {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.datable.custom.attribute.notAfter-custom =
  
  ## specifies the latest possible date for the event in some custom standard form.
  attribute notAfter-custom {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.datable.custom.attribute.from-custom =
  
  ## indicates the starting point of the period in some custom standard form.
  attribute from-custom {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.datable.custom.attribute.to-custom =
  
  ## indicates the ending point of the period in some custom standard form.
  attribute to-custom {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  }?
TEI_att.datable.custom.attribute.datingPoint =
  
  ## supplies a pointer to some location defining a named point in time with reference to which the datable item is understood to have occurred
  attribute datingPoint { xsd:anyURI }?
TEI_att.datable.custom.attribute.datingMethod =
  [
    a:documentation [
      "supplies a pointer to a "
      ns2:code [ "<calendar>" ]
      " element or other means of interpreting the values of the custom dating attributes."
    ]
  ]
  attribute datingMethod { xsd:anyURI }?
TEI_model.persNamePart =
  TEI_surname
  | TEI_forename
  | TEI_genName
  | TEI_nameLink
  | TEI_addName
  | TEI_roleName
  | TEI_persPronouns
TEI_model.persNamePart_alternation =
  TEI_surname
  | TEI_forename
  | TEI_genName
  | TEI_nameLink
  | TEI_addName
  | TEI_roleName
  | TEI_persPronouns
TEI_model.persNamePart_sequence =
  TEI_surname,
  TEI_forename,
  TEI_genName,
  TEI_nameLink,
  TEI_addName,
  TEI_roleName,
  TEI_persPronouns
TEI_model.persNamePart_sequenceOptional =
  TEI_surname?,
  TEI_forename?,
  TEI_genName?,
  TEI_nameLink?,
  TEI_addName?,
  TEI_roleName?,
  TEI_persPronouns?
TEI_model.persNamePart_sequenceOptionalRepeatable =
  TEI_surname*,
  TEI_forename*,
  TEI_genName*,
  TEI_nameLink*,
  TEI_addName*,
  TEI_roleName*,
  TEI_persPronouns*
TEI_model.persNamePart_sequenceRepeatable =
  TEI_surname+,
  TEI_forename+,
  TEI_genName+,
  TEI_nameLink+,
  TEI_addName+,
  TEI_roleName+,
  TEI_persPronouns+
TEI_att.datable.iso.attributes =
  TEI_att.datable.iso.attribute.when-iso,
  TEI_att.datable.iso.attribute.notBefore-iso,
  TEI_att.datable.iso.attribute.notAfter-iso,
  TEI_att.datable.iso.attribute.from-iso,
  TEI_att.datable.iso.attribute.to-iso
TEI_att.datable.iso.attribute.when-iso =
  
  ## supplies the value of a date or time in a standard form.
  attribute when-iso {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
    | xsd:token { pattern = "[0-9.,DHMPRSTWYZ/:+\-]+" }
  }?
TEI_att.datable.iso.attribute.notBefore-iso =
  
  ## specifies the earliest possible date for the event in standard form, e.g. yyyy-mm-dd.
  attribute notBefore-iso {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
    | xsd:token { pattern = "[0-9.,DHMPRSTWYZ/:+\-]+" }
  }?
TEI_att.datable.iso.attribute.notAfter-iso =
  
  ## specifies the latest possible date for the event in standard form, e.g. yyyy-mm-dd.
  attribute notAfter-iso {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
    | xsd:token { pattern = "[0-9.,DHMPRSTWYZ/:+\-]+" }
  }?
TEI_att.datable.iso.attribute.from-iso =
  
  ## indicates the starting point of the period in standard form.
  attribute from-iso {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
    | xsd:token { pattern = "[0-9.,DHMPRSTWYZ/:+\-]+" }
  }?
TEI_att.datable.iso.attribute.to-iso =
  
  ## indicates the ending point of the period in standard form.
  attribute to-iso {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
    | xsd:token { pattern = "[0-9.,DHMPRSTWYZ/:+\-]+" }
  }?
TEI_orgName =
  
  ## (organization name) contains an organizational name. [13.2.2. Organizational Names]
  element tei:orgName {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_persName =
  
  ## (personal name) contains a proper noun or proper-noun phrase referring to a person, possibly including one or more of the person's forenames, surnames, honorifics, added names, etc. [13.2.1. Personal Names]
  element tei:persName {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_surname =
  
  ## (surname) contains a family (inherited) name, as opposed to a given, baptismal, or nick name. [13.2.1. Personal Names]
  element tei:surname {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_forename =
  
  ## (forename) contains a forename, given or baptismal name. [13.2.1. Personal Names]
  element tei:forename {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_genName =
  
  ## (generational name component) contains a name component used to distinguish otherwise similar names on the basis of the relative ages or generations of the persons named. [13.2.1. Personal Names]
  element tei:genName {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_nameLink =
  
  ## (name link) contains a connecting phrase or link used within a name but not regarded as part of it, such as van der or of. [13.2.1. Personal Names]
  element tei:nameLink {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_addName =
  
  ## (additional name) contains an additional name component, such as a nickname, epithet, or alias, or any other descriptive phrase used within a personal name. [13.2.1. Personal Names]
  element tei:addName {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_roleName =
  
  ## (role name) contains a name component which indicates that the referent has a particular role or position in society, such as an official title or rank. [13.2.1. Personal Names]
  element tei:roleName {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_placeName =
  
  ## (place name) contains an absolute or relative place name. [13.2.3. Place Names]
  element tei:placeName {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_bloc =
  
  ## (bloc) contains the name of a geo-political unit consisting of two or more nation states or countries. [13.2.3. Place Names]
  element tei:bloc {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_country =
  
  ## (country) contains the name of a geo-political unit, such as a nation, country, colony, or commonwealth, larger than or administratively superior to a region and smaller than a bloc. [13.2.3. Place Names]
  element tei:country {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_region =
  
  ## (region) contains the name of an administrative unit such as a state, province, or county, larger than a settlement, but smaller than a country. [13.2.3. Place Names]
  element tei:region {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_settlement =
  
  ## (settlement) contains the name of a settlement such as a city, town, or village identified as a single geo-political or administrative unit. [13.2.3. Place Names]
  element tei:settlement {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_district =
  
  ## (district) contains the name of any kind of subdivision of a settlement, such as a parish, ward, or other administrative or geographic unit. [13.2.3. Place Names]
  element tei:district {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    empty
  }
TEI_offset =
  
  ## (offset) marks that part of a relative temporal or spatial expression which indicates the direction of the offset between the two place names, dates, or times involved in the expression. [13.2.3. Place Names]
  element tei:offset {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_geogName =
  
  ## (geographical name) identifies a name associated with some geographical feature such as Windrush Valley or Mount Sinai. [13.2.3. Place Names]
  element tei:geogName {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_geogFeat =
  
  ## (geographical feature name) contains a common noun identifying some geographical feature contained within a geographic name, such as valley, mount, etc. [13.2.3. Place Names]
  element tei:geogFeat {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_affiliation =
  
  ## (affiliation) contains an informal description of a person's present or past affiliation with some organization, for example an employer or sponsor. [15.2.2. The Participant Description]
  element tei:affiliation {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] sponsor; 2] recommend; 3] discredit; 4] pledged
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_age =
  
  ## (age) specifies the age of a person. [13.3.2.1. Personal Characteristics]
  element tei:age {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.dimensions.attributes,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] western; 2] sui; 3] subjective; 4] objective; 5] inWorld (in world); 6] chronological; 7] biological; 8] psychological; 9] functional
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies a numeric code representing the age or age group
    attribute value { xsd:nonNegativeInteger }?,
    empty
  }
TEI_birth =
  
  ## (birth) contains information about a person's birth, such as its date and place. [15.2.2. The Participant Description]
  element tei:birth {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.dimensions.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] caesarean (caesarean section); 2] vaginal (vaginal delivery); 3] exNihilo (ex nihilo); 4] incorporated; 5] founded; 6] established
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_climate =
  
  ## (climate) contains information about the physical climate of a place. [13.3.4.3. States, Traits, and Events]
  element tei:climate {
    (TEI_model.headLike*,
     (TEI_model.pLike+ | TEI_model.labelLike+),
     (TEI_model.noteLike | TEI_model.biblLike)*,
     TEI_climate*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_death =
  
  ## (death) contains information about a person's death, such as its date and place. [15.2.2. The Participant Description]
  element tei:death {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.dimensions.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] proclaimed; 2] assumed; 3] verified; 4] clinical; 5] brain; 6] natural; 7] unnatural; 8] fragmentation; 9] dissolution
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_education =
  
  ## (education) contains a description of the educational experience of a person. [15.2.2. The Participant Description]
  element tei:education {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] primary; 2] secondary; 3] undergraduate; 4] graduate; 5] residency; 6] apprenticeship
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_event =
  
  ## (event) contains data relating to any kind of significant event associated with a person, place, or organization. [13.3.1. Basic Principles]
  element tei:event {
    (TEI_idno*,
     TEI_model.headLike*,
     (TEI_model.pLike+ | TEI_model.labelLike+),
     (TEI_model.noteLike
      | TEI_model.biblLike
      | TEI_linkGrp
      | TEI_link
      | TEI_idno
      | TEI_ptr)*,
     TEI_event*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attributes,
    TEI_att.naming.attributes,
    TEI_att.sortable.attributes,
    [
      a:documentation [
        "indicates the location of an event by pointing to a "
        ns2:code [ "<place>" ]
        " element"
      ]
    ]
    attribute where { xsd:anyURI }?,
    empty
  }
TEI_faith =
  
  ## (faith) specifies the faith, religion, or belief set of a person. [13.3.2.1. Personal Characteristics]
  element tei:faith {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.canonical.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] practicing; 2] clandestine; 3] patrilineal; 4] matrilineal; 5] convert
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_floruit =
  
  ## (floruit) contains information about a person's period of activity. [13.3.2.1. Personal Characteristics]
  element tei:floruit {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.dimensions.attributes,
    TEI_att.editLike.attributes,
    empty
  }
TEI_geo =
  
  ## (geographical coordinates) contains any expression of a set of geographic coordinates, representing a point, line, or area on the surface of the earth in some notation. [13.3.4.1. Varieties of Location]
  element tei:geo {
    text, TEI_att.global.attributes, TEI_att.declaring.attributes, empty
  }
TEI_langKnowledge =
  [
    a:documentation [
      "(language knowledge) summarizes the state of a person's linguistic knowledge, either as prose or by a list of "
      ns2:code [ "<langKnown>" ]
      " elements. [13.3.2.1. Personal Characteristics]"
    ]
  ]
  element tei:langKnowledge {
    (TEI_model.pLike | TEI_langKnown+),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] listening; 2] speaking; 3] reading; 4] writing
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies one or more valid language tags for the languages specified
    attribute tags {
      list {
        (xsd:language
         | (
            ##
            ""))+
      }
    }?,
    empty
  }
TEI_langKnown =
  
  ## (language known) summarizes the state of a person's linguistic competence, i.e., knowledge of a single language. [15.2.2. The Participant Description]
  element tei:langKnown {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    
    ## supplies a valid language tag for the language concerned.
    attribute tag {
      xsd:language
      | (
         ##
         "")
    },
    
    ## a code indicating the person's level of knowledge for this language
    attribute level {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_listOrg =
  
  ## (list of organizations) contains a list of elements, each of which provides information about an identifiable organization. [13.2.2. Organizational Names]
  element tei:listOrg {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     ((TEI_org | TEI_listOrg)+, (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_listEvent =
  
  ## (list of events) contains a list of descriptions, each of which provides information about an identifiable event. [13.3.1. Basic Principles]
  element tei:listEvent {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     (TEI_model.eventLike+, (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_listPerson =
  
  ## (list of persons) contains a list of descriptions, each of which provides information about an identifiable person or a group of people, for example the participants in a language interaction, or the people referred to in a historical source. [13.3.2. The Person Element 15.2. Contextual Information 2.4. The Profile Description 15.3.2. Declarable Elements]
  element tei:listPerson {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     ((TEI_model.personLike | TEI_listPerson)+,
      (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_listPlace =
  
  ## (list of places) contains a list of places, optionally followed by a list of relationships (other than containment) defined amongst them. [2.2.7. The Source Description 13.3.4. Places]
  element tei:listPlace {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     ((TEI_model.placeLike | TEI_listPlace)+,
      (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_listRelation =
  
  ## provides information about relationships identified amongst people, places, and organizations, either informally as prose or as formally expressed relation links. [13.3.2.3. Personal Relationships]
  element tei:listRelation {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_model.pLike | (TEI_relation | TEI_listRelation)+)),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_location =
  
  ## (location) defines the location of a place as a set of geographical coordinates, in terms of other named geo-political entities, or as an address. [13.3.4. Places]
  element tei:location {
    (TEI_model.labelLike
     | TEI_model.placeNamePart
     | TEI_model.offsetLike
     | TEI_model.measureLike
     | TEI_model.addressLike
     | TEI_model.noteLike
     | TEI_model.biblLike)*,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    empty
  }
TEI_nationality =
  
  ## (nationality) contains an informal description of a person's present or past nationality or citizenship. [15.2.2. The Participant Description]
  element tei:nationality {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] birth; 2] naturalised; 3] self-assigned
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_occupation =
  
  ## (occupation) contains an informal description of a person's trade, profession or occupation. [15.2.2. The Participant Description]
  element tei:occupation {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] primary; 2] other; 3] paid; 4] unpaid
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    [
      a:documentation [
        "indicates the classification system or taxonomy in use, for example by supplying the identifier of a "
        ns2:code [ "<taxonomy>" ]
        " element, or pointing to some other resource."
      ]
    ]
    attribute scheme { xsd:anyURI }?,
    [
      a:documentation [
        "identifies an occupation code defined within the classification system or taxonomy defined by the "
        ns2:code [ "@scheme" ]
        " attribute."
      ]
    ]
    attribute code { xsd:anyURI }?,
    empty
  }
TEI_org =
  
  ## (organization) provides information about an identifiable organization such as a business, a tribe, or any other grouping of people. [13.3.3. Organizational Data]
  element tei:org {
    (TEI_model.headLike*,
     (TEI_model.pLike*
      | (TEI_model.labelLike
         | TEI_model.nameLike
         | TEI_model.placeLike
         | TEI_model.orgPart
         | TEI_model.milestoneLike)*),
     (TEI_model.noteLike
      | TEI_model.biblLike
      | TEI_linkGrp
      | TEI_link
      | TEI_ptr)*,
     TEI_model.personLike*),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.editLike.attributes,
    TEI_att.sortable.attributes,
    
    ## specifies a primary role or classification for the organization.
    attribute role {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    empty
  }
TEI_person =
  
  ## (person) provides information about an identifiable individual, for example a participant in a language interaction, or a person referred to in a historical source. [13.3.2. The Person Element 15.2.2. The Participant Description]
  element tei:person {
    (TEI_model.pLike+
     | (TEI_model.personPart | TEI_model.global | TEI_ptr)*),
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.sortable.attributes,
    
    ## specifies a primary role or classification for the person.
    attribute role {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    
    ## specifies the sex of the person.
    attribute sex {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    
    ## specifies an age group for the person.
    attribute age {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_persona =
  
  ## provides information about one of the personalities identified for a given individual, where an individual has multiple personalities. [13.3.2. The Person Element]
  element tei:persona {
    (TEI_model.pLike+ | (TEI_model.personPart | TEI_model.global)*),
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.sortable.attributes,
    
    ## specifies a primary role or classification for the persona.
    attribute role {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    
    ## specifies the sex of the persona.
    attribute sex {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    
    ## specifies an age group for the persona.
    attribute age {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_personGrp =
  
  ## (personal group) describes a group of individuals treated as a single person for analytic purposes. [15.2.2. The Participant Description]
  element tei:personGrp {
    (TEI_model.pLike+ | (TEI_model.personPart | TEI_model.global)*),
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    
    ## specifies the role of this group of participants in the interaction.
    attribute role {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## specifies the sex of the participant group.
    attribute sex {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    
    ## specifies the age group of the participants.
    attribute age {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## describes informally the size or approximate size of the group for example by means of a number and an indication of accuracy e.g. approx 200.
    attribute size {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    empty
  }
TEI_persPronouns =
  
  ## (personal pronouns) indicates the personal pronouns used, or assumed to be used, by the individual being described. [13.3.2.1. Personal Characteristics]
  element tei:persPronouns {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.typed.attributes,
    
    ## (evidence) indicates support for the listed personal pronouns.
    ## Suggested values include: 1] conjecture (conjecture); 2] selfIdentification (self identification); 3] trustedThirdParty (trusted third party)
    attribute evidence {
      
      ## (conjecture) The given value was selected based on assumptions by someone besides the person to whom this pronoun applies. As a result, the value may be erroneous.
      "conjecture"
      | 
        ## (self identification) The given value has been explicitly stated or confirmed by the person to whom this pronoun applies.
        "selfIdentification"
      | 
        ## (trusted third party) The given value has been supplied by another individual trusted by the encoder to know the preferences of the person to whom this pronoun applies.
        "trustedThirdParty"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## (value) supplies a regularized value for personal pronouns.
    ## Sample values include: 1] e (e); 2] he (he); 3] she (she); 4] they (they)
    attribute value {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    empty
  }
TEI_place =
  
  ## (place) contains data about a geographic location [13.3.4. Places]
  element tei:place {
    (TEI_model.headLike*,
     (TEI_model.pLike*
      | (TEI_model.labelLike
         | TEI_model.placeStateLike
         | TEI_model.eventLike
         | TEI_name)*),
     (TEI_model.noteLike
      | TEI_model.biblLike
      | TEI_idno
      | TEI_ptr
      | TEI_linkGrp
      | TEI_link)*,
     (TEI_model.placeLike | TEI_listPlace)*),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.editLike.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_population =
  
  ## (population) contains information about the population of a place. [13.3.4.3. States, Traits, and Events]
  element tei:population {
    (TEI_model.headLike*,
     ((TEI_model.pLike+ | TEI_model.labelLike+),
      (TEI_model.noteLike | TEI_model.biblLike)*)?,
     TEI_population*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_relation =
  
  ## (relationship) describes any kind of relationship or linkage amongst a specified group of places, events, persons, objects or other items. [13.3.2.3. Personal Relationships]
  element tei:relation {
    (TEI_desc?)
    >> sch:pattern [
         id = "p5odds-relation-reforkeyorname-constraint-assert-16"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:relation"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "@ref or @key or @name"
             "One of the attributes  'name', 'ref' or 'key' must be supplied"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-relation-activemutual-constraint-report-14"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:relation"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@active and @mutual"
             "Only one of the attributes @active and @mutual may be supplied"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-relation-activepassive-constraint-report-15"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:relation"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@passive and not(@active)"
             "the attribute 'passive' may be supplied only if the attribute 'active' is supplied"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.canonical.attributes,
    TEI_att.sortable.attributes,
    TEI_att.typed.attributes,
    
    ## supplies a name for the kind of relationship of which this is an instance.
    attribute name {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    (
     ## identifies the active participants in a non-mutual relationship, or all the participants in a mutual one.
     attribute active {
       list { xsd:anyURI+ }
     }?
     | 
       ## supplies a list of participants amongst all of whom the relationship holds equally.
       attribute mutual {
         list { xsd:anyURI+ }
       }?),
    
    ## identifies the passive participants in a non-mutual relationship.
    attribute passive {
      list { xsd:anyURI+ }
    }?,
    empty
  }
TEI_residence =
  
  ## (residence) describes a person's present or past places of residence. [15.2.2. The Participant Description]
  element tei:residence {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] primary; 2] secondary; 3] temporary; 4] permanent
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_sex =
  
  ## (sex) specifies the sex of a person. [13.3.2.1. Personal Characteristics]
  element tei:sex {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.editLike.attributes,
    TEI_att.datable.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] explicit; 2] implicit
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies a coded value for sex
    attribute value {
      list {
        xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
      }
    }?,
    empty
  }
TEI_socecStatus =
  
  ## (socio-economic status) contains an informal description of a person's perceived social or economic status. [15.2.2. The Participant Description]
  element tei:socecStatus {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## characterizes the element in some sense, using any convenient classification scheme or typology.
    ## Sample values include: 1] atBirth; 2] atDeath; 3] dependent; 4] inherited; 5] independent
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    [
      a:documentation [
        "identifies the classification system or taxonomy in use, for example by pointing to a locally-defined "
        ns2:code [ "<taxonomy>" ]
        " element or by supplying a URI for an externally-defined system."
      ]
    ]
    attribute scheme { xsd:anyURI }?,
    [
      a:documentation [
        "identifies a status code defined within the classification system or taxonomy defined by the "
        ns2:code [ "@scheme" ]
        " attribute."
      ]
    ]
    attribute code { xsd:anyURI }?,
    empty
  }
TEI_state =
  
  ## (state) contains a description of some status or quality attributed to a person, place, or organization often at some specific time or for a specific date range. [13.3.1. Basic Principles 13.3.2.1. Personal Characteristics]
  element tei:state {
    (TEI_state+
     | (TEI_model.headLike*,
        TEI_model.pLike+,
        (TEI_model.noteLike | TEI_model.biblLike)*)
     | (TEI_model.labelLike
        | TEI_model.noteLike
        | TEI_model.biblLike)*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.typed.attributes,
    TEI_att.naming.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_terrain =
  
  ## (terrain) contains information about the physical terrain of a place. [13.3.4.3. States, Traits, and Events]
  element tei:terrain {
    (TEI_model.headLike*,
     (TEI_model.pLike+ | TEI_model.labelLike+),
     (TEI_model.noteLike | TEI_model.biblLike)*,
     TEI_terrain*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_trait =
  
  ## (trait) contains a description of some status or quality attributed to a person, place, or organization typically, but not necessarily, independent of the volition or action of the holder and usually not at some specific time or for a specific date range. [13.3.1. Basic Principles 13.3.2.1. Personal Characteristics]
  element tei:trait {
    (TEI_trait+
     | (TEI_model.headLike*,
        TEI_model.pLike+,
        (TEI_model.noteLike | TEI_model.biblLike)*)
     | (TEI_model.labelLike
        | TEI_model.noteLike
        | TEI_model.biblLike)*),
    TEI_att.global.attributes,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.naming.attributes,
    TEI_att.typed.attributes,
    TEI_att.dimensions.attributes,
    empty
  }
TEI_objectName =
  
  ## (name of an object) contains a proper noun or noun phrase used to refer to an object. [13.2.4. Object Names]
  element tei:objectName {
    TEI_macro.phraseSeq,
    TEI_att.datable.attributes,
    TEI_att.editLike.attributes,
    TEI_att.global.attributes,
    TEI_att.personal.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_object =
  
  ## contains a description of a single identifiable physical object. [13.3.5. Objects]
  element tei:object {
    (TEI_objectIdentifier+,
     TEI_model.headLike*,
     (TEI_model.pLike* | empty),
     (TEI_model.noteLike
      | TEI_model.biblLike
      | TEI_linkGrp
      | TEI_link)*,
     TEI_object?),
    TEI_att.global.attributes,
    TEI_att.sortable.attributes,
    TEI_att.typed.attributes,
    TEI_att.declaring.attributes,
    TEI_att.docStatus.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_listObject =
  
  ## (list of objects) contains a list of descriptions, each of which provides information about an identifiable physical object. [13.3.5. Objects]
  element tei:listObject {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     (TEI_model.objectLike+, (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_objectIdentifier =
  
  ## (object identifier) groups one or more identifiers or pieces of locating information concerning a single object. [13.3.5. Objects]
  element tei:objectIdentifier {
    ((TEI_model.placeNamePart
      | TEI_idno
      | TEI_objectName
      | TEI_address)*)
    >> sch:pattern [
         id =
           "p5odds-objectIdentifier-objectIdentifier_minimal-constraint-report-16"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:objectIdentifier"
           "\x{a}" ~
           "               "
           sch:report [
             test = "not(count(*) gt 0)"
             "An objectIdentifier must contain at minimum a single piece of locating or identifying information."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    empty
  }
TEI_nym =
  
  ## (canonical name) contains the definition for a canonical name or name component of any kind. [13.3.6. Names and Nyms]
  element tei:nym {
    (TEI_idno*, TEI_model.entryPart*, TEI_model.pLike*, TEI_nym*),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.sortable.attributes,
    
    ## points to constituent nyms
    attribute parts {
      list { xsd:anyURI+ }
    }?,
    empty
  }
TEI_listNym =
  
  ## (list of canonical names) contains a list of nyms, that is, standardized names for any thing. [13.3.6. Names and Nyms]
  element tei:listNym {
    (TEI_model.headLike*,
     TEI_desc*,
     (TEI_relation | TEI_listRelation)*,
     ((TEI_nym | TEI_listNym)+, (TEI_relation | TEI_listRelation)*)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declarable.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_TEI =
  [
    a:documentation [
      "(TEI document) contains a single TEI-conformant document, combining a single TEI header with one or more members of the model.resource class. Multiple "
      ns2:code [ "<TEI>" ]
      " elements may be combined within a "
      ns2:code [ "<TEI>" ]
      " (or "
      ns2:code [ "<teiCorpus>" ]
      ") element. [4. Default Text Structure 15.1. Varieties of Composite Text]"
    ]
  ]
  element tei:TEI {
    (TEI_teiHeader,
     ((TEI_model.resource+, TEI_TEI*) | TEI_TEI+))
    >> sch:pattern [
         id = "p5odds-TEI-must-have-attglobal-constraint-rule-16"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:elementSpec[not(@mode)]"
           "\x{a}" ~
           "                "
           sch:assert [
             test = "tei:classes/tei:memberOf[@key='att.global']"
             "Error: TEI element "
             sch:value-of [ select = "@ident" ]
             " must be member of att.global class"
           ]
           "\x{a}" ~
           "              "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:ns [ prefix = "tei" uri = "http://www.tei-c.org/ns/1.0" ]
    >> sch:ns [ prefix = "xs" uri = "http://www.w3.org/2001/XMLSchema" ]
    >> sch:ns [
         prefix = "rng"
         uri = "http://relaxng.org/ns/structure/1.0"
       ],
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## specifies the version number of the TEI Guidelines against which this document is valid.
    attribute version {
      xsd:token { pattern = "[\d]+(\.[\d]+){0,2}" }
    }?,
    empty
  }
TEI_text =
  
  ## (text) contains a single text of any kind, whether unitary or composite, for example a poem or drama, a collection of essays, a novel, a dictionary, or a corpus sample. [4. Default Text Structure 15.1. Varieties of Composite Text]
  element tei:text {
    (TEI_model.global*,
     (TEI_front, TEI_model.global*)?,
     (TEI_body | TEI_group),
     TEI_model.global*,
     (TEI_back, TEI_model.global*)?),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.typed.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_body =
  
  ## (text body) contains the whole body of a single unitary text, excluding any front or back matter. [4. Default Text Structure]
  element tei:body {
    (TEI_model.global*,
     (TEI_model.divTop, (TEI_model.global | TEI_model.divTop)*)?,
     (TEI_model.divGenLike,
      (TEI_model.global | TEI_model.divGenLike)*)?,
     ((TEI_model.divLike, (TEI_model.global | TEI_model.divGenLike)*)+
      | (TEI_model.div1Like,
         (TEI_model.global | TEI_model.divGenLike)*)+
      | ((TEI_model.common, TEI_model.global*)+,
         ((TEI_model.divLike,
           (TEI_model.global | TEI_model.divGenLike)*)+
          | (TEI_model.div1Like,
             (TEI_model.global | TEI_model.divGenLike)*)+)?)),
     (TEI_model.divBottom, TEI_model.global*)*),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_group =
  
  ## (group) contains the body of a composite text, grouping together a sequence of distinct texts (or groups of such texts) which are regarded as a unit for some purpose, for example the collected works of an author, a sequence of prose essays, etc. [4. Default Text Structure 4.3.1. Grouped Texts 15.1. Varieties of Composite Text]
  element tei:group {
    ((TEI_model.divTop | TEI_model.global)*,
     ((TEI_text | TEI_group),
      (TEI_text | TEI_group | TEI_model.global)*),
     TEI_model.divBottom*),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_floatingText =
  
  ## (floating text) contains a single text of any kind, whether unitary or composite, which interrupts the text containing it at any point and after which the surrounding text resumes. [4.3.2. Floating Texts]
  element tei:floatingText {
    (TEI_model.global*,
     (TEI_front, TEI_model.global*)?,
     (TEI_body | TEI_group),
     TEI_model.global*,
     (TEI_back, TEI_model.global*)?),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_div =
  
  ## (text division) contains a subdivision of the front, body, or back of a text. [4.1. Divisions of the Body]
  element tei:div {
    ((TEI_model.divTop | TEI_model.global)*,
     ((((TEI_model.divLike | TEI_model.divGenLike), TEI_model.global*)+
       | ((TEI_model.common, TEI_model.global*)+,
          ((TEI_model.divLike | TEI_model.divGenLike),
           TEI_model.global*)*)),
      (TEI_model.divBottom, TEI_model.global*)*)?)
    >> sch:pattern [
         id =
           "p5odds-div-abstractModel-structure-l-constraint-report-17"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:div"
           "\x{a}" ~
           "               "
           sch:report [
             test = "ancestor::tei:l"
             "\x{a}" ~
             "        Abstract model violation: Lines may not contain higher-level structural elements such as div.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id =
           "p5odds-div-abstractModel-structure-p-constraint-report-18"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:div"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "ancestor::tei:p or ancestor::tei:ab and not(ancestor::tei:floatingText)"
             "\x{a}" ~
             "        Abstract model violation: p and ab may not contain higher-level structural elements such as div.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.divLike.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.declaring.attributes,
    TEI_att.written.attributes,
    
    ##
    attribute type {
      
      ##
      "div1"
      | 
        ##
        "div2"
      | 
        ##
        "div3"
      | 
        ##
        "div4"
      | 
        ##
        "titlePageVerso"
      | 
        ##
        "Dedication"
      | 
        ##
        "section"
      | 
        ##
        "subsection"
      | 
        ##
        "subsubsection"
    }?,
    empty
  }
TEI_trailer =
  
  ## contains a closing title or footer appearing at the end of a division of a text. [4.2.4. Content of Textual Divisions 4.2. Elements Common to All Divisions]
  element tei:trailer {
    (text
     | TEI_lg
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.lLike
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.placement.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_byline =
  
  ## (byline) contains the primary statement of responsibility given for a work on its title page or at the head or end of the work. [4.2.2. Openers and Closers 4.5. Front Matter]
  element tei:byline {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_docAuthor
     | TEI_model.global)*,
    TEI_att.global.attributes,
    empty
  }
TEI_dateline =
  
  ## (dateline) contains a brief description of the place, date, time, etc. of production of a letter, newspaper story, or other work, prefixed or suffixed to it as a kind of heading or trailer. [4.2.2. Openers and Closers]
  element tei:dateline {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.global
     | TEI_docDate)*,
    TEI_att.global.attributes,
    empty
  }
TEI_argument =
  
  ## (argument) contains a formal list or prose description of the topics addressed by a subdivision of a text. [4.2. Elements Common to All Divisions 4.6. Title Pages]
  element tei:argument {
    ((TEI_model.global | TEI_model.headLike)*,
     (TEI_model.common, TEI_model.global*)+),
    TEI_att.global.attributes,
    empty
  }
TEI_epigraph =
  
  ## (epigraph) contains a quotation, anonymous or attributed, appearing at the start or end of a section or on a title page. [4.2.3. Arguments, Epigraphs, and Postscripts 4.2. Elements Common to All Divisions 4.6. Title Pages]
  element tei:epigraph {
    (TEI_model.common | TEI_model.global)*,
    TEI_att.global.attributes,
    empty
  }
TEI_opener =
  
  ## (opener) groups together dateline, byline, salutation, and similar phrases appearing as a preliminary group at the start of a division, especially of a letter. [4.2. Elements Common to All Divisions]
  element tei:opener {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_argument
     | TEI_byline
     | TEI_dateline
     | TEI_epigraph
     | TEI_salute
     | TEI_signed
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_closer =
  
  ## (closer) groups together salutations, datelines, and similar phrases appearing as a final group at the end of a division, especially of a letter. [4.2.2. Openers and Closers 4.2. Elements Common to All Divisions]
  element tei:closer {
    (text
     | TEI_model.gLike
     | TEI_signed
     | TEI_dateline
     | TEI_salute
     | TEI_model.phrase
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_salute =
  
  ## (salutation) contains a salutation or greeting prefixed to a foreword, dedicatory epistle, or other division of a text, or the salutation in the closing of a letter, preface, etc. [4.2.2. Openers and Closers]
  element tei:salute {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_signed =
  
  ## (signature) contains the closing salutation, etc., appended to a foreword, dedicatory epistle, or other division of a text. [4.2.2. Openers and Closers]
  element tei:signed {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_postscript =
  
  ## contains a postscript, e.g. to a letter. [4.2. Elements Common to All Divisions]
  element tei:postscript {
    ((TEI_model.global | TEI_model.divTopPart)*,
     TEI_model.common,
     (TEI_model.global | TEI_model.common)*,
     (TEI_model.divBottomPart, TEI_model.global*)*),
    TEI_att.global.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_titlePage =
  
  ## (title page) contains the title page of a text, appearing within the front or back matter. [4.6. Title Pages]
  element tei:titlePage {
    (TEI_model.global*,
     TEI_model.titlepagePart,
     (TEI_model.titlepagePart | TEI_model.global)*),
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## classifies the title page according to any convenient typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_docTitle =
  
  ## (document title) contains the title of a document, including all its constituents, as given on a title page. [4.6. Title Pages]
  element tei:docTitle {
    (TEI_model.global*, (TEI_titlePart, TEI_model.global*)+),
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_titlePart =
  
  ## (title part) contains a subsection or division of the title of a work, as indicated on a title page. [4.6. Title Pages]
  element tei:titlePart {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## (type) specifies the role of this subdivision of the title.
    ## Suggested values include: 1] main (main); 2] sub (subordinate); 3] alt (alternate); 4] short (short); 5] desc (descriptive)
    [ a:defaultValue = "main" ]
    attribute type {
      
      ## (main) main title of the work
      "main"
      | 
        ## (subordinate) subtitle of the work
        "sub"
      | 
        ## (alternate) alternative title of the work
        "alt"
      | 
        ## (short) abbreviated form of title
        "short"
      | 
        ## (descriptive) descriptive paraphrase of the work
        "desc"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_docAuthor =
  
  ## (document author) contains the name of the author of the document, as given on the title page (often but not always contained in a byline). [4.6. Title Pages]
  element tei:docAuthor {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    TEI_att.canonical.attributes,
    empty
  }
TEI_imprimatur =
  
  ## (imprimatur) contains a formal statement authorizing the publication of a work, sometimes required to appear on a title page or its verso. [4.6. Title Pages]
  element tei:imprimatur {
    TEI_macro.paraContent, TEI_att.global.attributes, empty
  }
TEI_docEdition =
  
  ## (document edition) contains an edition statement as presented on a title page of a document. [4.6. Title Pages]
  element tei:docEdition {
    TEI_macro.paraContent, TEI_att.global.attributes, empty
  }
TEI_docImprint =
  
  ## (document imprint) contains the imprint statement (place and date of publication, publisher name), as given (usually) at the foot of a title page. [4.6. Title Pages]
  element tei:docImprint {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_pubPlace
     | TEI_docDate
     | TEI_publisher
     | TEI_model.global)*,
    TEI_att.global.attributes,
    empty
  }
TEI_docDate =
  
  ## (document date) contains the date of a document, as given on a title page or in a dateline. [4.6. Title Pages]
  element tei:docDate {
    TEI_macro.phraseSeq,
    TEI_att.global.attributes,
    
    ## (when) gives the value of the date in standard form, i.e. YYYY-MM-DD.
    attribute when {
      xsd:date
      | xsd:gYear
      | xsd:gMonth
      | xsd:gDay
      | xsd:gYearMonth
      | xsd:gMonthDay
      | xsd:time
      | xsd:dateTime
    }?,
    empty
  }
TEI_front =
  
  ## (front matter) contains any prefatory matter (headers, abstracts, title page, prefaces, dedications, etc.) found at the start of a document, before the main body. [4.6. Title Pages 4. Default Text Structure]
  element tei:front {
    ((TEI_model.frontPart
      | TEI_model.pLike
      | TEI_model.pLike.front
      | TEI_model.global)*,
     (((TEI_model.div1Like,
        (TEI_model.div1Like | TEI_model.frontPart | TEI_model.global)*)
       | (TEI_model.divLike,
          (TEI_model.divLike
           | TEI_model.frontPart
           | TEI_model.global)*)),
      (TEI_model.divBottom,
       (TEI_model.divBottom | TEI_model.global)*)?)?),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_back =
  
  ## (back matter) contains any appendixes, etc. following the main part of a text. [4.7. Back Matter 4. Default Text Structure]
  element tei:back {
    ((TEI_model.frontPart
      | TEI_model.pLike.front
      | TEI_model.pLike
      | TEI_model.listLike
      | TEI_model.global)*,
     ((TEI_model.div1Like,
       (TEI_model.frontPart | TEI_model.div1Like | TEI_model.global)*)
      | (TEI_model.divLike,
         (TEI_model.frontPart
          | TEI_model.divLike
          | TEI_model.global)*))?,
     (TEI_model.divBottomPart,
      (TEI_model.divBottomPart | TEI_model.global)*)?),
    TEI_att.global.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_att.translatable.attributes =
  TEI_att.translatable.attribute.versionDate
TEI_att.translatable.attribute.versionDate =
  
  ## specifies the date on which the source text was extracted and sent to the translator
  attribute versionDate {
    xsd:date { pattern = "(19[789][0-9]|[2-9][0-9]{3}).*" }
    | xsd:dateTime { pattern = "(19[789][0-9]|[2-9][0-9]{3}).*" }
  }?
sch:pattern [
  id =
    "p5odds-att.translatable-require-translatability-constraint-rule-17"
  "\x{a}" ~
  "      "
  sch:rule [
    context =
      "tei:elementSpec/tei:desc                                  | tei:elementSpec/tei:gloss                                  | tei:elementSpec/tei:remarks                                  | tei:classSpec/tei:desc                                  | tei:classSpec/tei:gloss                                  | tei:classSpec/tei:remarks                                  | tei:macroSpec/tei:desc                                  | tei:macroSpec/tei:gloss                                  | tei:macroSpec/tei:remarks                                  | tei:attDef/tei:desc                                  | tei:attDef/tei:gloss                                  | tei:attDef/tei:remarks                                  | tei:valItem/tei:desc                                  | tei:valItem/tei:gloss                                  | tei:valItem/tei:remarks                                  | tei:moduleSpec/tei:desc                                  | tei:moduleSpec/tei:gloss                                  | tei:moduleSpec/tei:remarks                                  "
    "\x{a}" ~
    "                "
    sch:report [
      test = "not( @xml:lang and @versionDate )"
      "\x{a}" ~
      '                  Error: both the versionDate and xml:lang attributes on "'
      sch:name [ ]
      '" are required when it is a child of "'
      sch:value-of [ select = "local-name(..)" ]
      '".\x{a}' ~
      "                "
    ]
    "\x{a}" ~
    "              "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id =
    "p5odds-att.translatable-all-sibling-parent-desc-constraint-rule-18"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[tei:desc[@versionDate]]"
    "\x{a}" ~
    "                "
    sch:report [
      role = "nonfatal"
      test =
        "                                                   count( tei:desc )                                                   ne                                                   count( tei:desc[@versionDate] )                                                   "
      "\x{a}" ~
      "                  Error: sibling 'desc' elements with and without @versionDate.\x{a}" ~
      "                "
    ]
    "\x{a}" ~
    "              "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id =
    "p5odds-att.translatable-all-sibling-parent-gloss-constraint-rule-19"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[tei:gloss[@versionDate]]"
    "\x{a}" ~
    "                "
    sch:report [
      role = "nonfatal"
      test =
        "                                                   count( tei:gloss )                                                   ne                                                   count( tei:gloss[@versionDate] )                                                   "
      "\x{a}" ~
      "                  Error: sibling 'gloss' elements with and without @versionDate.\x{a}" ~
      "                "
    ]
    "\x{a}" ~
    "              "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id =
    "p5odds-att.translatable-all-sibling-parent-remarks-constraint-rule-20"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[tei:remarks[@versionDate]]"
    "\x{a}" ~
    "                "
    sch:report [
      role = "nonfatal"
      test =
        "                                                   count( tei:remarks )                                                   ne                                                   count( tei:remarks[@versionDate] )                                                   "
      "\x{a}" ~
      "                  Error: sibling 'remarks' elements with and without @versionDate.\x{a}" ~
      "                "
    ]
    "\x{a}" ~
    "              "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id =
    "p5odds-att.translatable-all-sibling-parent-valDesc-constraint-rule-21"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[tei:valDesc[@versionDate]]"
    "\x{a}" ~
    "                "
    sch:report [
      role = "nonfatal"
      test =
        "                                                   count( tei:valDesc )                                                   ne                                                   count( tei:valDesc[@versionDate] )                                                   "
      "\x{a}" ~
      "                  Error: sibling 'valDesc' elements with and without @versionDate.\x{a}" ~
      "                "
    ]
    "\x{a}" ~
    "              "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.predicate.attributes = TEI_att.predicate.attribute.predicate
TEI_att.predicate.attribute.predicate =
  
  ## the condition under which the element bearing this attribute applies, given as an XPath predicate expression.
  attribute predicate { text }?
TEI_att.repeatable.attributes =
  TEI_att.repeatable.attribute.minOccurs,
  TEI_att.repeatable.attribute.maxOccurs
TEI_att.repeatable.attribute.minOccurs =
  
  ## (minimum number of occurences) indicates the smallest number of times this component may occur.
  [ a:defaultValue = "1" ]
  attribute minOccurs { xsd:nonNegativeInteger }?
TEI_att.repeatable.attribute.maxOccurs =
  
  ## (maximum number of occurences) indicates the largest number of times this component may occur.
  [ a:defaultValue = "1" ]
  attribute maxOccurs {
    xsd:nonNegativeInteger
    | (
       ##
       "unbounded")
  }?
sch:pattern [
  id = "p5odds-att.repeatable-MINandMAXoccurs-constraint-rule-22"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[ @minOccurs  and  @maxOccurs ]"
    "\x{a}" ~
    "        "
    sch:let [ name = "min" value = "@minOccurs cast as xs:integer" ]
    "\x{a}" ~
    "        "
    sch:let [
      name = "max"
      value =
        "if ( normalize-space( @maxOccurs ) eq 'unbounded')                         then -1                         else @maxOccurs cast as xs:integer"
    ]
    "\x{a}" ~
    "        "
    sch:assert [
      test = "$max eq -1  or  $max ge $min"
      "@maxOccurs should be greater than or equal to @minOccurs"
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "      "
  sch:rule [
    context = "*[ @minOccurs  and  not( @maxOccurs ) ]"
    "\x{a}" ~
    "        "
    sch:assert [
      test = "@minOccurs cast as xs:integer lt 2"
      "When @maxOccurs is not specified, @minOccurs must be 0 or 1"
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
TEI_model.contentPart =
  TEI_classRef
  | TEI_elementRef
  | TEI_macroRef
  | TEI_sequence
  | TEI_alternate
  | TEI_dataRef
  | TEI_textNode
  | TEI_anyElement
  | TEI_empty
TEI_att.combinable.attributes =
  TEI_att.deprecated.attributes, TEI_att.combinable.attribute.mode
TEI_att.combinable.attribute.mode =
  
  ## specifies the effect of this declaration on its parent object.
  [ a:defaultValue = "add" ]
  attribute mode {
    
    ## this declaration is added to the current definitions
    "add"
    | 
      ## if present already, the whole of the declaration for this object is removed from the current setup
      "delete"
    | 
      ## this declaration changes the declaration of the same name in the current definition
      "change"
    | 
      ## this declaration replaces the declaration of the same name in the current definition
      "replace"
  }?
TEI_att.identified.attributes =
  TEI_att.combinable.attributes,
  TEI_att.identified.attribute.module,
  TEI_att.identified.attribute.ident,
  TEI_att.identified.attribute.predeclare
TEI_att.identified.attribute.module =
  
  ##
  attribute module {
    
    ##
    "tei"
    | 
      ##
      "core"
    | 
      ##
      "analysis"
    | 
      ##
      "certainty"
    | 
      ##
      "corpus"
    | 
      ##
      "dictionaries"
    | 
      ##
      "drama"
    | 
      ##
      "figures"
    | 
      ##
      "gaiji"
    | 
      ##
      "header"
    | 
      ##
      "iso-fs"
    | 
      ##
      "linking"
    | 
      ##
      "msdescription"
    | 
      ##
      "namesdates"
    | 
      ##
      "nets"
    | 
      ##
      "spoken"
    | 
      ##
      "textcrit"
    | 
      ##
      "textstructure"
    | 
      ##
      "transcr"
    | 
      ##
      "verse"
    | 
      ##
      "tagdocs"
  }?
TEI_att.identified.attribute.ident =
  
  ## supplies the identifier by which this element may be referenced.
  attribute ident { xsd:Name }
TEI_att.identified.attribute.predeclare =
  
  ## says whether this object should be predeclared in the tei infrastructure module.
  [ a:defaultValue = "false" ] attribute predeclare { xsd:boolean }?
sch:pattern [
  id = "p5odds-att.identified-spec-in-module-constraint-rule-24"
  "\x{a}" ~
  "      "
  sch:rule [
    context =
      "tei:elementSpec[@module]|tei:classSpec[@module]|tei:macroSpec[@module]"
    "\x{a}" ~
    "        "
    sch:assert [
      test =
        "         (not(ancestor::tei:schemaSpec | ancestor::tei:TEI | ancestor::tei:teiCorpus)) or         (not(@module) or          (not(//tei:moduleSpec) and not(//tei:moduleRef))  or         (//tei:moduleSpec[@ident = current()/@module]) or          (//tei:moduleRef[@key = current()/@module]))         "
      "\x{a}" ~
      "        Specification "
      sch:value-of [ select = "@ident" ]
      ': the value of the module attribute ("'
      sch:value-of [ select = "@module" ]
      '") \x{a}' ~
      "should correspond to an existing module, via a moduleSpec or\x{a}" ~
      "      moduleRef"
    ]
    "\x{a}" ~
    "      "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.deprecated.attributes = TEI_att.deprecated.attribute.validUntil
TEI_att.deprecated.attribute.validUntil =
  
  ## provides a date before which the construct being defined will not be removed.
  attribute validUntil { xsd:date }?
sch:pattern [
  id =
    "p5odds-att.deprecated-validUntil-deprecation-two-month-warning-constraint-rule-25"
  "\x{a}" ~
  "      "
  sch:rule [
    context = "tei:*[@validUntil]"
    "\x{a}" ~
    "            "
    sch:let [
      name = "advance_warning_period"
      value = "current-date() + xs:dayTimeDuration('P60D')"
    ]
    "\x{a}" ~
    "            "
    sch:let [
      name = "me_phrase"
      value =
        "if (@ident)                                                then concat('The ', @ident )                                                else concat('This ',                                                            local-name(.),                                                            ' of ',                                                            ancestor::tei:*[@ident][1]/@ident )"
    ]
    "\x{a}" ~
    "            "
    sch:assert [
      test = "@validUntil cast as xs:date  ge  current-date()"
      "\x{a}" ~
      "              "
      sch:value-of [
        select =
          "                  concat( $me_phrase,                          ' construct is outdated (as of ',                          @validUntil,                          '); ODD processors may ignore it, and its use is no longer supported'                        )"
      ]
      "\x{a}" ~
      "         "
    ]
    "\x{a}" ~
    "              "
    sch:assert [
      role = "nonfatal"
      test = "@validUntil cast as xs:date  ge  $advance_warning_period"
      "\x{a}" ~
      "                "
      sch:value-of [
        select =
          "concat( $me_phrase, ' construct becomes outdated on ', @validUntil )"
      ]
      "\x{a}" ~
      "              "
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
sch:pattern [
  id =
    "p5odds-att.deprecated-validUntil-deprecation-should-be-explained-constraint-rule-26"
  "\x{a}" ~
  "      "
  sch:rule [
    context =
      "tei:*[@validUntil][ not( self::valDesc | self::valList | self::defaultVal )]"
    "\x{a}" ~
    "            "
    sch:assert [
      test = "child::tei:desc[ @type eq 'deprecationInfo']"
      "\x{a}" ~
      "              A deprecated construct should include, whenever possible, an explanation, but this "
      sch:value-of [ select = "name(.)" ]
      ' does not have a child <desc type="deprecationInfo">'
    ]
    "\x{a}" ~
    "          "
  ]
  "\x{a}" ~
  "   "
]
TEI_att.namespaceable.attributes = TEI_att.namespaceable.attribute.ns
TEI_att.namespaceable.attribute.ns =
  
  ## (namespace) specifies the namespace to which this element belongs
  [ a:defaultValue = "http://www.tei-c.org/ns/1.0" ]
  attribute ns { xsd:anyURI }?
TEI_att =
  
  ## (attribute) contains the name of an attribute appearing within running text. [22. Documentation Elements]
  element tei:att {
    xsd:Name,
    TEI_att.global.attributes,
    
    ## (scheme) supplies an identifier for the scheme in which this name is defined.
    ## Sample values include: 1] TEI (Text Encoding Initiative); 2] DBK (Docbook); 3] XX (unknown); 4] imaginary (imaginary); 5] XHTML (XHTML); 6] XML (XML); 7] XI (XI)
    [ a:defaultValue = "TEI" ]
    attribute scheme {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_code =
  
  ## contains literal code from some formal language such as a programming language. [22.1.1. Phrase Level Terms]
  element tei:code {
    text,
    TEI_att.global.attributes,
    
    ## (formal language) a name identifying the formal language in which the code is expressed
    attribute lang {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_eg =
  
  ## (example) contains any kind of illustrative example. [22.5. Element Specifications 22.5.3. Attribute List Specification]
  element tei:eg {
    TEI_macro.phraseSeq
    >> sch:pattern [
         id =
           "p5odds-eg-no_leading_nor_trailing_new_newlines-constraint-report-24"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:eg"
           "\x{a}" ~
           "               "
           sch:report [
             test = "matches( .//text()[last()], '\x{a}" ~ "\s*$')"
             "trailing newline not allowed"
           ]
           "\x{a}" ~
           "               "
           sch:report [
             test = "matches( .//text()[1],      '^\s*\x{a}" ~ "')"
             "leading newline not allowed"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    empty
  }
TEI_egXML =
  [
    a:documentation [
      "(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the "
      ns2:code [ "<egXML>" ]
      " element functions as the root element. [22.1.1. Phrase Level Terms]"
    ]
  ]
  element teix:egXML {
    (text | TEI_egXML | anyElement-egXML)+,
    TEI_att.global.attributes,
    
    ## indicates the intended validity of the example with respect to a schema.
    [ a:defaultValue = "true" ]
    attribute valid {
      
      ## the example is intended to be fully valid, assuming that its root element, or a provided root element, could have been used as a possible root element in the schema concerned.
      "true"
      | 
        ## the example could be transformed into a valid document by inserting any number of valid attributes and child elements anywhere within it; or it is valid against a version of the schema concerned in which the provision of character data, list, element, or attribute values has been made optional.
        "feasible"
      | 
        ## the example is not intended to be valid, and contains deliberate errors.
        "false"
    }?,
    empty
  }
TEI_gi =
  
  ## (element name) contains the name (generic identifier) of an element. [22. Documentation Elements 22.5. Element Specifications]
  element tei:gi {
    xsd:Name,
    TEI_att.global.attributes,
    
    ##
    attribute scheme {
      
      ##
      "imaginary"
      | 
        ## (Extreme conference
        ##                   proceedings markup) 
        "extreme"
      | 
        ## (Docbook) 
        "DBK"
      | 
        ##
        "SMIL"
      | 
        ##
        "Schematron"
      | 
        ##
        "HTML"
      | 
        ##
        "SVG"
      | 
        ##
        "XHTML"
    }?,
    empty
  }
TEI_ident =
  [
    a:documentation [
      "(identifier) contains an identifier or name for an object of some kind in a formal language. "
      ns2:code [ "<ident>" ]
      " is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages. [22.1.1. Phrase Level Terms]"
    ]
  ]
  element tei:ident {
    text,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ##
    attribute type {
      
      ## (field used in a metadata standard) 
      "field"
      | 
        ## (general entity name) 
        "ge"
      | 
        ## (RELAX NG identifier) 
        "rng"
      | 
        ## (DTD fragment identifier) 
        "frag"
      | 
        ##
        "macro"
      | 
        ## (namespace) 
        "ns"
      | 
        ##
        "schema"
      | 
        ## (parameter entity name) 
        "pe"
      | 
        ##
        "datatype"
      | 
        ##
        "file"
      | 
        ##
        "module"
      | 
        ##
        "class"
    }?,
    empty
  }
TEI_tag =
  
  ## (tag) contains text of a complete start- or end-tag, possibly including attribute specifications, but excluding the opening and closing markup delimiter characters. [22. Documentation Elements]
  element tei:tag {
    text,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## indicates the type of XML tag intended
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies the name of the schema in which this tag is defined.
    ## Sample values include: 1] TEI (text encoding initiative); 2] DBK (docbook); 3] XX (unknown); 4] Schematron; 5] HTML
    [ a:defaultValue = "TEI" ]
    attribute scheme {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_val =
  
  ## (value) contains a single attribute value. [22. Documentation Elements 22.5.3. Attribute List Specification]
  element tei:val { text, TEI_att.global.attributes, empty }
TEI_specList =
  
  ## (specification list) marks where a list of descriptions is to be inserted into the prose documentation. [22.1.2. Element and Attribute Descriptions]
  element tei:specList {
    TEI_specDesc+, TEI_att.global.attributes, empty
  }
TEI_specDesc =
  
  ## (specification description) indicates that a description of the specified element, class, or macro should be included at this point within a document. [22.1.2. Element and Attribute Descriptions]
  element tei:specDesc {
    empty,
    TEI_att.global.attributes,
    
    ## (identifier) supplies the identifier of the documentary element or class for which a description is to be obtained.
    attribute key { xsd:Name },
    
    ## (attributes) supplies attribute names for which descriptions should additionally be obtained.
    attribute atts {
      list { xsd:Name* }
    }?,
    empty
  }
TEI_classRef =
  
  ## points to the specification for an attribute or model class which is to be included in a schema [22.6. Class Specifications]
  element tei:classRef {
    empty,
    TEI_att.global.attributes,
    TEI_att.repeatable.attributes,
    
    ## the identifier used for the required class within the source indicated.
    attribute key { xsd:NCName },
    
    ## indicates how references to this class within a content model should be interpreted.
    attribute expand {
      
      ## any one member of the class may appear
      "alternation"
      | 
        ## a single occurrence of all members of the class may appear in sequence
        "sequence"
      | 
        ## a single occurrence of one or more members of the class may appear in sequence 
        "sequenceOptional"
      | 
        ## one or more occurrences of one or more members of the class may appear in sequence. 
        "sequenceOptionalRepeatable"
      | 
        ## one or more occurrences of all members of the class may appear in sequence
        "sequenceRepeatable"
    }?,
    (
     ## supplies a list of class members which are to be included in the schema being defined.
     attribute include {
       list { xsd:NCName* }
     }?
     | 
       ## supplies a list of class members which are to be excluded from the schema being defined.
       attribute except {
         list { xsd:NCName* }
       }?),
    empty
  }
TEI_elementRef =
  
  ## points to the specification for some element which is to be included in a schema [22.2. Modules and Schemas]
  element tei:elementRef {
    empty,
    TEI_att.global.attributes,
    TEI_att.repeatable.attributes,
    
    ## the identifier used for the required element within the source indicated.
    attribute key { xsd:NCName },
    empty
  }
TEI_macroRef =
  
  ## points to the specification for some pattern which is to be included in a schema [22.7. Macro Specifications]
  element tei:macroRef {
    empty,
    TEI_att.global.attributes,
    
    ## the identifier used for the required pattern within the source indicated.
    attribute key { xsd:NCName },
    empty
  }
TEI_moduleRef =
  
  ## (module reference) references a module which is to be incorporated into a schema. [22.2. Modules and Schemas]
  element tei:moduleRef {
    (TEI_content?)
    >> sch:pattern [
         id = "p5odds-moduleRef-modref-constraint-rule-27"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:moduleRef"
           "\x{a}" ~
           "               "
           sch:report [
             test = "* and @key"
             "\x{a}" ~
             "Child elements of "
             sch:name [ ]
             " are only allowed when an external module is being loaded\x{a}" ~
             "        "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    (
     ## specifies a default prefix which will be prepended to all patterns from the imported module
     attribute prefix { xsd:NCName }?)
    >> sch:pattern [
         id =
           "p5odds-moduleRef-prefix-not-same-prefix-constraint-rule-28"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:moduleRef"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "//*[ not( generate-id(.) eq generate-id(      current() ) ) ]/@prefix = @prefix"
             "The prefix attribute\x{a}" ~
             "	    of "
             sch:name [ ]
             " should not match that of any other\x{a}" ~
             "	    element (it would defeat the purpose)"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    (
     ## supplies a list of the elements which are to be copied from the specified module into the schema being defined.
     attribute include {
       list { xsd:NCName* }
     }?
     | 
       ## supplies a list of the elements which are not to be copied from the specified module into the schema being defined.
       attribute except {
         list { xsd:NCName* }
       }?),
    (
     ## the name of a TEI module
     attribute key { xsd:NCName }?
     | 
       ## (uniform resource locator) refers to a non-TEI module of RELAX NG code by external location
       attribute url { xsd:anyURI }?),
    empty
  }
TEI_moduleSpec =
  
  ## (module specification) documents the structure, content, and purpose of a single module, i.e. a named and externally visible group of declarations. [22.2. Modules and Schemas]
  element tei:moduleSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_exemplum*,
     TEI_remarks?,
     TEI_listRef*),
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_schemaSpec =
  
  ## (schema specification) generates a TEI-conformant schema and documentation for it. [2.3. The Encoding Description 22.2. Modules and Schemas 23.5.1. Making a Unified ODD]
  element tei:schemaSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     (TEI_model.oddRef | TEI_model.oddDecl)*)
    >> sch:pattern [
         id =
           "p5odds-schemaSpec-deprecate_schemaSpec_in_bizarre_places-constraint-rule-29"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:schemaSpec|teix:schemaSpec"
           "\x{a}" ~
           "	              "
           sch:assert [
             test =
               "             parent::teix:egXML      | parent::tei:encodingDesc  | parent::teix:encodingDesc      | parent::tei:front         | parent::teix:front      | parent::tei:back          | parent::teix:back      | parent::tei:body          | parent::teix:body      | parent::tei:div           | parent::teix:div      | parent::tei:div1          | parent::teix:div1      | parent::tei:div2          | parent::teix:div2      | parent::tei:div3          | parent::teix:div3      | parent::tei:div4          | parent::teix:div4      | parent::tei:div5          | parent::teix:div5      | parent::tei:div6          | parent::teix:div6      | parent::tei:div7          | parent::teix:div7"
             role = "nonfatal"
             "WARNING: use of deprecated construct — the “schemaSpec” element will no longer be a valid child of “"
             sch:value-of [ select = "name(..)" ]
             "” as of 2021-10-23; instead, it should be a child of “front”, “body”, “back”, “encodingDesc”, or a division element."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    TEI_att.namespaceable.attributes,
    TEI_att.docStatus.attributes,
    
    ## specifies entry points to the schema, i.e. which patterns may be used as the root of documents conforming to it.
    [ a:defaultValue = "TEI" ]
    attribute start {
      list { xsd:Name+ }
    }?,
    
    ## specifies a default prefix which will be prepended to all patterns relating to TEI elements, unless otherwise stated.
    attribute prefix { xsd:NCName }?,
    
    ## (target language) specifies which language to use when creating the objects in a schema if names for elements or attributes are available in more than one language
    attribute targetLang {
      xsd:language
      | (
         ##
         "")
    }?,
    
    ## (documentation language) specifies which languages to use when creating documentation if the description for an element, attribute, class or macro is available in more than one language
    attribute docLang {
      list {
        (xsd:language
         | (
            ##
            ""))+
      }
    }?,
    
    ## (default namespace exclusions) provides a list of namespaces and/or prefixed element names to be excluded by default from anyName in RELAX NG schemas
    [ a:defaultValue = "http://www.tei-c.org/ns/1.0 teix:egXML" ]
    attribute defaultExceptions {
      list {
        (xsd:anyURI { pattern = "[^/]+:.*" }
         | xsd:Name { pattern = ".+:.+" })+
      }
    }?,
    empty
  }
TEI_specGrp =
  
  ## (specification group) contains any convenient grouping of specifications for use within the current module. [22.2. Modules and Schemas]
  element tei:specGrp {
    (TEI_model.oddDecl | TEI_model.oddRef | TEI_model.divPart)*,
    TEI_att.global.attributes,
    empty
  }
TEI_specGrpRef =
  [
    a:documentation [
      "(reference to a specification group) indicates that the declarations contained by the "
      ns2:code [ "<specGrp>" ]
      " referenced should be inserted at this point. [22.2. Modules and Schemas]"
    ]
  ]
  element tei:specGrpRef {
    empty,
    TEI_att.global.attributes,
    
    ## points at the specification group which logically belongs here.
    attribute target { xsd:anyURI },
    empty
  }
TEI_elementSpec =
  
  ## (element specification) documents the structure, content, and purpose of a single element type. [22.5. Element Specifications 22. Documentation Elements]
  element tei:elementSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_classes?,
     TEI_content?,
     TEI_valList?,
     TEI_constraintSpec*,
     TEI_attList?,
     (TEI_model | TEI_modelGrp | TEI_modelSequence)*,
     TEI_exemplum*,
     TEI_remarks*,
     TEI_listRef*),
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    TEI_att.namespaceable.attributes,
    
    ## specifies a default prefix which will be prepended to all patterns relating to the element, unless otherwise stated.
    attribute prefix { xsd:NCName }?,
    empty
  }
TEI_classSpec =
  
  ## (class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both. [22.3. Specification Elements 22.6. Class Specifications]
  element tei:classSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_classes?,
     TEI_constraintSpec*,
     TEI_attList?,
     TEI_exemplum*,
     TEI_remarks*,
     TEI_listRef*),
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    TEI_att.typed.attribute.subtype,
    
    ## indicates whether this is a model class or an attribute class
    attribute type {
      
      ## (content model) members of this class appear in the same content models
      "model"
      | 
        ## (attributes) members of this class share common attributes
        "atts"
    },
    
    ## indicates which alternation and sequence instantiations of a model class may be referenced. By default, all variations are permitted.
    attribute generate {
      list {
        (
         ## members of the class are alternatives
         "alternation"
         | 
           ## members of the class are to be provided in sequence
           "sequence"
         | 
           ## members of the class may be provided, in sequence, but are optional
           "sequenceOptional"
         | 
           ## members of the class may be provided one or more times, in sequence, but are optional.
           "sequenceOptionalRepeatable"
         | 
           ## members of the class may be provided one or more times, in sequence
           "sequenceRepeatable"),
        (
         ## members of the class are alternatives
         "alternation"
         | 
           ## members of the class are to be provided in sequence
           "sequence"
         | 
           ## members of the class may be provided, in sequence, but are optional
           "sequenceOptional"
         | 
           ## members of the class may be provided one or more times, in sequence, but are optional.
           "sequenceOptionalRepeatable"
         | 
           ## members of the class may be provided one or more times, in sequence
           "sequenceRepeatable")?,
        (
         ## members of the class are alternatives
         "alternation"
         | 
           ## members of the class are to be provided in sequence
           "sequence"
         | 
           ## members of the class may be provided, in sequence, but are optional
           "sequenceOptional"
         | 
           ## members of the class may be provided one or more times, in sequence, but are optional.
           "sequenceOptionalRepeatable"
         | 
           ## members of the class may be provided one or more times, in sequence
           "sequenceRepeatable")?,
        (
         ## members of the class are alternatives
         "alternation"
         | 
           ## members of the class are to be provided in sequence
           "sequence"
         | 
           ## members of the class may be provided, in sequence, but are optional
           "sequenceOptional"
         | 
           ## members of the class may be provided one or more times, in sequence, but are optional.
           "sequenceOptionalRepeatable"
         | 
           ## members of the class may be provided one or more times, in sequence
           "sequenceRepeatable")?,
        (
         ## members of the class are alternatives
         "alternation"
         | 
           ## members of the class are to be provided in sequence
           "sequence"
         | 
           ## members of the class may be provided, in sequence, but are optional
           "sequenceOptional"
         | 
           ## members of the class may be provided one or more times, in sequence, but are optional.
           "sequenceOptionalRepeatable"
         | 
           ## members of the class may be provided one or more times, in sequence
           "sequenceRepeatable")?
      }
    }?,
    empty
  }
TEI_dataSpec =
  
  ## (datatype specification) documents a datatype. [22.3. Specification Elements 22.7. Macro Specifications]
  element tei:dataSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     (TEI_content | TEI_valList)*,
     TEI_constraintSpec*,
     TEI_exemplum*,
     TEI_remarks*,
     TEI_listRef*),
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    empty
  }
TEI_macroSpec =
  
  ## (macro specification) documents the function and implementation of a pattern. [22.3. Specification Elements 22.7. Macro Specifications]
  element tei:macroSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     (TEI_content | TEI_valList)*,
     TEI_constraintSpec*,
     TEI_exemplum*,
     TEI_remarks*,
     TEI_listRef*),
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    empty
  }
TEI_remarks =
  
  ## (remarks) contains any commentary or discussion about the usage of an element, attribute, class, or entity not otherwise documented within the containing element. [22.5. Element Specifications 22.5.3. Attribute List Specification 22.6. Class Specifications 22.7. Macro Specifications]
  element tei:remarks {
    (TEI_model.pLike+)
    >> sch:pattern [
         id =
           "p5odds-remarks-only-one-remark-per-lang-constraint-rule-30"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:remarks[@xml:lang]"
           "\x{a}" ~
           "                "
           sch:let [ name = "langVal" value = "@xml:lang" ]
           "\x{a}" ~
           "                "
           sch:assert [
             test =
               "not(following-sibling::tei:remarks[@xml:lang=$langVal])"
             "\x{a}" ~
             "                  Error: There should only be one "
             sch:value-of [ select = "@ident" ]
             " element per \x{a}" ~
             "                  language. Merge the contents of multiple "
             sch:value-of [ select = "@ident" ]
             " elements\x{a}" ~
             "                  using separate p elements.\x{a}" ~
             "                "
           ]
           "\x{a}" ~
           "              "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.combinable.attributes,
    TEI_att.translatable.attributes,
    
    ## specifies the remark concerned.
    attribute ident { xsd:string }?,
    empty
  }
TEI_listRef =
  
  ## (list of references) supplies a list of significant references to places where this element is discussed, in the current document or elsewhere.
  element tei:listRef {
    (TEI_desc*, TEI_model.ptrLike+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_exemplum =
  
  ## (exemplum) groups an example demonstrating the use of an element along with optional paragraphs of commentary. [22.5. Element Specifications]
  element tei:exemplum {
    (TEI_model.pLike*, (TEI_egXML | TEI_eg), TEI_model.pLike*),
    TEI_att.global.attribute.xmlid,
    TEI_att.global.attribute.n,
    TEI_att.global.attribute.xmlbase,
    TEI_att.global.attribute.xmlspace,
    TEI_att.global.rendition.attribute.rend,
    TEI_att.global.rendition.attribute.style,
    TEI_att.global.rendition.attribute.rendition,
    TEI_att.global.linking.attribute.corresp,
    TEI_att.global.linking.attribute.synch,
    TEI_att.global.linking.attribute.sameAs,
    TEI_att.global.linking.attribute.copyOf,
    TEI_att.global.linking.attribute.next,
    TEI_att.global.linking.attribute.prev,
    TEI_att.global.linking.attribute.exclude,
    TEI_att.global.linking.attribute.select,
    TEI_att.global.responsibility.attribute.cert,
    TEI_att.global.responsibility.attribute.resp,
    TEI_att.global.source.attribute.source,
    TEI_att.typed.attributes,
    TEI_att.translatable.attributes,
    [
      a:documentation [
        "(language) indicates the language of the element content using a tag generated according to "
        ns2:a [
          href = "http://www.rfc-editor.org/rfc/bcp/bcp47.txt"
          "BCP 47"
        ]
        "."
      ]
    ]
    attribute xml:lang {
      xsd:language
      | (
         ##
         "")
    },
    empty
  }
TEI_classes =
  
  ## (classes) specifies all the classes of which the documented element or class is a member or subclass. [22.5. Element Specifications 22.6. Class Specifications]
  element tei:classes {
    TEI_memberOf*,
    TEI_att.global.attributes,
    
    ## specifies the effect of this declaration on its parent module.
    [ a:defaultValue = "replace" ]
    attribute mode {
      
      ## this declaration changes the declaration of the same name in the current definition
      "change"
      | 
        ## this declaration replaces the declaration of the same name in the current definition
        "replace"
    }?,
    empty
  }
TEI_memberOf =
  
  ## specifies class membership of the documented element or class. [22.4.3. Classification of Components]
  element tei:memberOf {
    TEI_macro.xtext,
    TEI_att.global.attributes,
    
    ## specifies the identifier for a class of which the documented element or class is a member or subclass
    attribute key { xsd:Name }?,
    
    ## specifies the effect of this declaration on its parent module.
    [ a:defaultValue = "add" ]
    attribute mode {
      
      ## this declaration is added to the current definitions
      "add"
      | 
        ## this declaration and all of its children are removed from the current setup
        "delete"
    }?,
    
    ## supplies the maximum number of times the element can occur in elements which use this model class in their content model
    attribute max {
      xsd:double
      | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
      | xsd:decimal
    }?,
    
    ## supplies the minumum number of times the element must occur in elements which use this model class in their content model
    attribute min {
      xsd:double
      | xsd:token { pattern = "(\-?[\d]+/\-?[\d]+)" }
      | xsd:decimal
    }?,
    empty
  }
TEI_equiv =
  
  ## (equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link. [3.4.1. Terms and Glosses 22.4.1. Description of Components]
  element tei:equiv {
    empty,
    TEI_att.global.attributes,
    TEI_att.internetMedia.attributes,
    TEI_att.predicate.attributes,
    
    ## a single word which follows the rules defining a legal XML name (see ), naming the underlying concept of which the parent is a representation.
    attribute name { xsd:Name }?,
    
    ## (uniform resource identifier) references the underlying concept of which the parent is a representation by means of some external identifier
    attribute uri { xsd:anyURI }?,
    
    ## references an external script which contains a method to transform instances of this element to canonical TEI
    attribute filter { xsd:anyURI }?,
    empty
  }
TEI_altIdent =
  
  ## (alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language. [3.4.1. Terms and Glosses 22.4.1. Description of Components]
  element tei:altIdent {
    text, TEI_att.global.attributes, TEI_att.typed.attributes, empty
  }
TEI_model =
  
  ## describes the processing intended for a specified element. [22.5.4.1. The TEI processing model]
  element tei:model {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_param*,
     TEI_outputRendition*)
    >> sch:pattern [
         id = "p5odds-model-no_dup_default_models-constraint-rule-31"
         "\x{a}" ~
         "            "
         sch:rule [
           context =
             "tei:model[ not( parent::tei:modelSequence ) ][ not( @predicate ) ]"
           "\x{a}" ~
           "               "
           sch:let [
             name = "output"
             value = "normalize-space( @output )"
           ]
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "following-sibling::tei:model                             [ not( @predicate )]                             [ normalize-space( @output ) eq $output ]"
             "\x{a}" ~
             "          There are 2 (or more) 'model' elements in this '"
             sch:value-of [ select = "local-name(..)" ]
             "'\x{a}" ~
             "          that have no predicate, but are targeted to the same output\x{a}" ~
             '          ("'
             sch:value-of [
               select = "( $output, parent::modelGrp/@output, 'all')[1]"
             ]
             '")'
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-model-no_dup_models-constraint-rule-32"
         "\x{a}" ~
         "            "
         sch:rule [
           context =
             "tei:model[ not( parent::tei:modelSequence ) ][ @predicate ]"
           "\x{a}" ~
           "               "
           sch:let [
             name = "predicate"
             value = "normalize-space( @predicate )"
           ]
           "\x{a}" ~
           "               "
           sch:let [
             name = "output"
             value = "normalize-space( @output )"
           ]
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "following-sibling::tei:model                             [ normalize-space( @predicate ) eq $predicate ]                             [ normalize-space( @output ) eq $output ]"
             "\x{a}" ~
             "          There are 2 (or more) 'model' elements in this\x{a}" ~
             "          '"
             sch:value-of [ select = "local-name(..)" ]
             "' that have\x{a}" ~
             "          the same predicate, and are targeted to the same output\x{a}" ~
             '          ("'
             sch:value-of [
               select = "( $output, parent::modelGrp/@output, 'all')[1]"
             ]
             '")'
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.predicate.attributes,
    
    ## names the process or function which this processing model uses in order to produce output.
    ## Suggested values include: 1] alternate; 2] anchor; 3] block; 4] body; 5] break; 6] cell; 7] cit; 8] document; 9] figure; 10] glyph; 11] graphic; 12] heading; 13] index; 14] inline; 15] link; 16] list; 17] listItem; 18] metadata; 19] note; 20] omit; 21] paragraph; 22] row; 23] section; 24] table; 25] text; 26] title
    attribute behaviour {
      
      ## support display of alternative visualisations, for example by displaying the preferred content, by displaying both in parallel, or by toggling between the two.
      "alternate"
      | 
        ## create an identifiable anchor point in the output.
        "anchor"
      | 
        ## create a block structure
        "block"
      | 
        ## create the body of a document.
        "body"
      | 
        ## create a line, column, or page break according to the value of type
        "break"
      | 
        ## create a table cell
        "cell"
      | 
        ## show the content, with an indication of the source
        "cit"
      | 
        ## start a new output document
        "document"
      | 
        ## make a figure with the title as caption
        "figure"
      | 
        ## show a character by looking up reference to a chardesc at the given URI
        "glyph"
      | 
        ## if url is present, uses it to display graphic, else display a placeholder image.
        "graphic"
      | 
        ## creates a heading. 
        "heading"
      | 
        ## generate list according to type.
        "index"
      | 
        ## creates inline element out of content
        "inline"
      | 
        ## create hyperlink
        "link"
      | 
        ## create a list. 
        "list"
      | 
        ## create a list item.
        "listItem"
      | 
        ## create metadata section
        "metadata"
      | 
        ## create a note, often out of line, depending on the value of place; could be margin, footnote, endnote, inline
        "note"
      | 
        ## do nothing, do not process children
        "omit"
      | 
        ## create a paragraph out of content.
        "paragraph"
      | 
        ## create a table row
        "row"
      | 
        ## create a new section of the output document
        "section"
      | 
        ## create a table
        "table"
      | 
        ## create literal text
        "text"
      | 
        ## create document title
        "title"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    },
    
    ## whether to obey any rendition attribute which is present.
    attribute useSourceRendition { xsd:boolean }?,
    
    ## the intended output.
    ## Sample values include: 1] web; 2] print; 3] plain
    attribute output {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## the name of a CSS class which should be associated with this element
    attribute cssClass {
      list { xsd:Name+ }
    }?,
    empty
  }
TEI_modelSequence =
  [
    a:documentation [
      "any sequence of model or "
      ns2:code [ "<modelSequence>" ]
      " elements which is to be processed as a single set of actions [22.5.4.7. Model sequence]"
    ]
  ]
  element tei:modelSequence {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     (TEI_model, TEI_model, TEI_model*))
    >> sch:pattern [
         id =
           "p5odds-modelSequence-no_outputs_nor_predicates_4_my_kids-constraint-report-30"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:modelSequence"
           "\x{a}" ~
           "               "
           sch:report [
             test = "tei:model[@output]"
             role = "warning"
             "The 'model' children\x{a}" ~
             "      of a 'modelSequence' element inherit the @output attribute of the\x{a}" ~
             "      parent 'modelSequence', and thus should not have their own"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    
    ## the condition under which this model applies given as an XPath Predicate Expression
    attribute predicate { text }?,
    
    ## whether to obey any rendition attribute which is present
    attribute useSourceRendition { xsd:boolean }?,
    
    ## the intended output method
    ## Suggested values include: 1] web; 2] print; 3] plaintext
    attribute output {
      
      ## the output is intended for presentation in a web format
      "web"
      | 
        ## the output is intended for presentation in a print format
        "print"
      | 
        ## the output is intended for presentation in a plain text format
        "plaintext"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_modelGrp =
  [
    a:documentation [
      "any grouping of "
      ns2:code [ "<model>" ]
      " or "
      ns2:code [ "<modelSequence>" ]
      " elements with a common output method [22.5.4.4. Model Contexts and Outputs]"
    ]
  ]
  element tei:modelGrp {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_outputRendition?,
     (TEI_modelSequence | TEI_model)+),
    TEI_att.global.attributes,
    
    ## whether to obey any rendition attribute which is present
    attribute useSourceRendition { xsd:boolean }?,
    
    ## the intended output method
    ## Suggested values include: 1] web; 2] print; 3] plaintext
    attribute output {
      
      ## the output is intended for presentation in a web format
      "web"
      | 
        ## the output is intended for presentation in a print format
        "print"
      | 
        ## the output is intended for presentation in a plain text format
        "plaintext"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_outputRendition =
  
  ## describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output.
  element tei:outputRendition {
    text,
    TEI_att.global.attributes,
    
    ## provides a way of defining pseudo-elements, that is, styling rules applicable to specific sub-portions of an element.
    ## Sample values include: 1] first-line; 2] first-letter; 3] before; 4] after
    attribute scope {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_paramList =
  
  ## list of parameter specifications
  element tei:paramList {
    TEI_paramSpec*, TEI_att.global.attributes, empty
  }
TEI_paramSpec =
  
  ## supplies specification for one parameter of a model behaviour [22.5.4.8. Defining a processing model]
  element tei:paramSpec {
    (TEI_model.glossLike | TEI_model.descLike)*,
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    empty
  }
TEI_param =
  
  ## provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content. [22.5.4.5. Behaviours and their parameters]
  element tei:param {
    empty,
    TEI_att.global.attributes,
    
    ## a name for the parameter being supplied
    ## Suggested values include: 1] alternate; 2] default; 3] height; 4] id; 5] label; 6] level; 7] link; 8] place; 9] type; 10] url; 11] width
    attribute name {
      [
        a:documentation [
          "when used with behaviour alternate, 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 "
          ns2:code [ "<choice>" ]
          " element."
        ]
      ]
      "alternate"
      | [
          a:documentation [
            "when used with behaviour alternate, 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 "
            ns2:code [ "<choice>" ]
            " element."
          ]
        ]
        "default"
      | 
        ## when used with behaviour graphic, a parameter of this name supplies a value for the height of the graphic e.g. "300px", "50%".
        "height"
      | 
        ## a parameter of this name should supply a unique identifier for the element being processed; as for example with the anchor behaviour
        "id"
      | 
        ## a parameter of this name should supply an expression to be used to label something, for example  for a page break or  for a footnote reference; typically used with the note or break behaviours
        "label"
      | 
        ## when used with the heading behaviour, a parameter of this name supplies a positive integer indicating the hierarchic level of a heading.
        "level"
      | 
        ## when used with the link behaviour, a parameter of this name should supply a URL to be used as the target of a link.
        "link"
      | 
        ## when used with the note 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"
        "place"
      | 
        ## 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 break behaviour) or the kind of index to be generated (if used with the index behaviour) etc.
        "type"
      | 
        ## when used with behaviour graphic, a parameter of this name supplies a a URL indicating the graphic intended.
        "url"
      | 
        ## when used with behaviour graphic, a parameter of this name supplies a value for the width of the graphic e.g. "400px", "70%".
        "width"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    },
    
    ## supplies an XPath expression which when evaluated provides the value for the parameter
    attribute value { text },
    empty
  }
TEI_content =
  
  ## (content model) contains a declaration of the intended content model for the element (or other construct) being specified. [22.5. Element Specifications]
  element tei:content {
    (TEI_valList | TEI_anyRelax+ | TEI_model.contentPart*),
    TEI_att.global.attributes,
    
    ## controls whether or not pattern names generated in the corresponding RELAX NG schema source are automatically prefixed to avoid potential nameclashes.
    [ a:defaultValue = "true" ]
    attribute autoPrefix {
      [
        a:documentation [
          "Each name referenced in e.g. an "
          ns2:code [ "<rng:ref>" ]
          " element within a content model is automatically prefixed by the value of the "
          ns2:code [ "@prefix" ]
          " attribute on the current "
          ns2:code [ "<schemaSpec>" ]
          "\x{a}" ~
          "                  "
        ]
      ]
      "true"
      | [
          a:documentation [
            "No prefixes are added: any prefix required by the value of the "
            ns2:code [ "@prefix" ]
            " attribute on the current "
            ns2:code [ "<schemaSpec>" ]
            " must therefore be supplied explicitly, as appropriate."
          ]
        ]
        "false"
    }?,
    empty
  }
TEI_sequence =
  
  ## indicates that the constructs referenced by its children form a sequence [22.5.1. Defining Content Models]
  element tei:sequence {
    (TEI_model.contentPart+)
    >> sch:pattern [
         id = "p5odds-sequence-sequencechilden-constraint-assert-26"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:sequence"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "count(*)>1"
             "The sequence element must have at least two child elements"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.repeatable.attributes,
    
    ## if true, indicates that the order in which component elements of a sequence appear in a document must correspond to the order in which they are given in the content model.
    attribute preserveOrder { xsd:boolean }?,
    empty
  }
TEI_alternate =
  
  ## indicates that the constructs referenced by its children form an alternation [22.5.1. Defining Content Models]
  element tei:alternate {
    ((TEI_valList | TEI_model.contentPart)+)
    >> sch:pattern [
         id = "p5odds-alternate-alternatechilden-constraint-assert-27"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:alternate"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "count(*)>1"
             "The alternate element must have at least two child elements"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.repeatable.attributes,
    empty
  }
TEI_constraint =
  
  ## (constraint rules) the formal rules of a constraint [22.5. Element Specifications]
  element tei:constraint {
    (text | anyElement-constraint)*, TEI_att.global.attributes, empty
  }
TEI_constraintSpec =
  
  ## (constraint on schema) contains a formal constraint, typically expressed in a rule-based schema language, to which a construct must conform in order to be considered valid [22.5. Element Specifications]
  element tei:constraintSpec {
    ((TEI_model.glossLike | TEI_model.descLike)*, TEI_constraint?)
    >> sch:ns [
         prefix = "s"
         uri = "http://www.ascc.net/xml/schematron"
       ]
    >> sch:pattern [
         id = "p5odds-constraintSpec-sch_no_more-constraint-report-31"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:constraintSpec"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "tei:constraint/s:*  and  @scheme = ('isoschematron','schematron')"
             "Rules\x{a}" ~
             "        in the Schematron 1.* language must be inside a constraintSpec\x{a}" ~
             "        with a value other than 'schematron' or 'isoschematron' on the\x{a}" ~
             "        scheme attribute"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:ns [
         prefix = "sch"
         uri = "http://purl.oclc.org/dsdl/schematron"
       ]
    >> sch:pattern [
         id = "p5odds-constraintSpec-isosch-constraint-report-32"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:constraintSpec"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "tei:constraint/sch:*  and  not( @scheme eq 'schematron')"
             "Rules\x{a}" ~
             "        in the ISO Schematron language must be inside a constraintSpec\x{a}" ~
             "        with the value 'schematron' on the scheme attribute"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:ns [
         prefix = "sch"
         uri = "http://purl.oclc.org/dsdl/schematron"
       ]
    >> sch:pattern [
         id = "p5odds-constraintSpec-needrules-constraint-rule-33"
         "\x{a}" ~
         "            "
         sch:rule [
           context =
             "tei:macroSpec/tei:constraintSpec[@scheme eq 'schematron']/tei:constraint"
           "\x{a}" ~
           "               "
           sch:report [
             test = "sch:assert|sch:report"
             "An ISO Schematron constraint specification for a macro should not\x{a}" ~
             "        have an 'assert' or 'report' element without a parent 'rule' element"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    TEI_att.typed.attribute.subtype,
    [
      a:documentation [
        "characterizes the "
        ns2:code [ "<constraintSpec>" ]
        " element in some sense; used to indicate when a "
        ns2:code [ "<constraintSpec>" ]
        " warns about a deprecated construct.\x{a}" ~
        "Suggested values include: 1] deprecationWarning"
      ]
    ]
    attribute type {
      
      ## Indicates that this constraint specification warns that some other construct in the schema is deprecated.
      "deprecationWarning"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## supplies the name of the language in which the constraints are defined
    ## Suggested values include: 1] schematron (ISO Schematron)
    attribute scheme {
      
      ## (ISO Schematron) 
      "schematron"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    },
    empty
  }
TEI_attList =
  [
    a:documentation [
      "(attribute list) contains documentation for all the attributes associated with this element, as a series of "
      ns2:code [ "<attDef>" ]
      " elements. [22.5. Element Specifications 22.6. Class Specifications]"
    ]
  ]
  element tei:attList {
    (TEI_attRef | TEI_attDef | TEI_attList)+,
    TEI_att.global.attributes,
    
    ## (organization) specifies whether all the attributes in the list are available (org="group") or only one of them (org="choice")
    [ a:defaultValue = "group" ]
    attribute org {
      
      ## grouped
      "group"
      | 
        ## alternated
        "choice"
    }?,
    empty
  }
TEI_attDef =
  
  ## (attribute definition) contains the definition of a single attribute. [22.5.3. Attribute List Specification]
  element tei:attDef {
    ((TEI_model.glossLike | TEI_model.descLike)*,
     TEI_datatype?,
     TEI_constraintSpec*,
     TEI_defaultVal?,
     (TEI_valList | TEI_valDesc+)?,
     TEI_exemplum*,
     TEI_remarks*)
    >> sch:ns [
         prefix = "teix"
         uri = "http://www.tei-c.org/ns/Examples"
       ]
    >> sch:pattern [
         id = "p5odds-attDef-attDefContents-constraint-assert-30"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:attDef"
           "\x{a}" ~
           "               "
           sch:assert [
             test =
               "ancestor::teix:egXML[@valid='feasible'] or @mode eq 'change' or @mode eq 'delete' or tei:datatype or tei:valList[@type='closed']"
             "Attribute: the definition of the @"
             sch:value-of [ select = "@ident" ]
             " attribute in the "
             sch:value-of [ select = "ancestor::*[@ident][1]/@ident" ]
             "\x{a}" ~
             "                  "
             sch:value-of [ select = "' '" ]
             "\x{a}" ~
             "                  "
             sch:value-of [
               select = "local-name(ancestor::*[@ident][1])"
             ]
             " should have a closed valList or a datatype"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-attDef-noDefault4Required-constraint-rule-34"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:attDef[@usage eq 'req']"
           "\x{a}" ~
           "	              "
           sch:report [
             test = "tei:defaultVal"
             "Since the @"
             sch:value-of [ select = "@ident" ]
             ' attribute is required, it will always be specified. Thus the default value (of "'
             sch:value-of [ select = "normalize-space(tei:defaultVal)" ]
             '") will never be used. Either change the definition of the attribute so it is not required ("rec" or "opt"), or remove the defaultVal element.'
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id =
           "p5odds-attDef-defaultIsInClosedList-twoOrMore-constraint-rule-35"
         "\x{a}" ~
         "            "
         sch:rule [
           context =
             "tei:attDef[   tei:defaultVal   and   tei:valList[@type eq 'closed']   and   tei:datatype[    @maxOccurs > 1    or    @minOccurs > 1    or    @maxOccurs = 'unbounded'    ]   ]"
           "\x{a}" ~
           "               "
           sch:assert [
             test =
               "     tokenize(normalize-space(tei:defaultVal),' ')     =     tei:valList/tei:valItem/@ident"
             "In the "
             sch:value-of [
               select = "local-name(ancestor::*[@ident][1])"
             ]
             " defining\x{a}" ~
             "        "
             sch:value-of [ select = "ancestor::*[@ident][1]/@ident" ]
             " the default value of the\x{a}" ~
             "        @"
             sch:value-of [ select = "@ident" ]
             " attribute is not among the closed list of possible\x{a}" ~
             "        values"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id =
           "p5odds-attDef-defaultIsInClosedList-one-constraint-rule-36"
         "\x{a}" ~
         "            "
         sch:rule [
           context =
             "tei:attDef[   tei:defaultVal   and   tei:valList[@type eq 'closed']   and   tei:datatype[    not(@maxOccurs)    or (    if ( @maxOccurs castable as xs:integer )     then ( @maxOccurs cast as xs:integer eq 1 )     else false()    )]   ]"
           "\x{a}" ~
           "               "
           sch:assert [
             test =
               "string(tei:defaultVal)      =      tei:valList/tei:valItem/@ident"
             "In the "
             sch:value-of [
               select = "local-name(ancestor::*[@ident][1])"
             ]
             " defining\x{a}" ~
             "        "
             sch:value-of [ select = "ancestor::*[@ident][1]/@ident" ]
             " the default value of the\x{a}" ~
             "        @"
             sch:value-of [ select = "@ident" ]
             " attribute is not among the closed list of possible\x{a}" ~
             "        values"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.identified.attributes,
    
    ## specifies the optionality of the attribute.
    [ a:defaultValue = "opt" ]
    attribute usage {
      
      ## (required) 
      "req"
      | 
        ## (recommended ) 
        "rec"
      | 
        ## (optional ) 
        "opt"
    }?,
    
    ## (namespace) specifies the namespace to which this attribute belongs
    attribute ns { xsd:anyURI }?,
    empty
  }
TEI_attRef =
  
  ## (attribute pointer) points to the definition of an attribute or group of attributes. [22.2. Modules and Schemas]
  element tei:attRef {
    empty,
    TEI_att.global.attributes,
    
    ## the name of the attribute class
    attribute class {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## the name of the attribute
    attribute name { xsd:Name }?,
    empty
  }
TEI_datatype =
  
  ## (datatype) specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language. [1.4.2. Datatype Specifications 22.5.3. Attribute List Specification]
  element tei:datatype {
    (TEI_dataRef | anyElement-datatype),
    TEI_att.global.attributes,
    
    ## (minimum number of occurences) indicates the minimum number of times this datatype may occur in an instance of the attribute being defined
    [ a:defaultValue = "1" ]
    attribute minOccurs { xsd:nonNegativeInteger }?,
    
    ## (maximum number of occurences) indicates the maximum number of times this datatype may occur in an instance of the attribute being defined
    [ a:defaultValue = "1" ]
    attribute maxOccurs {
      xsd:nonNegativeInteger
      | (
         ##
         "unbounded")
    }?,
    empty
  }
TEI_dataRef =
  
  ## identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification [22.5.3.1. Datatypes]
  element tei:dataRef {
    (TEI_dataFacet*)
    >> sch:pattern [
         id = "p5odds-dataRef-restrictDataFacet-constraint-rule-37"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:dataRef[tei:dataFacet]"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "@name"
             role = "nonfatal"
             "Data facets can only be specified for references to datatypes specified by\x{a}" ~
             "          XML Schemas: Part 2: Datatypes"
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-dataRef-restrictAttRestriction-constraint-rule-38"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:dataRef[tei:dataFacet]"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@restriction"
             role = "nonfatal"
             "The attribute restriction cannot be used when dataFacet elements are present."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id =
           "p5odds-dataRef-restrictAttResctrictionName-constraint-rule-39"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:dataRef"
           "\x{a}" ~
           "               "
           sch:report [
             test = "@restriction and not(@name)"
             role = "fatal"
             "The attribute restriction can only be used with a name attribute."
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    (
     ## the identifier used for this datatype specification
     attribute key { xsd:NCName }?
     | [
         a:documentation [
           "the name of a datatype in the list provided by "
           ns2:a [ href = "#XSD2" "XML Schemas: Part 2: Datatypes" ]
           "\x{a}" ~
           "                  "
         ]
       ]
       attribute name { xsd:NCName }?
     | 
       ## a pointer to a datatype defined in some datatype library
       attribute ref { xsd:anyURI }?),
    
    ## supplies a string representing a regular expression providing additional constraints on the strings used to represent values of this datatype
    attribute restriction { xsd:token }?,
    empty
  }
TEI_dataFacet =
  [
    a:documentation [
      "Restricts the value of the strings used to represent values of a datatype, according to "
      ns2:a [ href = "#XSD2" "XML Schemas: Part 2: Datatypes" ]
      ". [22.5.3.1. Datatypes]"
    ]
  ]
  element tei:dataFacet {
    empty,
    TEI_att.global.attributes,
    
    ## the name of the facet.
    attribute name {
      
      ##
      "length"
      | 
        ##
        "minLength"
      | 
        ##
        "maxLength"
      | 
        ##
        "pattern"
      | 
        ##
        "enumeration"
      | 
        ##
        "whiteSpace"
      | 
        ##
        "maxInclusive"
      | 
        ##
        "minInclusive"
      | 
        ##
        "maxExclusive"
      | 
        ##
        "minExclusive"
      | 
        ##
        "totalDigits"
      | 
        ##
        "fractionDigits"
    },
    
    ## the facet value.
    attribute value { xsd:string },
    empty
  }
TEI_defaultVal =
  
  ## (default value) specifies the default declared value for an attribute. [22.5.3. Attribute List Specification]
  element tei:defaultVal {
    text,
    TEI_att.global.attributes,
    TEI_att.combinable.attributes,
    empty
  }
TEI_valDesc =
  [
    a:documentation [
      "(value description) specifies any semantic or syntactic constraint on the value that an attribute may take, additional to the information carried by the "
      ns2:code [ "<datatype>" ]
      " element. [22.5.3. Attribute List Specification]"
    ]
  ]
  element tei:valDesc {
    TEI_macro.phraseSeq.limited,
    TEI_att.global.attributes,
    TEI_att.translatable.attributes,
    TEI_att.combinable.attributes,
    empty
  }
TEI_valItem =
  
  ## documents a single value in a predefined list of values. [22.5.3. Attribute List Specification]
  element tei:valItem {
    (TEI_model.glossLike*,
     (TEI_model.descLike+,
      (TEI_model.glossLike, TEI_model.descLike*)*,
      TEI_remarks*)?,
     TEI_paramList?),
    TEI_att.global.attributes,
    TEI_att.combinable.attributes,
    
    ## specifies the value concerned.
    attribute ident { xsd:string },
    empty
  }
TEI_valList =
  [
    a:documentation [
      "(value list) contains one or more "
      ns2:code [ "<valItem>" ]
      " elements defining possible values. [22.5.3. Attribute List Specification]"
    ]
  ]
  element tei:valList {
    TEI_valItem*,
    TEI_att.global.attributes,
    TEI_att.combinable.attributes,
    
    ## specifies the extensibility of the list of values specified.
    [ a:defaultValue = "open" ]
    attribute type {
      
      ## only the values specified are permitted.
      "closed"
      | 
        ## (semi-open) all the values specified should be supported, but other values are legal and software should have appropriate fallback processing for them.
        "semi"
      | 
        ## the values specified are sample values only.
        "open"
    }?,
    empty
  }
TEI_textNode =
  
  ## indicates the presence of a text node in a content model [22. Documentation Elements]
  element tei:textNode { empty, TEI_att.global.attributes, empty }
TEI_anyElement =
  
  ## indicates the presence of any elements in a content model [22. Documentation Elements]
  element tei:anyElement {
    empty,
    TEI_att.global.attributes,
    TEI_att.repeatable.attributes,
    
    ## supplies a list of namespaces to one of which the permitted elements must belong. 
    attribute require {
      list { xsd:anyURI+ }
    }?,
    
    ## supplies a list of namespaces or prefixed element names which are not permitted.
    attribute except {
      list {
        (xsd:anyURI { pattern = "[^/]+:.*" }
         | xsd:Name { pattern = ".+:.+" })+
      }
    }?,
    empty
  }
TEI_empty =
  
  ## indicates the presence of an empty node within a content model [22. Documentation Elements]
  element tei:empty { empty, TEI_att.global.attributes, empty }
TEI_model.entryLike = TEI_superEntry | TEI_entry | TEI_entryFree
TEI_att.entryLike.attributes =
  TEI_att.entryLike.attribute.type, TEI_att.typed.attribute.subtype
TEI_att.entryLike.attribute.type =
  
  ## indicates type of entry, in dictionaries with multiple types.
  ## Suggested values include: 1] main; 2] hom (homograph); 3] xref (cross reference); 4] affix; 5] abbr (abbreviation); 6] supplemental; 7] foreign
  [ a:defaultValue = "main" ]
  attribute type {
    
    ## a main entry (default).
    "main"
    | 
      ## (homograph) groups information relating to one homograph within an entry.
      "hom"
    | 
      ## (cross reference) a reduced entry whose only function is to point to another main entry (e.g. for forms of an irregular verb or for variant spellings: was pointing to be, or esthete to aesthete).
      "xref"
    | 
      ## an entry for a prefix, infix, or suffix.
      "affix"
    | 
      ## (abbreviation) an entry for an abbreviation.
      "abbr"
    | 
      ## a supplemental entry (for use in dictionaries which issue supplements to their main work in which they include updated information about entries).
      "supplemental"
    | 
      ## an entry for a foreign word in a monolingual dictionary.
      "foreign"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.lexicographic.attributes =
  TEI_att.datcat.attributes,
  TEI_att.lexicographic.attribute.expand,
  TEI_att.lexicographic.attribute.split,
  TEI_att.lexicographic.attribute.value,
  TEI_att.lexicographic.attribute.location,
  TEI_att.lexicographic.attribute.mergedIn,
  TEI_att.lexicographic.attribute.opt
TEI_att.lexicographic.attribute.expand =
  
  ## (expand) gives an expanded form of information presented more concisely in the dictionary
  attribute expand { xsd:string }?
TEI_att.lexicographic.attribute.split =
  
  ## (split) gives the list of split values for a merged form
  attribute split { xsd:string }?
TEI_att.lexicographic.attribute.value =
  
  ## (value) gives a value which lacks any realization in the printed source text.
  attribute value { xsd:string }?
TEI_att.lexicographic.attribute.location =
  [
    a:documentation [
      "(location) indicates an "
      ns2:code [ "<anchor>" ]
      " element typically elsewhere in the document, but possibly in another document, which is the original location of this component."
    ]
  ]
  attribute location { xsd:anyURI }?
TEI_att.lexicographic.attribute.mergedIn =
  
  ## (merged into) gives a reference to another element, where the original appears as a merged form.
  attribute mergedIn { xsd:anyURI }?
TEI_att.lexicographic.attribute.opt =
  
  ## (optional) indicates whether the element is optional or not
  [ a:defaultValue = "false" ] attribute opt { xsd:boolean }?
TEI_model.morphLike =
  TEI_gram
  | TEI_gen
  | TEI_number
  | TEI_case
  | TEI_per
  | TEI_tns
  | TEI_mood
  | TEI_iType
TEI_model.morphLike_alternation =
  TEI_gram
  | TEI_gen
  | TEI_number
  | TEI_case
  | TEI_per
  | TEI_tns
  | TEI_mood
  | TEI_iType
TEI_model.morphLike_sequence =
  TEI_gram,
  TEI_gen,
  TEI_number,
  TEI_case,
  TEI_per,
  TEI_tns,
  TEI_mood,
  TEI_iType
TEI_model.morphLike_sequenceOptional =
  TEI_gram?,
  TEI_gen?,
  TEI_number?,
  TEI_case?,
  TEI_per?,
  TEI_tns?,
  TEI_mood?,
  TEI_iType?
TEI_model.morphLike_sequenceOptionalRepeatable =
  TEI_gram*,
  TEI_gen*,
  TEI_number*,
  TEI_case*,
  TEI_per*,
  TEI_tns*,
  TEI_mood*,
  TEI_iType*
TEI_model.morphLike_sequenceRepeatable =
  TEI_gram+,
  TEI_gen+,
  TEI_number+,
  TEI_case+,
  TEI_per+,
  TEI_tns+,
  TEI_mood+,
  TEI_iType+
TEI_model.lexicalRefinement =
  TEI_gramGrp | TEI_pos | TEI_subc | TEI_colloc | TEI_usg | TEI_lbl
TEI_model.lexicalRefinement_alternation =
  TEI_gramGrp | TEI_pos | TEI_subc | TEI_colloc | TEI_usg | TEI_lbl
TEI_model.lexicalRefinement_sequence =
  TEI_gramGrp, TEI_pos, TEI_subc, TEI_colloc, TEI_usg, TEI_lbl
TEI_model.lexicalRefinement_sequenceOptional =
  TEI_gramGrp?, TEI_pos?, TEI_subc?, TEI_colloc?, TEI_usg?, TEI_lbl?
TEI_model.lexicalRefinement_sequenceOptionalRepeatable =
  TEI_gramGrp*, TEI_pos*, TEI_subc*, TEI_colloc*, TEI_usg*, TEI_lbl*
TEI_model.lexicalRefinement_sequenceRepeatable =
  TEI_gramGrp+, TEI_pos+, TEI_subc+, TEI_colloc+, TEI_usg+, TEI_lbl+
TEI_model.gramPart = TEI_model.morphLike | TEI_model.lexicalRefinement
TEI_model.formPart =
  TEI_model.gramPart
  | TEI_form
  | TEI_orth
  | TEI_pron
  | TEI_hyph
  | TEI_syll
  | TEI_stress
TEI_model.ptrLike.form = TEI_oRef | TEI_pRef
TEI_superEntry =
  
  ## (super entry) groups a sequence of entries within any kind of lexical resource, such as a dictionary or lexicon which function as a single unit, for example a set of homographs. [9.1. Dictionary Body and Overall Structure]
  element tei:superEntry {
    ((TEI_form?, TEI_entry+) | TEI_dictScrap),
    TEI_att.global.attributes,
    TEI_att.entryLike.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_entry =
  
  ## (entry) contains a single structured entry in any kind of lexical resource, such as a dictionary or lexicon. [9.1. Dictionary Body and Overall Structure 9.2. The Structure of Dictionary Entries]
  element tei:entry {
    (TEI_hom
     | TEI_sense
     | TEI_model.entryPart.top
     | TEI_model.global
     | TEI_model.ptrLike)+,
    TEI_att.global.attributes,
    TEI_att.entryLike.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_entryFree =
  
  ## (unstructured entry) contains a single unstructured entry in any kind of lexical resource, such as a dictionary or lexicon. [9.1. Dictionary Body and Overall Structure 9.2. The Structure of Dictionary Entries]
  element tei:entryFree {
    (text
     | TEI_model.gLike
     | TEI_model.entryPart
     | TEI_model.morphLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.entryLike.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.sortable.attributes,
    empty
  }
TEI_hom =
  
  ## (homograph) groups information relating to one homograph within an entry. [9.2. The Structure of Dictionary Entries]
  element tei:hom {
    (TEI_sense | TEI_model.entryPart.top | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_sense =
  
  ## groups together all information relating to one word sense in a dictionary entry, for example definitions, examples, and translation equivalents. [9.2. The Structure of Dictionary Entries]
  element tei:sense {
    (text
     | TEI_model.gLike
     | TEI_sense
     | TEI_model.entryPart.top
     | TEI_model.phrase
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    
    ## gives the nesting depth of this sense.
    attribute level { xsd:nonNegativeInteger }?,
    empty
  }
TEI_dictScrap =
  
  ## (dictionary scrap) encloses a part of a dictionary entry in which other phrase-level dictionary elements are freely combined. [9.1. Dictionary Body and Overall Structure 9.2. The Structure of Dictionary Entries]
  element tei:dictScrap {
    (text
     | TEI_model.gLike
     | TEI_model.entryPart
     | TEI_model.morphLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.global)*,
    TEI_att.global.attributes,
    empty
  }
TEI_form =
  
  ## (form information group) groups all the information on the written and spoken forms of one headword. [9.3.1. Information on Written and Spoken Forms]
  element tei:form {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.formPart
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    
    ## classifies form as simple, compound, etc.
    ## Suggested values include: 1] simple; 2] lemma; 3] variant; 4] compound; 5] derivative; 6] inflected; 7] phrase
    attribute type {
      
      ## single free lexical item
      "simple"
      | 
        ## the headword itself
        "lemma"
      | 
        ## a variant form
        "variant"
      | 
        ## word formed from simple lexical items
        "compound"
      | 
        ## word derived from headword
        "derivative"
      | 
        ## word in other than usual dictionary form
        "inflected"
      | 
        ## multiple-word lexical item
        "phrase"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_orth =
  
  ## (orthographic form) gives the orthographic form of a dictionary headword. [9.3.1. Information on Written and Spoken Forms]
  element tei:orth {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    TEI_att.partials.attributes,
    TEI_att.notated.attributes,
    
    ## gives the type of spelling.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_pron =
  
  ## (pronunciation) contains the pronunciation(s) of the word. [9.3.1. Information on Written and Spoken Forms]
  element tei:pron {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.notated.attributes,
    TEI_att.partials.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_hyph =
  
  ## (hyphenation) contains a hyphenated form of a dictionary headword, or hyphenation information in some other form. [9.3.1. Information on Written and Spoken Forms]
  element tei:hyph {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_syll =
  
  ## (syllabification) contains the syllabification of the headword. [9.3.1. Information on Written and Spoken Forms]
  element tei:syll {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_stress =
  
  ## (stress) contains the stress pattern for a dictionary headword, if given separately. [9.3.1. Information on Written and Spoken Forms]
  element tei:stress {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_gram =
  
  ## (grammatical information) within an entry in a dictionary or a terminological data file, contains grammatical information relating to a term, word, or form. [9.3.2. Grammatical Information]
  element tei:gram {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    [
      a:documentation [
        "classifies the grammatical information given according to some convenient typology—in the case of terminological information, preferably the dictionary of data element types specified in "
        ns2:a [ href = "http://www.isocat.org/" "ISO 12620" ]
        "."
      ]
    ]
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_gen =
  
  ## (gender) identifies the morphological gender of a lexical item, as given in the dictionary. [9.3.1. Information on Written and Spoken Forms]
  element tei:gen {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_number =
  
  ## (number) indicates grammatical number associated with a form, as given in a dictionary. [9.3.1. Information on Written and Spoken Forms 9.3.2. Grammatical Information]
  element tei:number {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_case =
  
  ## (case) contains grammatical case information given by a dictionary for a given form. [9.3.1. Information on Written and Spoken Forms]
  element tei:case {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_per =
  
  ## (person) contains an indication of the grammatical person (1st, 2nd, 3rd, etc.) associated with a given inflected form in a dictionary. [9.3.1. Information on Written and Spoken Forms]
  element tei:per {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_tns =
  
  ## (tense) indicates the grammatical tense associated with a given inflected form in a dictionary. [9.3.1. Information on Written and Spoken Forms]
  element tei:tns {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_mood =
  
  ## (mood) contains information about the grammatical mood of verbs (e.g. indicative, subjunctive, imperative). [9.3.1. Information on Written and Spoken Forms]
  element tei:mood {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_iType =
  
  ## (inflectional class) indicates the inflectional class associated with a lexical item. [9.3.1. Information on Written and Spoken Forms]
  element tei:iType {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    
    ## indicates the type of indicator used to specify the inflection class, when it is necessary to distinguish between the usual abbreviated indications (e.g. inv) and other kinds of indicators, such as special codes referring to conjugation patterns, etc.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_gramGrp =
  [
    a:documentation [
      "(grammatical information group) groups morpho-syntactic information about a lexical item, e.g. "
      ns2:code [ "<pos>" ]
      ", "
      ns2:code [ "<gen>" ]
      ", "
      ns2:code [ "<number>" ]
      ", "
      ns2:code [ "<case>" ]
      ", or "
      ns2:code [ "<iType>" ]
      " (inflectional class). [9.3.2. Grammatical Information]"
    ]
  ]
  element tei:gramGrp {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_model.gramPart
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_pos =
  
  ## (part of speech) indicates the part of speech assigned to a dictionary headword such as noun, verb, or adjective. [9.3.2. Grammatical Information]
  element tei:pos {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_subc =
  
  ## (subcategorization) contains subcategorization information (transitive/intransitive, countable/non-countable, etc.) [9.3.2. Grammatical Information]
  element tei:subc {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_colloc =
  
  ## (collocate) contains any sequence of words that co-occur with the headword with significant frequency. [9.3.2. Grammatical Information]
  element tei:colloc {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_def =
  
  ## (definition) contains definition text in a dictionary entry. [9.3.3.1. Definitions]
  element tei:def {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_etym =
  
  ## (etymology) encloses the etymological information in a dictionary entry. [9.3.4. Etymological Information]
  element tei:etym {
    (text
     | TEI_model.gLike
     | TEI_model.global
     | TEI_model.inter
     | TEI_model.phrase
     | TEI_def
     | TEI_etym
     | TEI_gramGrp
     | TEI_lbl
     | TEI_usg
     | TEI_xr)*,
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_lang =
  
  ## (language name) contains the name of a language mentioned in etymological or other linguistic discussion. [9.3.4. Etymological Information]
  element tei:lang {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    empty
  }
TEI_usg =
  
  ## (usage) contains usage information in a dictionary entry. [9.3.5.2. Usage Information and Other Labels]
  element tei:usg {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    
    ## classifies the usage information using any convenient typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_lbl =
  
  ## (label) contains a label for a form, example, translation, or other piece of information, e.g. abbreviation for, contraction of, literally, approximately, synonyms:, etc. [9.3.1. Information on Written and Spoken Forms 9.3.3.2. Translation Equivalents 9.3.5.3. Cross-References to Other Entries]
  element tei:lbl {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    
    ## classifies the label using any convenient typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_xr =
  
  ## (cross-reference phrase) contains a phrase, sentence, or icon referring the reader to some other location in this or another text. [9.3.5.3. Cross-References to Other Entries]
  element tei:xr {
    (text
     | TEI_model.gLike
     | TEI_model.phrase
     | TEI_model.inter
     | TEI_usg
     | TEI_lbl
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    
    ## indicates the type of cross reference, using any convenient typology.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_re =
  
  ## (related entry) contains a dictionary entry for a lexical item related to the headword, such as a compound phrase or derived form, embedded inside a larger entry. [9.3.6. Related Entries]
  element tei:re {
    (text
     | TEI_model.gLike
     | TEI_sense
     | TEI_model.entryPart.top
     | TEI_model.phrase
     | TEI_model.global)*,
    TEI_att.global.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_oRef =
  
  ## (orthographic-form reference) in a dictionary example, indicates a reference to the orthographic form(s) of the headword. [9.4. Headword and Pronunciation References]
  element tei:oRef {
    (text | TEI_model.gLike | TEI_oRef)*,
    TEI_att.global.attributes,
    TEI_att.typed.attribute.subtype,
    TEI_att.lexicographic.attributes,
    TEI_att.pointing.attributes,
    TEI_att.notated.attributes,
    
    ## indicates the kind of typographic modification made to the headword in the reference.
    attribute type {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    empty
  }
TEI_pRef =
  
  ## (pronunciation reference) in a dictionary example, indicates a reference to the pronunciation(s) of the headword. [9.4. Headword and Pronunciation References]
  element tei:pRef {
    (text | TEI_model.gLike | TEI_pRef)*,
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    TEI_att.lexicographic.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_att.global.linking.attributes =
  TEI_att.global.linking.attribute.corresp,
  TEI_att.global.linking.attribute.synch,
  TEI_att.global.linking.attribute.sameAs,
  TEI_att.global.linking.attribute.copyOf,
  TEI_att.global.linking.attribute.next,
  TEI_att.global.linking.attribute.prev,
  TEI_att.global.linking.attribute.exclude,
  TEI_att.global.linking.attribute.select
TEI_att.global.linking.attribute.corresp =
  
  ## (corresponds) points to elements that correspond to the current element in some way.
  attribute corresp {
    list { xsd:anyURI+ }
  }?
TEI_att.global.linking.attribute.synch =
  
  ## (synchronous) points to elements that are synchronous with the current element.
  attribute synch {
    list { xsd:anyURI+ }
  }?
TEI_att.global.linking.attribute.sameAs =
  
  ## points to an element that is the same as the current element.
  attribute sameAs { xsd:anyURI }?
TEI_att.global.linking.attribute.copyOf =
  
  ## points to an element of which the current element is a copy.
  attribute copyOf { xsd:anyURI }?
TEI_att.global.linking.attribute.next =
  
  ## points to the next element of a virtual aggregate of which the current element is part.
  attribute next { xsd:anyURI }?
TEI_att.global.linking.attribute.prev =
  
  ## (previous) points to the previous element of a virtual aggregate of which the current element is part.
  attribute prev { xsd:anyURI }?
TEI_att.global.linking.attribute.exclude =
  
  ## points to elements that are in exclusive alternation with the current element.
  attribute exclude {
    list { xsd:anyURI+ }
  }?
TEI_att.global.linking.attribute.select =
  
  ## selects one or more alternants; if one alternant is selected, the ambiguity or uncertainty is marked as resolved. If more than one alternant is selected, the degree of ambiguity or uncertainty is marked as reduced by the number of alternants not selected.
  attribute select {
    list { xsd:anyURI+ }
  }?
TEI_link =
  
  ## (link) defines an association or hypertextual link among elements or passages, of some type not more precisely specifiable by other elements. [16.1. Links]
  element tei:link {
    empty
    >> sch:pattern [
         id = "p5odds-link-linkTargets3-constraint-assert-34"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:link"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "contains(normalize-space(@target),' ')"
             "You must supply at least two values for @target or  on "
             sch:name [ ]
             "\x{a}" ~
             "               "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_linkGrp =
  
  ## (link group) defines a collection of associations or hypertextual links. [16.1. Links]
  element tei:linkGrp {
    (TEI_link | TEI_ptr)+,
    TEI_att.global.attributes,
    TEI_att.pointing.group.attributes,
    empty
  }
TEI_ab =
  
  ## (anonymous block) contains any arbitrary component-level unit of text, acting as an anonymous container for phrase or inter level elements analogous to, but without the semantic baggage of, a paragraph. [16.3. Blocks, Segments, and Anchors]
  element tei:ab {
    TEI_macro.paraContent
    >> sch:pattern [
         id =
           "p5odds-ab-abstractModel-structure-ab-constraint-report-38"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:ab"
           "\x{a}" ~
           "               "
           sch:report [
             test =
               "not(ancestor::tei:floatingText) and (ancestor::tei:p or ancestor::tei:ab)          and not(parent::tei:exemplum         |parent::tei:item         |parent::tei:note         |parent::tei:q         |parent::tei:quote         |parent::tei:remarks         |parent::tei:said         |parent::tei:sp         |parent::tei:stage         |parent::tei:cell         |parent::tei:figure)"
             "\x{a}" ~
             "        Abstract model violation: ab may not occur inside paragraphs or other ab elements.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ]
    >> sch:pattern [
         id = "p5odds-ab-abstractModel-structure-l-constraint-report-39"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:ab"
           "\x{a}" ~
           "               "
           sch:report [
             test = "ancestor::tei:l or ancestor::tei:lg"
             "\x{a}" ~
             "        Abstract model violation: Lines may not contain higher-level divisions such as p or ab.\x{a}" ~
             "      "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declaring.attributes,
    TEI_att.fragmentable.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_anchor =
  
  ## (anchor point) attaches an identifier to a point within a text, whether or not it corresponds with a textual element. [8.4.2. Synchronization and Overlap 16.5. Correspondence and Alignment]
  element tei:anchor {
    empty, TEI_att.global.attributes, TEI_att.typed.attributes, empty
  }
TEI_seg =
  
  ## (arbitrary segment) represents any segmentation of text below the chunk level. [16.3. Blocks, Segments, and Anchors 6.2. Components of the Verse Line 7.2.5. Speech Contents]
  element tei:seg {
    TEI_macro.paraContent,
    TEI_att.global.attributes,
    TEI_att.segLike.attributes,
    TEI_att.typed.attributes,
    TEI_att.written.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_when =
  
  ## indicates a point in time either relative to other elements in the same timeline tag, or absolutely. [16.4.2. Placing Synchronous Events in Time]
  element tei:when {
    empty,
    TEI_att.global.attributes,
    
    ## supplies an absolute value for the time.
    attribute absolute {
      xsd:date
      | xsd:gYear
      | xsd:gMonth
      | xsd:gDay
      | xsd:gYearMonth
      | xsd:gMonthDay
      | xsd:time
      | xsd:dateTime
    }?,
    [
      a:documentation [
        "specifies the unit of time in which the "
        ns2:code [ "@interval" ]
        " value is expressed, if this is not inherited from the parent "
        ns2:code [ "<timeline>" ]
        ".\x{a}" ~
        "Suggested values include: 1] d (days); 2] h (hours); 3] min (minutes); 4] s (seconds); 5] ms (milliseconds)"
      ]
    ]
    attribute unit {
      
      ## (days) 
      "d"
      | 
        ## (hours) 
        "h"
      | 
        ## (minutes) 
        "min"
      | 
        ## (seconds) 
        "s"
      | 
        ## (milliseconds) 
        "ms"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## specifies a time interval either as a number or as one of the keywords defined by the datatype teidata.interval
    attribute interval {
      xsd:float
      | (
         ##
         "regular"
         | 
           ##
           "irregular"
         | 
           ##
           "unknown")
    }?,
    [
      a:documentation [
        "identifies the reference point for determining the time of the current "
        ns2:code [ "<when>" ]
        " element, which is obtained by adding the interval to the time of the reference point."
      ]
    ]
    attribute since { xsd:anyURI }?,
    empty
  }
TEI_timeline =
  
  ## (timeline) provides a set of ordered points in time which can be linked to elements of a spoken text to create a temporal alignment of that text. [16.4.2. Placing Synchronous Events in Time]
  element tei:timeline {
    TEI_when+,
    TEI_att.global.attributes,
    
    ## designates the origin of the timeline, i.e. the time at which it begins.
    attribute origin { xsd:anyURI }?,
    [
      a:documentation [
        "specifies the unit of time corresponding to the "
        ns2:code [ "@interval" ]
        " value of the timeline or of its constituent points in time.\x{a}" ~
        "Suggested values include: 1] d (days); 2] h (hours); 3] min (minutes); 4] s (seconds); 5] ms (milliseconds)"
      ]
    ]
    attribute unit {
      
      ## (days) 
      "d"
      | 
        ## (hours) 
        "h"
      | 
        ## (minutes) 
        "min"
      | 
        ## (seconds) 
        "s"
      | 
        ## (milliseconds) 
        "ms"
      | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
    }?,
    
    ## specifies a time interval either as a positive integral value or using one of a set of predefined codes.
    attribute interval {
      xsd:float
      | (
         ##
         "regular"
         | 
           ##
           "irregular"
         | 
           ##
           "unknown")
    }?,
    empty
  }
TEI_join =
  
  ## (join) identifies a possibly fragmented segment of text, by pointing at the possibly discontiguous elements which compose it. [16.7. Aggregation]
  element tei:join {
    ((TEI_model.descLike | TEI_model.certLike)*)
    >> sch:pattern [
         id = "p5odds-join-joinTargets3-constraint-assert-35"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:join"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "contains(@target,' ')"
             "\x{a}" ~
             "You must supply at least two values for @target on "
             sch:name [ ]
             "\x{a}" ~
             "               "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.pointing.attributes,
    TEI_att.typed.attributes,
    
    ## specifies the name of an element which this aggregation may be understood to represent.
    attribute result { xsd:Name }?,
    
    ## indicates whether the targets to be joined include the entire element indicated (the entire subtree including its root), or just the children of the target (the branches of the subtree).
    [ a:defaultValue = "root" ]
    attribute scope {
      [
        a:documentation [
          "the rooted subtrees indicated by the "
          ns2:code [ "@target" ]
          " attribute are joined, each subtree become a child of the virtual element created by the join"
        ]
      ]
      "root"
      | [
          a:documentation [
            "the children of the subtrees indicated by the "
            ns2:code [ "@target" ]
            " attribute become the children of the virtual element (i.e. the roots of the subtrees are discarded)"
          ]
        ]
        "branches"
    }?,
    empty
  }
TEI_joinGrp =
  [
    a:documentation [
      "(join group) groups a collection of "
      ns2:code [ "<join>" ]
      " elements and possibly pointers. [16.7. Aggregation]"
    ]
  ]
  element tei:joinGrp {
    ((TEI_equiv | TEI_gloss)*, (TEI_join | TEI_ptr)+),
    TEI_att.global.attributes,
    TEI_att.pointing.group.attributes,
    [
      a:documentation [
        "supplies the default value for the "
        ns2:code [ "@result" ]
        " on each "
        ns2:code [ "<join>" ]
        " included within the group."
      ]
    ]
    attribute result { xsd:Name }?,
    empty
  }
TEI_alt =
  
  ## (alternation) identifies an alternation or a set of choices among elements or passages. [16.8. Alternation]
  element tei:alt {
    empty,
    TEI_att.global.attributes,
    TEI_att.pointing.attribute.targetLang,
    TEI_att.pointing.attribute.evaluate,
    TEI_att.typed.attributes,
    
    ## specifies the destination of the reference by supplying one or more URI References
    attribute target {
      list { xsd:anyURI, xsd:anyURI, xsd:anyURI* }
    }?,
    
    ## states whether the alternations gathered in this collection are exclusive or inclusive.
    attribute mode {
      
      ## (exclusive) indicates that the alternation is exclusive, i.e. that at most one of the alternatives occurs.
      "excl"
      | 
        ## (inclusive) indicates that the alternation is not exclusive, i.e. that one or more of the alternatives occur.
        "incl"
    }?,
    [
      a:documentation [
        "If "
        ns2:code [ "@mode" ]
        " is excl, each weight states the probability that the corresponding alternative occurs. If "
        ns2:code [ "@mode" ]
        " is incl each weight states the probability that the corresponding alternative occurs given that at least one of the other alternatives occurs."
      ]
    ]
    attribute weights {
      list { xsd:double, xsd:double, xsd:double* }
    }?,
    empty
  }
TEI_altGrp =
  [
    a:documentation [
      "(alternation group) groups a collection of "
      ns2:code [ "<alt>" ]
      " elements and possibly pointers. [16.8. Alternation]"
    ]
  ]
  element tei:altGrp {
    (TEI_alt | TEI_ptr)*,
    TEI_att.global.attributes,
    TEI_att.pointing.group.attributes,
    
    ## states whether the alternations gathered in this collection are exclusive or inclusive.
    [ a:defaultValue = "excl" ]
    attribute mode {
      
      ## (exclusive) indicates that the alternation is exclusive, i.e. that at most one of the alternatives occurs.
      "excl"
      | 
        ## (inclusive) indicates that the alternation is not exclusive, i.e. that one or more of the alternatives occur.
        "incl"
    }?,
    empty
  }
TEI_standOff =
  
  ## Functions as a container element for linked data, contextual information, and stand-off annotations embedded in a TEI document. [16.10. The standOff Container]
  element tei:standOff {
    (TEI_model.standOffPart+)
    >> sch:pattern [
         id =
           "p5odds-standOff-nested_standOff_should_be_typed-constraint-assert-36"
         "\x{a}" ~
         "            "
         sch:rule [
           context = "tei:standOff"
           "\x{a}" ~
           "               "
           sch:assert [
             test = "@type or not(ancestor::tei:standOff)"
             "This\x{a}" ~
             "      "
             sch:name [ ]
             " element must have a @type attribute, since it is\x{a}" ~
             "      nested inside a "
             sch:name [ ]
             "\x{a}" ~
             "               "
           ]
           "\x{a}" ~
           "            "
         ]
         "\x{a}" ~
         "         "
       ],
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_listAnnotation =
  [
    a:documentation [
      "contains a list of annotations, typically encoded as "
      ns2:code [ "<annotation>" ]
      ", "
      ns2:code [ "<annotationBlock>" ]
      ", or "
      ns2:code [ "<note>" ]
      ", possibly organized with nested "
      ns2:code [ "<listAnnotation>" ]
      " elements. [16.10. The standOff Container]"
    ]
  ]
  element tei:listAnnotation {
    (TEI_model.headLike*,
     TEI_model.labelLike*,
     (TEI_model.annotationLike | TEI_listAnnotation)+),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    TEI_att.notated.attributes,
    TEI_att.declaring.attributes,
    empty
  }
TEI_annotation =
  [
    a:documentation [
      "represents an annotation following the "
      ns2:a [
        href = "#WADM"
        "Web\x{a}" ~
        "      Annotation Data Model"
      ]
      ". [16.10. The standOff Container]"
    ]
  ]
  element tei:annotation {
    (TEI_respStmt*,
     TEI_revisionDesc*,
     TEI_licence*,
     TEI_model.annotationPart.body*),
    TEI_att.global.attribute.n,
    TEI_att.global.attribute.xmllang,
    TEI_att.global.attribute.xmlbase,
    TEI_att.global.attribute.xmlspace,
    TEI_att.global.rendition.attribute.rend,
    TEI_att.global.rendition.attribute.style,
    TEI_att.global.rendition.attribute.rendition,
    TEI_att.global.linking.attribute.corresp,
    TEI_att.global.linking.attribute.synch,
    TEI_att.global.linking.attribute.sameAs,
    TEI_att.global.linking.attribute.copyOf,
    TEI_att.global.linking.attribute.next,
    TEI_att.global.linking.attribute.prev,
    TEI_att.global.linking.attribute.exclude,
    TEI_att.global.linking.attribute.select,
    TEI_att.global.responsibility.attribute.cert,
    TEI_att.global.responsibility.attribute.resp,
    TEI_att.global.source.attribute.source,
    TEI_att.pointing.attribute.targetLang,
    TEI_att.pointing.attribute.evaluate,
    
    ## (identifier) provides a unique identifier for the element bearing the attribute.
    attribute xml:id { xsd:ID },
    
    ## specifies the destination of the reference by supplying one or more URI References
    attribute target {
      list { xsd:anyURI+ }
    },
    
    ##
    attribute motivation {
      list {
        (
         ## intent is to assess the target resource in some way, rather than simply make a comment about it
         "assessing"
         | 
           ## intent is to create a bookmark to the target or part thereof
           "bookmarking"
         | 
           ## intent is to classify the target in some way
           "classifying"
         | 
           ## intent is to comment about the target
           "commenting"
         | 
           ## intent is to describe the target, rather than (for example) comment on it
           "describing"
         | 
           ## intent is to request an edit or a change to the target resource
           "editing"
         | 
           ## intent is to highlight the target resource or a segment thereof
           "highlighting"
         | 
           ## intent is to assign an identity to the target
           "identifying"
         | 
           ## intent is to link to a resource related to the target
           "linking"
         | 
           ## intent is to assign some value or quality to the target
           "moderating"
         | 
           ## intent is to ask a question about the target
           "questioning"
         | 
           ## intent is to reply to a previous statement, either an annotation or another resource
           "replying"
         | 
           ## intent is to associate a tag with the target
           "tagging")+
      }
    }?,
    empty
  }
TEI_att.tableDecoration.attributes =
  TEI_att.tableDecoration.attribute.role,
  TEI_att.tableDecoration.attribute.rows,
  TEI_att.tableDecoration.attribute.cols
TEI_att.tableDecoration.attribute.role =
  
  ## (role) indicates the kind of information held in this cell or in each cell of this row.
  ## Suggested values include: 1] label; 2] data
  [ a:defaultValue = "data" ]
  attribute role {
    
    ## labelling or descriptive information only.
    "label"
    | 
      ## data values.
      "data"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
TEI_att.tableDecoration.attribute.rows =
  
  ## (rows) indicates the number of rows occupied by this cell or row.
  [ a:defaultValue = "1" ] attribute rows { xsd:nonNegativeInteger }?
TEI_att.tableDecoration.attribute.cols =
  
  ## (columns) indicates the number of columns occupied by this cell or row.
  [ a:defaultValue = "1" ] attribute cols { xsd:nonNegativeInteger }?
TEI_table =
  
  ## (table) contains text displayed in tabular form, in rows and columns. [14.1.1. TEI Tables]
  element tei:table {
    ((TEI_model.headLike | TEI_model.global)*,
     ((TEI_row, TEI_model.global*)+
      | (TEI_model.graphicLike, TEI_model.global*)+),
     (TEI_model.divBottom, TEI_model.global*)*),
    TEI_att.global.attributes,
    TEI_att.typed.attributes,
    
    ## (rows) indicates the number of rows in the table.
    attribute rows { xsd:nonNegativeInteger }?,
    
    ## (columns) indicates the number of columns in each row of the table.
    attribute cols { xsd:nonNegativeInteger }?,
    empty
  }
TEI_row =
  
  ## (row) contains one row of a table. [14.1.1. TEI Tables]
  element tei:row {
    TEI_cell+,
    TEI_att.global.attributes,
    TEI_att.tableDecoration.attributes,
    empty
  }
TEI_cell =
  
  ## (cell) contains one cell of a table. [14.1.1. TEI Tables]
  element tei:cell {
    TEI_macro.specialPara,
    TEI_att.global.attributes,
    TEI_att.tableDecoration.attributes,
    empty
  }
TEI_formula =
  
  ## (formula) contains a mathematical or other formula. [14.2. Formulæ and Mathematical Expressions]
  element tei:formula {
    (text | TEI_model.graphicLike | TEI_model.hiLike)*,
    TEI_att.global.attributes,
    TEI_att.notated.attributes,
    empty
  }
TEI_notatedMusic =
  
  ## encodes the presence of music notation in a text [14.3. Notated Music in Written Text]
  element tei:notatedMusic {
    (TEI_model.labelLike
     | TEI_model.ptrLike
     | TEI_graphic
     | TEI_binaryObject
     | TEI_seg)*,
    TEI_att.global.attributes,
    TEI_att.placement.attributes,
    TEI_att.typed.attributes,
    empty
  }
TEI_figure =
  
  ## (figure) groups elements representing or containing graphic information such as an illustration, formula, or figure. [14.4. Specific Elements for Graphic Images]
  element tei:figure {
    (TEI_model.headLike
     | TEI_model.common
     | TEI_figDesc
     | TEI_model.graphicLike
     | TEI_model.global
     | TEI_model.divBottom)*,
    TEI_att.global.attributes,
    TEI_att.placement.attributes,
    TEI_att.typed.attributes,
    TEI_att.written.attributes,
    empty
  }
TEI_figDesc =
  
  ## (description of figure) contains a brief prose description of the appearance or content of a graphic figure, for use when documenting an image without displaying it. [14.4. Specific Elements for Graphic Images]
  element tei:figDesc {
    TEI_macro.limitedContent, TEI_att.global.attributes, empty
  }
TEI_fallback =
  
  ##
  element ns3:fallback { text+ }
start =
  TEI_TEI
  | TEI_schemaSpec
  | TEI_elementSpec
  | TEI_classSpec
  | TEI_macroSpec
  | TEI_dataSpec
  | TEI_div
sch:pattern [
  id = "en-gloss-if-any"
  "\x{a}" ~
  "	      "
  sch:rule [
    context =
      "  tei:elementSpec[tei:gloss]      | tei:valItem[tei:gloss]      | tei:attDef[tei:gloss]      | tei:macroSpec[tei:gloss]      | tei:classSpec[tei:gloss]      | tei:dataSpec[tei:gloss]      "
    "\x{a}" ~
    "		       "
    sch:assert [
      test = "tei:gloss[ lang('en') ]"
      "If there is any gloss inside "
      sch:value-of [ select = "name(.)" ]
      ", there must be an English gloss."
    ]
    "\x{a}" ~
    "	      "
  ]
  "\x{a}" ~
  "	    "
]
