namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace ns1 = "http://www.w3.org/1999/xhtml"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace sch = "http://purl.oclc.org/dsdl/schematron"
namespace tei = "http://www.tei-c.org/ns/1.0"
namespace teix = "http://www.tei-c.org/ns/Examples"

# Schema generated 2025-08-15T13:23:29Z
# Edition: P5 Version 4.10.0. Last updated on
#         15th August 2025, revision ebf0834e1
# This material is dual-licensed.
# [http://creativecommons.org/licenses/by/3.0/] Distributed under a Creative Commons Attribution 3.0 Unported License.  [http://www.opensource.org/licenses/BSD-2-Clause] Copyright 2025 TEI Consortium. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. TEI material can be licensed differently depending on the use you intend to make of it. Hence it is made available under both the CC+BY and BSD-2 licences. The CC+BY licence is generally appropriate for usages which treat TEI content as data or documentation. The BSD-2 licence is generally appropriate for usage of TEI content in a software environment. For further information or clarification, please contact the  TEI
#           Consortium . Verse structures

# Definitions from module verse

# Set global predeclared macros

# Set predeclared macros

# 0. predeclared macros

# 1. classes
att.metrical.attributes =
  att.metrical.attribute.met,
  att.metrical.attribute.real,
  att.metrical.attribute.rhyme
att.metrical.attribute.met =
  
  ## (metrical structure, conventional) contains a user-specified encoding for the conventional metrical structure of the element.
  attribute met { xsd:token }?
att.metrical.attribute.real =
  
  ## (metrical structure, realized) contains a user-specified encoding for the actual realization of the conventional metrical structure applicable to the element.
  attribute real { xsd:token }?
att.metrical.attribute.rhyme =
  
  ## (rhyme scheme) specifies the rhyme scheme applicable to a group of verse lines.
  attribute rhyme { xsd:token }?
att.enjamb.attributes = att.enjamb.attribute.enjamb
att.enjamb.attribute.enjamb =
  
  ## (enjambement) indicates that the end of a verse line is marked by enjambement.
  ## Sample values include: 1] no; 2] yes; 3] weak; 4] strong
  attribute enjamb {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
# 2. elements
caesura =
  
  ## marks the point at which a metrical line may be divided. []
  element caesura { caesura.content, caesura.localattributes }
caesura.content = empty
caesura.localattributes = att.global.attributes, empty
metDecl =
  [
    a:documentation [
      "(metrical notation declaration) documents the notation employed to represent a metrical pattern when this is specified as the value of a "
      ns1:code [ "@met" ]
      ", "
      ns1:code [ "@real" ]
      ", or "
      ns1:code [ "@rhyme" ]
      " attribute on any structural element of a metrical text (e.g. "
      ns1:code [ "<lg>" ]
      ", "
      ns1:code [ "<l>" ]
      ", or "
      ns1:code [ "<seg>" ]
      "). [ ]"
    ]
  ]
  element metDecl { metDecl.content, metDecl.localattributes }
metDecl.content =
  ((model.pLike | model.noteLike)+ | metSym+)
  >> sch:pattern [
       is-a = "declarable"
       "\x{a}" ~
       "         "
       sch:param [ name = "tde" value = "tei:metDecl" ]
       "\x{a}" ~
       "      "
     ]
metDecl.localattributes =
  att.global.attributes,
  att.declarable.attributes,
  
  ## indicates whether the notation conveys the abstract metrical form, its actual prosodic realization, or the rhyme scheme, or some combination thereof.
  [ a:defaultValue = "met real" ]
  attribute type {
    list {
      ([
         a:documentation [
           "(met attribute) declaration applies to the abstract metrical form recorded on the "
           ns1:code [ "@met" ]
           " attribute"
         ]
       ]
       "met"
       | [
           a:documentation [
             "(real attribute) declaration applies to the actual realization of the conventional metrical structure recorded on the "
             ns1:code [ "@real" ]
             " attribute"
           ]
         ]
         "real"
       | [
           a:documentation [
             "declaration applies to the rhyme scheme recorded on the "
             ns1:code [ "@rhyme" ]
             " attribute"
           ]
         ]
         "rhyme"),
      ([
         a:documentation [
           "(met attribute) declaration applies to the abstract metrical form recorded on the "
           ns1:code [ "@met" ]
           " attribute"
         ]
       ]
       "met"
       | [
           a:documentation [
             "(real attribute) declaration applies to the actual realization of the conventional metrical structure recorded on the "
             ns1:code [ "@real" ]
             " attribute"
           ]
         ]
         "real"
       | [
           a:documentation [
             "declaration applies to the rhyme scheme recorded on the "
             ns1:code [ "@rhyme" ]
             " attribute"
           ]
         ]
         "rhyme")?,
      ([
         a:documentation [
           "(met attribute) declaration applies to the abstract metrical form recorded on the "
           ns1:code [ "@met" ]
           " attribute"
         ]
       ]
       "met"
       | [
           a:documentation [
             "(real attribute) declaration applies to the actual realization of the conventional metrical structure recorded on the "
             ns1:code [ "@real" ]
             " attribute"
           ]
         ]
         "real"
       | [
           a:documentation [
             "declaration applies to the rhyme scheme recorded on the "
             ns1:code [ "@rhyme" ]
             " attribute"
           ]
         ]
         "rhyme")?
    }
  }?,
  
  ## (regular expression pattern) specifies a regular expression defining any value that is legal for this notation.
  attribute pattern { xsd:token }?,
  empty
metSym =
  [
    a:documentation [
      "(metrical notation symbol) documents the intended significance of a particular character or character sequence within a metrical notation, either explicitly or in terms of other "
      ns1:code [ "<metSym>" ]
      " elements in the same "
      ns1:code [ "<metDecl>" ]
      ". []"
    ]
  ]
  element metSym { metSym.content, metSym.localattributes }
metSym.content = macro.phraseSeq.limited
metSym.localattributes =
  att.global.attributes,
  
  ## specifies the character or character sequence being documented.
  attribute value {
    list {
      xsd:token { pattern = "[^\p{C}\p{Z}]+" }+
    }
  },
  [
    a:defaultValue = "true"
    a:documentation [
      "specifies whether the symbol is defined in terms of other symbols ("
      ns1:code [ "@terminal" ]
      " is set to false) or in prose ("
      ns1:code [ "@terminal" ]
      " is set to true)."
    ]
  ]
  attribute terminal { xsd:boolean }?,
  empty
rhyme =
  
  ## marks the rhyming part of a metrical line. []
  element rhyme { rhyme.content, rhyme.localattributes }
rhyme.content = macro.paraContent
rhyme.localattributes =
  att.global.attributes,
  att.typed.attributes,
  
  ## provides a label (usually a single letter) to identify which part of a rhyme scheme this rhyming string instantiates.
  attribute label {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?,
  empty
# 3. macros
