#% xhtml output model, part of SiSU and distributed under the same license
default namespace = ""
namespace xl = "http://www.w3.org/1999/xlink"
start =
  element document {
    element head {
      (br
       | element creator {
           attribute class { xsd:NCName },
           (text
            | element link {
                attribute xl:href { xsd:anyURI },
                attribute xl:type { xsd:NCName },
                xsd:anyURI
              })+
         }
       | element date {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element date_available {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element date_created {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element date_issued {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element date_modified {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element date_valid {
           attribute class { xsd:NCName },
           xsd:NMTOKEN
         }
       | element language {
           attribute class { xsd:NCName },
           xsd:NCName
         }
       | element keywords {
           attribute class { xsd:NCName },
           text
         }
       | element meta {
           attribute content { text }?,
           attribute http-equiv { xsd:NCName }?,
           text
         }
       | element rights {
           attribute class { xsd:NCName },
           (text | link)+
         }
       | element source {
           attribute class { xsd:NCName },
           text
         }
       | element structure {
           attribute class { xsd:NCName },
           text
         }
       | element subject {
           attribute class { xsd:NCName },
           text
         }
       | element title {
           attribute class { xsd:NCName },
           text
         }
       | element type {
           attribute class { xsd:NCName },
           xsd:NCName
         })+
    },
    element body {
      element object {
        attribute id { xsd:integer },
        (element endnote {
           attribute notenumber { xsd:integer }?,
           attribute symbol { text }?,
           (text
            | b
            | br
            | del
            | i
            | link
            | sup
            | u
            | element em { xsd:NCName }
            | element sub { xsd:NCName })+
         }
         | element ocn { text }
         | element text {
             attribute class { xsd:NCName },
             (text
              | b
              | br
              | del
              | en
              | i
              | link
              | sup
              | u
              | element image {
                  attribute alt { text }?,
                  attribute height { xsd:integer }?,
                  attribute width { xsd:integer }?,
                  attribute xl:actuate { xsd:NCName },
                  attribute xl:href { text },
                  attribute xl:show { xsd:NCName },
                  attribute xl:type { xsd:NCName }
                }
              | element sub { text })+
           })+,
        element table {
          attribute align { xsd:NCName },
          attribute bgcolor { xsd:NCName },
          attribute border { xsd:integer },
          attribute cellpadding { xsd:integer },
          attribute summary { text },
          attribute width { text },
          element tr {
            element td {
              attribute valign { xsd:NCName },
              attribute width { text },
              (text | b | i)+
            }+
          }+
        }?
      }+
    }
  }
br = element br { empty }
en = element en { text }
sup = element sup { xsd:NCName }
i = element i { (text | b | br | sup)+ }
link =
  element link {
    attribute xl:href { xsd:anyURI },
    attribute xl:type { xsd:NCName },
    (text | b | i | sup)+
  }
b = element b { (text | en | i | link | sup)+ }
u = element u { (text | b | i)+ }
del = element del { (text | b | i | link)+ }
