]> matita.cs.unibo.it Git - helm.git/blob - helm/mathql/xmathql.dtd
Modified Files:
[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 (Refine?,%setexpr;, Attr+)>
93 <!ATTLIST Relation
94           name CDATA #REQUIRED>
95
96 <!ELEMENT Union (%setexpr;, %setexpr;)>
97
98 <!ELEMENT Intersect (%setexpr;, %setexpr;)>
99
100 <!ELEMENT Diff (%setexpr;, %setexpr;)>
101
102 <!-- MathQL set sub-expressions -->
103
104 <!ELEMENT In %setexpr;>
105
106 <!ELEMENT Where %boolexpr;>
107 <!ATTLIST Where
108           rvar CDATA #REQUIRED>
109
110 <!ELEMENT Starget %setexpr;>
111 <!ATTLIST Starget
112           svar CDATA #REQUIRED>
113
114 <!ELEMENT Vtarget %setexpr;>
115 <!ATTLIST Vtarget
116           vvar CDATA #REQUIRED>
117
118 <!ELEMENT Attr EMPTY>
119 <!ATTLIST Attr 
120           binder CDATA #REQUIRED>
121
122 <!ELEMENT Refine (SUB|SUPER|CONST+)>
123
124 <!-- MathQL boolean expressions -->
125
126 <!ELEMENT BOOL EMPTY>
127 <!ATTLIST BOOL
128           value %bool; #REQUIRED>
129
130 <!ELEMENT NOT %boolexpr;>
131
132 <!ELEMENT AND (%boolexpr;, %boolexpr;)>
133
134 <!ELEMENT OR (%boolexpr;, %boolexpr;)>
135
136 <!ELEMENT EQ (%stringsetexpr;, %stringsetexpr;)>
137
138 <!ELEMENT SUB (%stringsetexpr;, %stringsetexpr;)>
139
140 <!ELEMENT MEET (%stringsetexpr;, %stringsetexpr;)>
141
142 <!ELEMENT EX %boolexpr;>
143
144 <!-- MathQL string-set expressions -->
145
146 <!ELEMENT CONST (#PCDATA)>
147
148 <!ELEMENT CONSTLIST (CONST*)>
149
150 <!ELEMENT REFOF %setexpr;>
151
152 <!ELEMENT VVAR %stringsetexpr;>
153
154 <!ELEMENT BINDER (Rvar)>
155 <!ATTLIST BINDER
156           name CDATA #REQUIRED>
157
158 <!ELEMENT FUN %stringsetexpr;>
159 <!ATTLIST FUN
160           name CDATA #REQUIRED>
161
162 <!ELEMENT PROPERTY (Refine?,%stringsetexpr;)>
163 <!ATTLIST PROPERTY
164           name CDATA #REQUIRED>