#% sax 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
       | meta
       | 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 keywords {
           attribute class { xsd:NCName },
           text
         }
       | element language {
           attribute class { xsd:NCName },
           xsd:NCName
         }
       | element meta { xsd:NMTOKEN }
       | 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 },
           text
         }
       | element source_control {
           (br
            | meta
            | element sc {
                attribute class { xsd:NCName },
                text
              })+
         })+
    },
    element body {
      element object {
        attribute id { text },
        element ocn {
          text
        },
        element text {
          attribute class { xsd:NCName },
          (text
           | b
           | br
           | del
           | en
           | i
           | link
           | sub
           | 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 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)+
            }+
          }+
        }?,
        element endnote {
          attribute notenumber { xsd:integer }?,
          attribute symbol { text }?,
          (element number { xsd:integer }
           | element symbol { text }),
          element note {
            (text
             | b
             | br
             | del
             | i
             | link
             | sup
             | u
             | element em { xsd:NCName }
             | element sub { xsd:NCName })+
          }
        }*
      }+
    }
  }
meta = element meta { text }
br = element br { empty }
b = element b { (text | en | i | link | sup)+ }
i = element i { (text | b | br | sup)+ }
en = element en { text }
sub = element sub { xsd:NCName }
sup = element sup { xsd:NCName }
link =
  element link {
    attribute xl:href { xsd:anyURI },
    attribute xl:type { xsd:NCName },
    (xsd:anyURI | text | b | i | sup)+
  }
u = element u { (text | b | i)+ }
del = element del { (text | b | i | link)+ }
