1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski# *********************************************
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski# Relax NG Schema for DOL XML
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski# *********************************************
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskidefault namespace = "http://purl.net/dol/1.0/xml"
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskinamespace todo = "http://example.org/todo#"
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskinamespace rdfs = "http://www.w3.org/2000/01/rdf-schema#"
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskidatatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskistart = distributed-ontology
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskidistributed-ontology = element distributed-ontology {
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute base { dol-iri },
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski logic-section*
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski[rdfs:comment="Almost anything can optionally have an ID, so that it can be referred to. This is independent from DOL's own base?theory?symbol naming mechanism, as using the latter is recommended but can't be enforced due to compatibility restrictions."]
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskiid = attribute xml:id { xs:ID }?
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskidol-iri = xs:anyURI
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskilogic-section = element logic {
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute href { logic },
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski ( ontology | link )*
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskilogic = xs:anyURI
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskiontology = element ontology {
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute logic { logic }?,
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski [todo:question [ dct:creator="Christoph Lange" xs:date="2011-12-04" "This way of associating the 'kind of extension' with one ontology, instead of modeling it as a relationship between two ontologies, is closer to the abstract and text syntax, whereas my current RDF implementation takes the 'relationship' point of view. Which one should the XML syntax prefer?" ]]
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute extension { "implied" | "definitional" | "monomorphic" | "conservative" }?,
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskilink = view | alignment
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski[todo:question [ dct:creator="Christoph Lange" xs:date="2011-12-04" "Do you agree with attributes @from and @to, or would you rather prefer @source and @target?" ]]
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskilink-relations = (
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute from { xs:anyURI },
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski attribute to { xs:anyURI }
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskiview = element view { view-data }
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski | element interpretation { view-data }
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskiview-data = ( link-relations, view-content )
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskiview-content = empty
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowskialignment = element alignment {
1688462641d407b27eebb03f98286b888ba6326eTill Mossakowski link-relations,