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 tei = "http://www.tei-c.org/ns/1.0"
namespace teix = "http://www.tei-c.org/ns/Examples"

# Schema generated 2025-08-28T16:49:00Z
# Edition: P5 Version 4.10.1. Last updated on
#         28th August 2025, revision 3cd82e7a3
# 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 . Character and glyph documentation

# Definitions from module gaiji

# Set global predeclared macros

# Set predeclared macros

# 0. predeclared macros

# 1. classes
att.gaijiProp.attributes =
  att.datable.attributes,
  att.gaijiProp.attribute.name,
  att.gaijiProp.attribute.value,
  att.gaijiProp.attribute.version,
  att.gaijiProp.attribute.scheme
att.gaijiProp.attribute.name =
  
  ## provides the name of the character or glyph property being defined.
  attribute name { xsd:NCName }
att.gaijiProp.attribute.value =
  
  ## provides the value of the character or glyph property being defined.
  attribute value { xsd:string }
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] 13.0; 25] 14.0; 26] 15.0; 27] 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"
    | 
      ##
      "13.0"
    | 
      ##
      "14.0"
    | 
      ##
      "15.0"
    | 
      ##
      "unassigned"
    | xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
att.gaijiProp.attribute.scheme =
  
  ## supplies the name of the character set system from which this property is drawn.
  ## Sample values include: 1] Unicode (Unicode); 2] Bridwell (E. Nelson Bridwell); 3] Brewer (Georg Brewer); 4] Doyle (Darren Doyle); 5] Schreyer (Christine Schreyer)
  [ a:defaultValue = "Unicode" ]
  attribute scheme {
    xsd:token { pattern = "[^\p{C}\p{Z}]+" }
  }?
# 2. elements
char =
  
  ## (character) provides descriptive information about a character. []
  element char { char.content, char.localattributes }
char.content =
  (unicodeProp
   | unihanProp
   | localProp
   | mapping
   | figure
   | model.graphicLike
   | model.noteLike
   | model.descLike)*
char.localattributes = att.global.attributes, empty
charDecl =
  
  ## (character declarations) provides information about nonstandard characters and glyphs. []
  element charDecl { charDecl.content, charDecl.localattributes }
charDecl.content = desc?, (char | glyph)+
charDecl.localattributes = att.global.attributes, empty
g =
  
  ## (character or glyph) represents a glyph, or a non-standard character. []
  element g { g.content, g.localattributes }
g.content = text
g.localattributes =
  att.global.attributes,
  att.typed.attributes,
  
  ## points to a description of the character or glyph intended.
  attribute ref {
    xsd:anyURI { pattern = "\S+" }
  }?,
  empty
glyph =
  
  ## (character glyph) provides descriptive information about a character glyph. []
  element glyph { glyph.content, glyph.localattributes }
glyph.content =
  (unicodeProp
   | unihanProp
   | localProp
   | mapping
   | figure
   | model.graphicLike
   | model.noteLike
   | model.descLike)*
glyph.localattributes = att.global.attributes, empty
localProp =
  
  ## (locally defined property) provides a locally defined character (or glyph) property. []
  element localProp { localProp.content, localProp.localattributes }
localProp.content = empty
localProp.localattributes =
  att.global.attributes, att.gaijiProp.attributes, empty
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 "
      ns1:code [ "@type" ]
      " attribute. []"
    ]
  ]
  element mapping { mapping.content, mapping.localattributes }
mapping.content = macro.xtext
mapping.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.typed.attributes,
  empty
unicodeProp =
  
  ## (unicode property) provides a Unicode property for a character (or glyph). []
  element unicodeProp {
    unicodeProp.content, unicodeProp.localattributes
  }
unicodeProp.content = empty
unicodeProp.localattributes =
  att.global.attributes,
  att.gaijiProp.attribute.version,
  att.gaijiProp.attribute.scheme,
  att.datable.attribute.period,
  att.datable.custom.attribute.when-custom,
  att.datable.custom.attribute.notBefore-custom,
  att.datable.custom.attribute.notAfter-custom,
  att.datable.custom.attribute.from-custom,
  att.datable.custom.attribute.to-custom,
  att.datable.custom.attribute.datingPoint,
  att.datable.custom.attribute.datingMethod,
  att.datable.iso.attribute.when-iso,
  att.datable.iso.attribute.notBefore-iso,
  att.datable.iso.attribute.notAfter-iso,
  att.datable.iso.attribute.from-iso,
  att.datable.iso.attribute.to-iso,
  att.datable.w3c.attribute.when,
  att.datable.w3c.attribute.notBefore,
  att.datable.w3c.attribute.notAfter,
  att.datable.w3c.attribute.from,
  att.datable.w3c.attribute.to,
  
  ## 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
unihanProp =
  
  ## (unihan property) holds the name and value of a normative or informative Unihan character (or glyph) property as part of its attributes. []
  element unihanProp { unihanProp.content, unihanProp.localattributes }
unihanProp.content = empty
unihanProp.localattributes =
  att.global.attributes,
  att.gaijiProp.attribute.version,
  att.gaijiProp.attribute.scheme,
  att.datable.attribute.period,
  att.datable.custom.attribute.when-custom,
  att.datable.custom.attribute.notBefore-custom,
  att.datable.custom.attribute.notAfter-custom,
  att.datable.custom.attribute.from-custom,
  att.datable.custom.attribute.to-custom,
  att.datable.custom.attribute.datingPoint,
  att.datable.custom.attribute.datingMethod,
  att.datable.iso.attribute.when-iso,
  att.datable.iso.attribute.notBefore-iso,
  att.datable.iso.attribute.notAfter-iso,
  att.datable.iso.attribute.from-iso,
  att.datable.iso.attribute.to-iso,
  att.datable.w3c.attribute.when,
  att.datable.w3c.attribute.notBefore,
  att.datable.w3c.attribute.notAfter,
  att.datable.w3c.attribute.from,
  att.datable.w3c.attribute.to,
  
  ## 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
# 3. macros
