datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" start = document document = element document { head, body } head = element head { element organization { "ISO" | "ISO/IEC" } & element document-type { "International Standard" | "Technical Report" | "Guide" | "Publicly Available Specification" | "Technical Specification" | "International Standardized Profile" } & element stage { "committee" | "enquiry" | "approval" | "publication" } & element tc-number { positive-integer } & element tc-name { text } & (element sc-number { positive-integer } & element sc-name { text })? & element wg-number { positive-integer }? & element serial-number { positive-integer }? & element draft-number { positive-integer }? & element document-number { positive-integer } & element part-number { positive-integer }? & element document-language { "E" | "F" } & element secretariat { "ANSI" } & element date { xsd:date } & element title { element introductory { text }?, element main { text }, element complementary { text }? } } positive-integer = xsd:token { pattern = "[1-9][0-9]*|0" } body = foreword, introduction?, scope, normative-references?, terms-and-definitions?, titled-clause+, annex*, bibliography? foreword = element foreword { part-list? } part-list = element part-list { element part { element number { positive-integer }, element title { text } }+ } title = element title { title-content } title-content = (text | element code { title-content })* clause-content = (titled-clause, titled-clause+) | untitled-clause-content untitled-clause-content = (untitled-clause, untitled-clause+) | block+ introduction = element introduction { block+ } scope = element scope { block+ } normative-references = element normative-references { block*, referenced-document+ } referenced-document = element referenced-document { id, element abbrev { text }, element title { text }, element field { text }*, element url { xsd:anyURI } } # boilerplate generated automatically # need markup for supplementary sources of terms and definitions terms-and-definitions = element terms-and-definitions { terms-and-definitions-content } terms-and-definitions-content = (term-and-definition | element clause { title, terms-and-definitions-content })+ term-and-definition = element term-and-definition { element term { text }, element term { attribute status { text }?, text }*, element definition { attribute subject-field { text }?, inline }, (example | note)* }+ titled-clause = element clause { id, title, clause-content } untitled-clause = element clause { id, untitled-clause-content } annex = element annex { id, attribute normative { "true" | "false" }, title, clause-content } bibliography = element bibliography { referenced-document+ } block = p | ol | ul | example | note | pre | notation-list p = element p { inline } ol = element ol { element li { id, block+ }+ } ul = element ul { element li { block+ }+ } example = element example { p+ } note = element note { p+ } notation-list = element notation-list { element notation-item { element notation { inline }, element notation-definition { p, (p|note)* } }+ } pre = element pre { pre-content } pre-content = (text | element var { pre-content })* inline = (text | element code|b|i|var { inline } | ref | firstterm | strong)* ref = this | xref # "This part of ISO/IEC" # "This International Standard" this = element This|this { empty } xref = element Xref { attribute to { xsd:IDREF } } | element xref { attribute to { xsd:IDREF } } id = attribute id { xsd:ID }? firstterm = element firstterm { text } strong = element strong { text }