]> matita.cs.unibo.it Git - helm.git/blob - helm/mathql/xmathql.dtd
ocaml 3.09 transition
[helm.git] / helm / mathql / xmathql.dtd
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <!-- Copyright (C) 2000, HELM Team                                     -->
4 <!--                                                                   -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic            -->
6 <!-- Library of Mathematics, developed at the Computer Science         -->
7 <!-- Department, University of Bologna, Italy.                         -->
8 <!--                                                                   -->
9 <!-- HELM is free software; you can redistribute it and/or             -->
10 <!-- modify it under the terms of the GNU General Public License       -->
11 <!-- as published by the Free Software Foundation; either version 2    -->
12 <!-- of the License, or (at your option) any later version.            -->
13 <!--                                                                   -->
14 <!-- HELM is distributed in the hope that it will be useful,           -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of    -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     -->
17 <!-- GNU General Public License for more details.                      -->
18 <!--                                                                   -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software               -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston,            -->
22 <!-- MA  02111-1307, USA.                                              -->
23 <!--                                                                   -->
24 <!-- For details, see the HELM World-Wide-Web page,                    -->
25 <!-- http://cs.unibo.it/helm/.                                         -->
26
27 <!--*****************************************************************-->
28 <!-- DTD FOR the MATHEMATICAL QUERY MARKUP LANGUAGE (XMathQL)        -->
29 <!-- First draft: April 2002, Irene Schena                           -->
30 <!-- Second draft: Agust 2002, Irene Schena                          -->
31 <!--*****************************************************************-->
32
33 <!--*****************************************************************-->
34 <!-- This syntax is not convenient for humans to read and write, but -->
35 <!-- it is for programs.                                             -->
36 <!-- XMathQL is useful for:                                          -->
37 <!-- 1) generating queries in a XML-orienting programming environment-->
38 <!-- 2) embedding queries in XML documents                           -->
39 <!-- 3) reusing queries saved in a standard format                   -->
40 <!-- The syntax reflects the structure of the grammar productions of -->
41 <!-- MathQL.                                                         -->
42 <!-- Operators are unambiguous (binary or unary), so there isn't any -->
43 <!-- grouping operator.                                              -->
44 <!-- CONST is the quoted constant string; rvar is for single         -->
45 <!-- reference and svar for sets of references, i.e. query results.  -->
46 <!-- The attributes binder, rvar, svar declare variables which are   -->
47 <!-- referred to and used by means of respectively BINDER, Rvar, Svar-->
48 <!-- PROPERTY works on a specified RDF property returning its value. -->
49 <!--*****************************************************************-->
50
51 <!ENTITY % bool '(True|False)'>
52
53 <!-- MathQL query expression declaration -->
54
55 <!ENTITY % setexpr '(Rvar|Svar|Ref|Pattern|Select|LetSIn|LetVIn|Relation|
56                      Union|Intersect|Diff)'>
57
58 <!-- MathQL boolean expression declaration -->
59
60 <!ENTITY % boolexpr '(BOOL|NOT|AND|OR|EQ|SUB|MEET|EX)'>
61
62 <!-- MathQL string-set expression declaration -->
63
64 <!ENTITY % functexpr '(FUN|PROPERTY)'>
65
66 <!ENTITY % stringsetexpr '(CONST|CONSTLIST|REFOF|BINDER|VVAR|%functexpr;)'>
67
68 <!-- MathQL query top-element -->
69
70 <!ELEMENT MQLquery %setexpr;>
71
72 <!-- MathQL set expressions -->
73
74 <!ELEMENT Rvar EMPTY>
75 <!ATTLIST Rvar
76           name CDATA #REQUIRED>
77
78 <!ELEMENT Svar EMPTY>
79 <!ATTLIST Svar
80           name CDATA #REQUIRED>
81
82 <!ELEMENT Ref %stringsetexpr;>
83
84 <!ELEMENT Pattern %stringsetexpr;>
85
86 <!ELEMENT Select (In, Where)>
87
88 <!ELEMENT LetSIn (%setexpr;, Starget)>
89
90 <!ELEMENT LetVIn (%stringsetexpr;, Vtarget)>
91
92 <!ELEMENT Relation (PName?,%setexpr;, Attr+)>
93 <!ATTLIST Relation
94           name CDATA #REQUIRED
95           refine (sub|super) #IMPLIED>
96
97 <!ELEMENT Union (%setexpr;, %setexpr;)>
98
99 <!ELEMENT Intersect (%setexpr;, %setexpr;)>
100
101 <!ELEMENT Diff (%setexpr;, %setexpr;)>
102
103 <!-- MathQL set sub-expressions -->
104
105 <!ELEMENT In %setexpr;>
106
107 <!ELEMENT Where %boolexpr;>
108 <!ATTLIST Where
109           rvar CDATA #REQUIRED>
110
111 <!ELEMENT Starget %setexpr;>
112 <!ATTLIST Starget
113           svar CDATA #REQUIRED>
114
115 <!ELEMENT Vtarget %setexpr;>
116 <!ATTLIST Vtarget
117           vvar CDATA #REQUIRED>
118
119 <!ELEMENT Attr EMPTY>
120 <!ATTLIST Attr 
121           binder CDATA #REQUIRED>
122
123 <!ELEMENT PName (CONST+)>
124
125 <!-- MathQL boolean expressions -->
126
127 <!ELEMENT BOOL EMPTY>
128 <!ATTLIST BOOL
129           value %bool; #REQUIRED>
130
131 <!ELEMENT NOT %boolexpr;>
132
133 <!ELEMENT AND (%boolexpr;, %boolexpr;)>
134
135 <!ELEMENT OR (%boolexpr;, %boolexpr;)>
136
137 <!ELEMENT EQ (%stringsetexpr;, %stringsetexpr;)>
138
139 <!ELEMENT SUB (%stringsetexpr;, %stringsetexpr;)>
140
141 <!ELEMENT MEET (%stringsetexpr;, %stringsetexpr;)>
142
143 <!ELEMENT EX %boolexpr;>
144
145 <!-- MathQL string-set expressions -->
146
147 <!ELEMENT CONST (#PCDATA)>
148
149 <!ELEMENT CONSTLIST (CONST*)>
150
151 <!ELEMENT REFOF %setexpr;>
152
153 <!ELEMENT VVAR %stringsetexpr;>
154
155 <!ELEMENT BINDER (Rvar)>
156 <!ATTLIST BINDER
157           name CDATA #REQUIRED>
158
159 <!ELEMENT FUN %stringsetexpr;>
160 <!ATTLIST FUN
161           name CDATA #REQUIRED>
162
163 <!ELEMENT PROPERTY (Refine?,%stringsetexpr;)>
164 <!ATTLIST PROPERTY
165           name CDATA #REQUIRED>