summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict.rnc
blob: 31d2ad40051226b9d6bb54b21184e38eb0436685 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#     This is the Mathematical Markup Language (MathML) 3.0, an XML
#     application for describing mathematical notation and capturing
#     both its structure and content.
#
#     Copyright 1998-2008 W3C (MIT, ERCIM, Keio)
# 
#     Use and distribution of this code are permitted under the terms
#     W3C Software Notice and License
#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
#
#
#     Revision:   $Id: mathml3-strict.rnc 8959 2011-09-02 06:01:43Z kohlhase $
#
#    Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase
#
#  This is the RelaxNG schema module for the strict content part of MathML.

default namespace m = "http://www.w3.org/1998/Math/MathML"

include "mathml3-common.rnc"

math.content |= ContExp

#ednote(rnc:opel-content) What is the content of a operator element, currently all text?
opel.content = text

# we want to extend this in pragmatic CMathML, so we introduce abbrevs here.
#ednote(rnc:cn-content) What is the content of a cn?
cn.content = text |(cn,cn)
cn.type.vals  = "integer"|"real"|"double"

cn = element cn {attribute base {text}?,
                 attribute type {cn.type.vals}?,
  		 Definition.attrib,
  		 MathML.Common.attrib,	
		 (cn.content)*}

ci = element ci {attribute type {xsd:string}?,
                 attribute nargs {xsd:string}?,
		 attribute occurrence {xsd:string}?,		
                 Definition.attrib,	
  		 MathML.Common.attrib,
		 opel.content,
		 name.attrib?}

cdname.attrib = attribute cd {xsd:NCName}

csymbol       = element csymbol {MathML.Common.attrib,
	                         Definition.attrib,cdname.attrib?,cdbase.attrib?, 
				 opel.content}

# the content of the apply element, leave it empty and extend it later
apply = element apply {MathML.Common.attrib,cdbase.attrib?,apply.content}
apply-head = apply|bind|ci|csymbol|semantics-apply
apply.content = apply-head,ContExp*
semantics-apply = element semantics {semantics.attribs,apply-head, semantics-annotation*}

qualifier = notAllowed

# the content of the bind element, leave it empty and extend it later
bind = element bind {MathML.Common.attrib,cdbase.attrib?,bind.content}
bind-head = apply|csymbol|semantics-bind
bind.content = bind-head,bvar*,qualifier?,ContExp
semantics-bind   = element semantics {semantics.attribs,bind-head, semantics-annotation*}

bvar = element bvar {MathML.Common.attrib,cdbase.attrib?,bvar-head}
bvar-head = ci|semantics-bvar
semantics-bvar   = element semantics {semantics.attribs,bvar-head, semantics-annotation*}

share = element share {MathML.Common.attrib,attribute href {xsd:anyURI}}

# the content of the cerror element, leave it empty and extend it later
cerror = element cerror {MathML.Common.attrib,cdbase.attrib?,cerror.content}
cerror-head = csymbol|apply|semantics-cerror
cerror.content = cerror-head,ContExp*
semantics-cerror = element semantics {semantics.attribs,cerror-head, semantics-annotation*}

semantics-cmml = element semantics {semantics.attribs,ContExp, semantics-annotation*}

ContExp = cn| ci | csymbol | apply | bind | share | cerror | semantics-cmml