# Automatically extracted from rfc2629xslt.xml. DO NOT EDIT!

# WORK IN PROGRESS! PLEASE REPORT PROBLEMS TO THE AUTHOR.

# Define our extension namespace
namespace x = "http://purl.org/net/xml2rfc/ext"

# Define GRDDL namespace
namespace grddl = "http://www.w3.org/2003/g/data-view#"

# Define RDF namespace
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

# Define SVG namespace
namespace svg = "http://www.w3.org/2000/svg"

# Define XInclude namespace
namespace xi = "http://www.w3.org/2001/XInclude"

# Include rfc2629bis RNC grammar
include "rfc2629.rnc" {
  
  # Redefine <address> to allow multiple email addresses
  address =
    element address {
      attlist.address,
      postal?,
      phone?,
      facsimile?,
      email*,
      uri?
  }

  # Redefine <annotation> to allow more markup
  annotation =
    element annotation {
      attlist.annotation,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        | v3_tt
        )*
    }

  # Redefine <artwork> to allow markup
  artwork =
    element artwork {
      attlist.artwork,
      attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
      ( v3_svg |
        (TEXT
          | eref 
          | iref 
          | spanx 
          | xref
          | v3_em
          | v3_strong
          | x_abnf-char-sequence
          | x_bb
          | x_bc
          | x_bcp14
          | x_bt
          | x_highlight
          | x_length-of
          | x_parse-xml
          | x_ref
          | x_span
          | x_x)*
        )
    }

  # Redefine <back> to allow displayreference
  back =
    element back {
      attlist.back,
      v3_displayreference*,
      references*,
      section*
    }

  # Redefine <c> to allow our extension elements
  c =
    element c {
      attlist.c,
      (TEXT
        | xref
        | eref 
        | iref 
        | cref 
        | spanx 
        | v3_em
        | v3_strong
        | v3_tt
        | x_ref)*
    }

  # Redefine <cref> to allow more child elements
  cref =
    element cref {
      attlist.cref,
      (TEXT
        | eref
        | xref
        | x_ref)*
    }

  # Redefine <date> to allow text content (see Section 11.26)
  date =
    element date {
      attlist.date,
      TEXT?
    }

  # Redefine <figure> to allow more child elements
  figure =
    element figure {
      attlist.figure,
      attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
      v3_name?,
      iref*,
      preamble?,
      (artwork 
        | v3_sourcecode
        | v3_artset
      ),
      postamble?
    }

  # Redefine <front> to allow boilerplate
  front =
    element front {
      attlist.front,
      title,
      seriesInfo*,
      author+,
      date?,
      area*,
      workgroup*,
      keyword*,
      abstract?,
      note*,
      v3_boilerplate?
    }
  
  # Redefine <list> element to allow <x:lt> child elements
  \list =
    element list {
      attlist.list,
      (t+ | x_lt+)
    }    
    
  # Redefine <note> to allow <name> and not require title attribute
  note =
    element note {
      attlist.x_note,
      v3_name?,
      (v3_dl
        | v3_ol 
        | t 
        | v3_ul)+      
    }

  # Redefine <preamble> to allow our extension elements
  preamble =
    element preamble {
      attlist.preamble,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        | v3_em
        | v3_strong
        | v3_tt
        | x_anchor-alias
        | x_bcp14)*
  }

  # Redefine <postal> to allow <postalLine> and new detail elements
  postal =
    element postal {
      (
        (city
          | code
          | country
          | v3_cityarea
          | v3_extaddr
          | v3_pobox
          | v3_sortingcode
          | region
          | street)*
          | (v3_postalLine+,
          country?
          ))
    }

  # Redefine <postamble> to allow our extension elements
  postamble =
    element postamble {
      attlist.postamble,
      (TEXT
        | xref
        | eref
        | iref
        | cref
        | spanx
        | v3_em
        | v3_strong
        | v3_tt
        | x_bcp14)*
    }

  # Redefine <reference> to allow our extension elements
  reference =
    element reference {
      attlist.reference,
      (
        (
          front,
          v3_refcontent?,
          seriesInfo*,
          x_prose?,
          v3_refcontent?,
          format*,
          annotation*,
          x_source?
        ) | (
          v3_refcontent?,
          seriesInfo*,
          x_prose?,
          v3_refcontent?,
          format*,
          annotation*,
          x_source
        )
      )
    }

  # Redefine <references> to allow extension elements and attributes
  references =
    element references {
      attribute title { text }?,
      attribute anchor { xsd:ID }?,
      attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
      v3_name?,
      (references+ # (see [V3IMPNOTES], Section 3.1.16)
       | 
        (reference
         | v3_referencegroup
         | xi_include)+
       )
    }

  # Redefine <rfc> to allow our extension elements
  rfc =
    element rfc {
      attribute xml:lang { text }?,
      attribute grddl:transformation { ATEXT }?,
      attribute x:maturity-level { "proposed" | "draft" | "internet" }?,
      attribute category { "std" | "bcp" | "info" | "exp" | "historic" }?,
      attribute consensus { "false" | "true" | "no" | "yes" }?,
      attribute docName { text }?,
      attribute indexInclude { "true" | "false" }?, # (see [RFC7991bis], Section 2.48.4)
      attribute ipr {
        "full2026"
        | "noDerivativeWorks2026"
        | "none"
        | "full3667"
        | "noModification3667"
        | "noDerivatives3667"
        | "full3978"
        | "noModification3978"
        | "noDerivatives3978"
        | "trust200811"
        | "noModificationTrust200811"
        | "noDerivativesTrust200811"
        | "trust200902"
        | "noModificationTrust200902"
        | "noDerivativesTrust200902"
        | "pre5378Trust200902"
      }?,
      attribute iprExtract { xsd:IDREF }?,
      attribute number { text }?,
      attribute obsoletes { text }?,
      attribute tocDepth { text }?, # (see [RFC7991bis], Section 2.48.14)
      attribute tocInclude { "true" | "false" }?, # (see [RFC7991bis], Section 2.48.15)
      attribute scripts { text }?, # (see [RFC7991bis], Appendix B.3)
      attribute seriesNo { text }?,
      attribute sortRefs { "true" | "false" }?, # (see [RFC7991bis], Section 2.48.11)
      attribute submissionType { "IETF" | "IAB" | "IRTF" | "independent" }?,
      attribute symRefs { "true" | "false" }?, # (see [RFC7991bis], Section 2.48.13)
      attribute updates { text }?,
      attribute version { text }?, # (see [RFC7991bis], Section 2.48.13)
      v3_link*,
      x_link*,
      x_feedback?,
      x_assign-section-number*,
      front,
      middle,
      back?
    }

  # Redefine <section> to allow new elements
  section =
    element section {
      attlist.x_section,
      (t
       | artwork
       | figure
       | texttable
       | iref
       | section
       | v3_artset
       | v3_aside
       | v3_blockquote
       | v3_contact
       | v3_dl
       | v3_name
       | v3_ol
       | v3_sourcecode
       | v3_table
       | v3_ul
       | x_anchor-alias
       | x_blockquote
       | x_contributor
       | x_include-author
       | x_note
       | x_u-map
       | rdf_Description)*
    }

  # Redefine <spanx> to allow some markup
  spanx =
    element spanx {
      attlist.spanx,
      (TEXT
        | iref
        | xref
        | x_ref)*
    }

  # Redefine <t> to allow our extension elements
  t =
    element t {
      attlist.t,
      (TEXT
       | \list
       | figure
       | xref
       | eref
       | iref
       | cref
       | spanx
       | vspace
       | v3_bcp14
       | v3_br
       | v3_contact
       | v3_em
       | v3_relref
       | v3_strong
       | v3_sub
       | v3_sup
       | v3_tt
       | v3_u
       | x_abnf-char-sequence
       | x_anchor-alias
       | x_bcp14
       | x_dfn
       | x_h
       | x_q
       | x_ref
       | x_span
       | x_sup)*
    }

  # Redefine <title> to allow <br>
  title =
    element title {
      attlist.title,
      (TEXT
        | v3_br)*
    }

  # Redefine <xref> to allow some markup
  xref =
    element xref {
      attlist.xref,
      (TEXT
        | v3_em
        | v3_strong
        | v3_sub
        | v3_sup
        | v3_tt)*
    }
}

# Extend attribute set for <abstract>
attlist.abstract &=
  attribute anchor { xsd:ID }?, # (see [RFC7991bis], Section 2.1.1)
  attribute pn { text }? # (see [RFC7991bis], Appendix B.2)

# Allow extension attributes on <artwork> (Section 11.25)
attlist.artwork &=
  attribute anchor { xsd:ID }?,
  attribute originalSrc { text }?, # (see [RFC7991bis], Appendix B.3)
  attribute x:indent-with { ATEXT }?,
  attribute x:lang { "" }?,
  attribute x:is-code-component { "no" | "yes" }?

# Allow anchor and x:annotation attributes on <author>
attlist.author &=
  attribute asciiFullname { ATEXT }?,
  attribute asciiInitials { ATEXT }?,
  attribute asciiSurname { ATEXT }?,
  attribute anchor { xsd:ID }?,
  attribute x:annotation { ATEXT }?
  
# Extend attribute set for <c>
attlist.c &=
  attribute anchor { xsd:ID }?

# Extend attribute set for <city>
attlist.city &=
  attribute ascii { ATEXT }?

# Extend attribute set for <code>
attlist.code &=
  attribute ascii { ATEXT }?

# Extend attribute set for <country>
attlist.country &=
  attribute ascii { ATEXT }?

# Extend attribute set for <cref> (see Section 2.17.2 of [RFC7991bis])
attlist.cref &=
  attribute display { "false" | "true" }?

# Extend attribute set for <date> (see Section 11.26)
attlist.date &=
  attribute x:include-day { "false" | "true" }?

# Extend attribute set for <eref> (see Section 11.27)
attlist.eref &=
  attribute brackets { "none" | "angle" }?

# Extend attribute set for <iref> (see Section 11.28)
attlist.iref &=
  attribute x:for-anchor { ATEXT }?

# Extend attribute set for <list> (see Section 11.29)
attlist.list &=
  attribute x:indent { ATEXT }?

# Extend/Relax attribute set for <note>
attlist.x_note &=
  attribute anchor { xsd:ID }?,
  attribute title { ATEXT }?,
  attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
  attribute removeInRFC { "false" | "true" }? # see Section 12.25.2

# Extend attribute set for <preamble>
attlist.preamble &=
  attribute anchor { xsd:ID }?

# Extend attribute set for <organization>
attlist.organization &=
  attribute ascii { ATEXT }?,
  attribute showOnFrontPage { "false" | "true" }?

# Extend attribute set for <reference>
attlist.reference &=
  attribute quoteTitle { "false" | "true" }?, # (see Section 12.22.1)
  attribute xml:base { text }? # (see [RFC7991bis], Section 2)

# Extend attribute set for <references>
attlist.references &=
  attribute pn { text }? # (see [RFC7991bis], Appendix B.2)

# Extend attribute set for <region>
attlist.region &=
  attribute ascii { ATEXT }?

# Extend/Relax attribute set for <section> (see Section 11.31)
attlist.x_section &=
  attribute anchor { xsd:ID }?,
  attribute title { ATEXT }?,
  attribute toc { "include" | "exclude" | "default" }?,
  attribute numbered { "false" | "true" }?, # see Section 12.25.1
  attribute removeInRFC { "false" | "true" }?, # see Section 12.25.2
  attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
  attribute x:fixed-section-number { ATEXT }?

# Allow anchor attribute on <spanx>
attlist.spanx &=
  attribute anchor { xsd:ID }?

# Extend attribute set for <street>
attlist.street &=
  attribute ascii { ATEXT }?

# Extend attribute set for <c> (see Section 11.28)
attlist.t &=
  attribute indent { text }?,
  attribute keepWithNext { text }?,
  attribute keepWithPrevious { text }?,
  attribute pn { text }? # (see [RFC7991bis], Appendix B.2)

# Extend attribute set for <texttable>
attlist.texttable &=
  attribute x:caption-side { ATEXT }?

# Extend attribute set for <title>
attlist.title &=
  attribute ascii { ATEXT }?,
  attribute x:quotes { "true" | "false" }? # (deprecated, see Section 12.22.1)

# Allow annotation attribute on <uri>
attlist.uri &=
  attribute x:annotation { ATEXT }?

# Extend attribute set for <xref> (see Section 11.32)
attlist.xref &=
  attribute derivedContent { text }?, # (see [RFC7991bis], Appendix B.3)
  attribute x:fmt  { "()" | "," | "of" | "number" | "sec" |
                     "none" }?,
  attribute x:rel  { ATEXT }?,
  attribute x:sec  { ATEXT }?,
  attribute x:title  { ATEXT }?,
  attribute relative  { ATEXT }?,
  attribute section  { ATEXT }?,
  attribute sectionFormat  { "bare" | "comma" | "of" | "parens" }?
  

# Set of artwork (see Section 12.1)
v3_artset =
  element artset {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    artwork+
  }

# Side Note (see Section 12.2)
v3_aside =
  element aside {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    (artwork
      | figure
      | iref
      | t
      | v3_blockquote
      | v3_dl
      | v3_ol
      | v3_table
      | v3_ul)*
  }

# BCP14/RFC2119 keywords (see Section 12.3)
v3_bcp14 =
  element bcp14 {
    TEXT
  }

# Blockquote (see Section 12.4)
v3_blockquote =
  element blockquote {
    attribute anchor { xsd:ID }?,
    attribute cite { URI }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute quotedFrom { ATEXT }?,
    (
      (artwork 
        | v3_dl
        | figure
        | v3_ol
        | v3_sourcecode
        | t
        | v3_ul)+
    |
      (TEXT
        | v3_bcp14
        | cref
        | v3_em
        | eref
        | iref
        | v3_strong
        | v3_sub
        | v3_sup
        | v3_tt
        | xref)+
    )
  }

# Boilerplate (see Section 12.4)
v3_boilerplate =
  element boilerplate {
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    section+
  }

# Forced Line Break (see Section 12.6)
v3_br =
  element br {
    empty
  }

# (see Section 12.7)
v3_cityarea =
  element cityarea {
    attribute ascii { ATEXT }?,
    TEXT
  }

# (see Section 12.8)
v3_contact =
  element contact {
    attribute initials { text }?,
    attribute asciiInitials { text }?,
    attribute surname { text }?,
    attribute asciiSurname { text }?,
    attribute fullname { text }?,
    attribute asciiFullname { text }?,
    organization?,
    address?
  }

# Mapping of reference names to display names (see Section 12.9)
v3_displayreference =
  element displayreference {
    attribute target { xsd:IDREF },
    attribute to { ATEXT }
  }

# Definition List Description Element (see Section 12.10)
v3_dd =
  element dd {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    ((v3_artset
      | artwork
      | figure
      | t
      | v3_aside 
      | v3_dl 
      | v3_ol 
      | v3_table 
      | v3_sourcecode 
      | v3_ul)+ | 
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | v3_bcp14 
      | v3_br 
      | v3_em
      | v3_sub
      | v3_sup
      | v3_tt
      | v3_strong
      | v3_u
      | x_ref)* 
    )
  }

# Definition List (see Section 12.11)
v3_dl =
  element dl {
    attribute anchor { xsd:ID }?, # (see [RFC7991bis], Section 2.21.1)
    attribute indent { text }?,
    attribute newline { "false" | "true" }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute spacing { "normal" | "compact" }?,
    (v3_dt, v3_dd)+
  }

# Definition List Description Term (see Section 12.12)
v3_dt =
  element dt {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | v3_em
      | v3_tt
      | v3_strong)*
  }

# Emphasized Text (see Section 12.13)
v3_em =
  element em {
    attribute anchor { xsd:ID }?,
    (TEXT
      | eref
      | iref
      | xref
      | v3_strong
      | x_ref)*
  }

# Extended Postal Address (see Section 12.14)
v3_extaddr =
  element extaddr {
    attribute ascii { ATEXT }?,
    TEXT
  }

# Definition List (see Section 12.15)
v3_li =
  element li {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    ((v3_artset
      | artwork
      | figure
      | v3_blockquote
      | v3_dl
      | v3_ol
      | t
      | v3_table
      | v3_sourcecode
      | v3_ul
    )+ 
      | 
    (TEXT
      | cref
      | eref
      | iref
      | xref
      | v3_bcp14
      | v3_em
      | v3_strong
      | v3_sub
      | v3_sup
      | v3_tt
      | v3_u
      | x_dfn
      | x_ref)*
    )
  }

# Container for additional links (see Section 12.16)
v3_link =
  element link {
    attribute href { text },
    attribute rel { text }?
  }

# Section/Figure/Table Name (see Section 12.17)
v3_name =
  element name {
    attribute slugifiedName { text }?, # (see [RFC7991bis], Appendix B.2)
    (TEXT
      | cref
      | v3_br
      | v3_em
      | v3_sup
      | v3_tt
      | xref)*
  }

# Ordered List (see Section 12.18)
v3_ol =
  element ol {
    attribute anchor { xsd:ID }?,
    attribute indent { text }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute start { TEXT }?,
    attribute group { TEXT }?,
    attribute type { TEXT }?,
    v3_li+
  }

# Extended Postal Address (see Section 12.19)
v3_pobox =
  element pobox {
    attribute ascii { ATEXT }?,
    TEXT
  }

# Line in postal address (see Section 12.20)
v3_postalLine =
  element postalLine {
    attribute ascii { TEXT }?,
    TEXT
  }

# EXPERIMENTAL DO NOT USE YET (see Section 12.24)
v3_relref =
  element relref {
    attribute derivedLink { text }?, # (see [RFC7991bis], Appendix B.3)
    attribute displayFormat { "of" | "comma" | "parens" | "bare" }?,
    attribute relative { text }?,
    attribute section { text },
    attribute target { xsd:IDREF },
    TEXT
  }

# additional content for references (see Section 12.21)
v3_refcontent =
  element refcontent {
    (TEXT
      | v3_em)*
  }

# reference group (see Section 12.23)
v3_referencegroup =
  element referencegroup {
    attribute anchor { xsd:ID },
    attribute target { URI }?,
    (reference
      | xi_include)+
  }

# (see Section 12.26)
v3_sortingcode =
  element sortingcode {
    attribute ascii { ATEXT }?,
    TEXT
  }

# Source Code (see Section 12.27)
v3_sourcecode =
  element sourcecode {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute markers { text }?, #(see [V3IMPNOTES], Section 3.1.22)
    attribute name { text }?,
    attribute src { text }?,
    attribute type { text }?,
    attribute x:lang { "" }?,
    (TEXT
      | iref
      | xref
      | x_ref)*
  }

# Emphasized Text (see Section 12.28)
v3_strong =
  element strong {
    attribute anchor { xsd:ID }?,
    (TEXT
      | xref
      | v3_em
      | x_ref)*
  }

# Subscript (see Section 12.29)
v3_sub =
  element sub {
    (TEXT
      | v3_sup)*
  }

# Superscript (see Section 12.30)
v3_sup =
  element sup {
    (TEXT
      | v3_sub)*
  }

# Table (see Section 12.32)
v3_table =
  element table {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    v3_name?,
    iref*,
    v3_thead?,
    v3_tbody+,
    v3_tfoot?
  }

# Table Body (see Section 12.33)
v3_tbody =
  element tbody {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    v3_tr+
  }

# Table Contents Cell (see Section 12.34)
v3_td =
  element td {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute colspan { text }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute rowspan { text }?,
    ( (t
       | v3_dl
       | v3_ol
       | v3_sourcecode
       | v3_ul
      )+
      | (TEXT
         | v3_bcp14
         | v3_br
         | cref
         | v3_em
         | eref
         | v3_strong
         | v3_sub
         | v3_sup
         | v3_tt
         | xref)*
    )
  }

# Table Footer (see Section 12.35)
v3_tfoot =
  element tfoot {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    v3_tr
  }

# Table Header Cell (see Section 12.36)
v3_th =
  element th {
    attribute anchor { xsd:ID }?,
    attribute align { "left" | "center" | "right" }?,
    attribute colspan { text }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    attribute rowspan { text }?,
    ( (t
       | v3_dl
       | v3_ol
       | v3_sourcecode
       | v3_ul
      )+
      | (TEXT
         | v3_bcp14
         | cref
         | v3_em
         | eref
         | v3_strong
         | v3_sub
         | v3_sup
         | v3_tt
         | xref)*
    )
  }

# Table Head (see Section 12.37)
v3_thead =
  element thead {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    v3_tr+
  }

# Table Row (see Section 12.38)
v3_tr =
  element tr {
    attribute anchor { xsd:ID }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    (
      v3_td
      | v3_th
    )+
  }

# Monospaced Text (see Section 12.39)
v3_tt =
  element tt {
    (TEXT
      | xref
      | v3_em
      | x_ref)*
  }

# Non-ASCII characters (see Section 12.40)
v3_u =
  element u {
    attribute ascii { text }?,
    attribute format { text }?,
    TEXT
  }

# Unordered List (see Section 12.41)
v3_ul =
  element ul {
    attribute anchor { xsd:ID }?,
    attribute bare { "false" | "true" }?, # but see <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/547>
    attribute indent { text }?,
    attribute empty { "false" | "true" }?,
    attribute pn { text }?, # (see [RFC7991bis], Appendix B.2)
    v3_li+
  }

# SVG (see Section 12.31)
v3_svg =
  element svg:svg {
    (attribute * { text }
        | text
        | anySVGElement)*
  }

 anySVGElement =
    element svg:* {
       (attribute * { text }
        | text
        | anySVGElement)*
    }
      
# Conversion to ABNF char sequence (see Section 11.1)
x_abnf-char-sequence =
  element x:abnf-char-sequence {
    TEXT
  }

# Aliasing of anchors (see Section 11.2)
x_anchor-alias =
  element x:anchor-alias {
    attribute value { TEXT },
    empty
  }

# Contributor information (see Section 11.9)
# (experimental)
x_contributor =
  element x:contributor {
    attlist.author,
    organization?,
    address?
  }

# Supply feedback links (see Section 11.11)
x_feedback =
  element x:feedback {
    attribute template { TEXT },
    empty
  }

# Including Author information
# (experimental)
x_include-author =
  element x:include-author {
    attribute target { xsd:IDREF }
  }

# Setting section numbers for internally generated sections
# (experimental)
x_assign-section-number =
  element x:assign-section-number {
    attribute builtin-target { "authors" },
    attribute number { TEXT },
    empty
  }

# Bottom line of box drawing (see Section 11.3)
x_bb =
  element x:bb {
    (TEXT
      | iref
      | xref
      | x_bb
      | x_bc
      | x_bt
      | x_ref)* 
  }

# Center line of box drawing (see Section 11.4)
x_bc =
  element x:bc {
    (TEXT
      | iref
      | spanx
      | xref
      | x_bb
      | x_bc
      | x_bt
      | x_ref)* 
  }

# BCP14/RFC2119 keywords (see Section 11.5)
x_bcp14 =
  element x:bcp14 {
    TEXT
  }
  
# Blockquote (see Section 11.6)
x_blockquote =
  element x:blockquote {
    attribute anchor { xsd:ID }?,
    attribute cite { URI }?,
    t+
  }

# Top line of box drawing (see Section 11.7)
x_bt =
  element x:bt {
    (TEXT
      | iref
      | xref
      | x_bb
      | x_bc
      | x_bt
      | x_ref)* 
  }

# Unicode character map entry (see Section 11.8)
x_c =
  element x:c {
    attribute c { TEXT },
    attribute d { TEXT }?,
    attribute n { TEXT }
  }

# declaration of definition in external reference
x_defines =
  element x:defines {
    TEXT
  }

# Definition (see Section 11.10)
x_dfn =
  element x:dfn {
    attribute anchor { xsd:ID }?,
    (TEXT
      | iref)*
  }
  
# Heading (see Section 11.12)
x_h =
  element x:h {
    TEXT
  }

# declaration of anchor in external reference
x_has =
  element x:has {
    attribute anchor { xsd:ID }?
  }

# Heading (see Section 11.13)
x_highlight =
  element x:highlight {
    TEXT
  }

# Length Measurement (see Section 11.14)
x_length-of =
  element x:length-of {
    attribute indented { NUMBER }?,
    attribute target { xsd:IDREF },
    empty
  }

# Link (see Section 11.15)
x_link =
  element x:link {
    attribute basename { URI }?,
    attribute href { URI }?,
    attribute title { TEXT }?,
    attribute rel { TEXT },
    empty
  }
  
# Extended list item (see Section 11.16)
x_lt =
  element x:lt {
    attribute anchor { xsd:ID }?,
    attribute hangText { TEXT }?,
    t+
  }

# Note (see Section 11.17)
x_note =
  element x:note {
    attribute anchor { xsd:ID }?,
    t+
  }

# Signal XML content (see Section 11.18)
x_parse-xml =
  element x:parse-xml {
    (TEXT
      | xref)* 
  }

# Inline prose in a reference (see Section 11.19)
x_prose =
  element x:prose {
    TEXT
  }

# Inline quote (see Section 11.20)
x_q =
  element x:q {
    TEXT
  }

# Anchor reference (see Section 11.21)  
x_ref =
  element x:ref {
    attribute anchor { xsd:ID }?,
    TEXT
  }

# source information (see Section 11.22)  
x_source =
  element x:source {
    attribute basename { ATEXT }?,
    attribute href { URI },
    x_defines*,
    x_has*
  }

# superscript (see Section 11.23)
x_sup =
  element x:sup {
    TEXT
  }

# Inline Span 
x_span =
  element x:span {
    attribute anchor { xsd:ID }?,
    attribute x:lang { "" }?,
    (TEXT
      | x_parse-xml)* 
  }

# Unicode character map (see Section 11.24)
x_u-map =
  element x:u-map {
    x_c*
  }

# Nop (for alignment in source)
x_x =
  element x:x {
    empty
  }

# XInclude (see Section 12.43)
xi_include =
  element xi:include {
    attribute href { text },
    empty
  }

# Embed RDF statements 
rdf_Description =
  element rdf:Description {
    rdf_content
  }
  
rdf_content =
  ( TEXT | element * { rdf_content })*
