# ============================================================================ # # XML Topic Maps 2.1 # # Proposal for a XML Topic Maps syntax that is backwards compatible to XTM 2.0 # # Issues: # * Two reification mechanisms, either as attribute 'reifier' which points # to a topic by an item identifier or as element 'reifier' which can point # to a topic by an item identifier, a subject identifier or a subject # locator (the correct, TMDM-compatible way). # # Possible solutions: # * Remove the 'reifier' element and accept that the reifying topic is # only referencable by an item identifier # * Remove the reifier attribute -> break compatibility to XTM 2.0 (bad) # * Accept both reification mechanisms (preferable) # # ============================================================================ # --- Common declarations default namespace = "http://www.topicmaps.org/xtm/" namespace xtm = "http://www.topicmaps.org/xtm/" datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" start = topicMap reifiable = (attribute reifier { xsd:anyURI } | reifier)?, itemIdentity* reifier = element reifier { topic-reference } href = attribute href { xsd:anyURI } any-markup = (text | element * - xtm:* { attribute * { text }*, any-markup* })* # --- The schema topicMap = element topicMap { reifiable, version, mergeMap*, (topic | association)* } version = attribute version { ("2.0" | "2.1") } topic = element topic { ((id, (itemIdentity | subjectIdentifier | subjectLocator)*) |(id?, (itemIdentity | subjectIdentifier | subjectLocator)+)), instanceOf?, (name | occurrence)* } id = attribute id { xsd:ID } name = element name { reifiable, type?, scope?, value, variant* } value = element value { text } variant = element variant { reifiable, scope, (resourceRef | resourceData) } scope = element scope { topic-reference+ } instanceOf = element instanceOf { topic-reference+ } type = element type { topic-reference } occurrence = element occurrence { reifiable, type, scope?, ( resourceRef | resourceData ) } datatype = attribute datatype { xsd:anyURI } resourceData = element resourceData { datatype?, any-markup } association = element association { reifiable, type, scope?, role+ } role = element role { reifiable, type, topic-reference } topic-reference = (topicRef | subjectIdentifierRef | subjectLocatorRef) topicRef = element topicRef { href } subjectIdentifierRef = element subjectIdentifierRef { href } subjectLocatorRef = element subjectLocatorRef { href } resourceRef = element resourceRef { href } subjectLocator = element subjectLocator { href } subjectIdentifier = element subjectIdentifier { href } itemIdentity = element itemIdentity { href } mergeMap = element mergeMap { href } # --- End of schema