blob: 131df5606ff62e5e1c5882fcbf1b588d5e9a83ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module ADT
# $Id: omdocadt.rnc 8959 2011-09-02 06:01:43Z kohlhase $
# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocadt.rnc $
# See the documentation and examples at http://www.omdoc.org
# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL)
default namespace omdoc = "http://omdoc.org/ns"
omdoc.class &= adt*
adt.sym.attrib = id.attribs,scope.attrib,attribute name {xsd:NCName}
# adts are abstract data types, they are short forms for groups of symbols
# and their definitions, therefore, they have much the same attributes.
adt.attribs = toplevel.attribs &
attribute parameters {list {xsd:NCName*}}?
adt.class = sortdef+
adt.model = metadata.class & adt.class
adt = element adt {tref|(adt.attribs & adt.model)}
adttype = "loose" | "generated" | "free"
sortdef.attribs = adt.sym.attrib &
attribute role {"sort"}? &
attribute type {adttype}?
sortdef.model = metadata.class & constructor* & insort* & recognizer?
sortdef = element sortdef {tref|(sortdef.attribs &sortdef.model)}
insort.attribs = attribute for {omdocref}
insort.model = empty
insort = element insort {tref|(insort.attribs & insort.model)}
constructor.attribs = adt.sym.attrib & sym.role.attrib?
constructor.model = metadata.class & argument*
constructor = element constructor {tref|(constructor.attribs & constructor.model)}
recognizer.attribs = adt.sym.attrib & sym.role.attrib?
recognizer.model = metadata.class
recognizer = element recognizer {tref|(recognizer.attribs & recognizer.model)}
argument.attribs = empty
argument.model = type & selector?
argument = element argument {tref|(argument.attribs & argument.model)}
selector.attribs = adt.sym.attrib &
sym.role.attrib? &
attribute total {"yes" | "no"}?
selector.model = metadata.class
selector = element selector {tref|(selector.attribs & selector.model)}
|