root/src/jomdoc/trunk/src/jomdoc/org/omdoc/jomdoc/coll/ntn/default.ntn

Revision 2278, 13.5 KB (checked in by dmisev, 18 months ago)

improve ref contraction, and math object collection before rendering

  • Property svn:mergeinfo set to
    /src/jomdoc/branches/jomdoc-tntbase/src/jomdoc/org/omdoc/jomdoc/ntn/coll/ntn/default.ntn981-1083
    /src/jomdoc/trunk/src/jomdoc/org/omdoc/jomdoc/ntn/coll/ntn/default.ntn160-487
    /trunk/src/jomdoc/org/omdoc/jomdoc/ntn/coll/ntn/default.ntn3-6
Line 
1<?xml version="1.0"?>
2<notations xml:id="id" xmlns="http://omdoc.org/ns" xmlns:o="http://omdoc.org/ns"  xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:om="http://www.openmath.org/OpenMath">
3
4  <!-- om:OMOBJ -->
5  <notation>
6    <prototype>
7      <om:OMOBJ>
8        <exprlist name="contents">
9            <expr name="content" />
10        </exprlist>
11      </om:OMOBJ>
12    </prototype>
13    <rendering>
14      <m:math>
15        <iterate name="contents">
16          <separator />
17          <render name="content" />
18        </iterate>
19      </m:math>
20    </rendering>
21  </notation>
22
23  <!-- m:math -->
24  <notation>
25    <prototype>
26      <m:math>
27        <exprlist name="contents">
28          <expr name="content" />
29        </exprlist>
30      </m:math>
31    </prototype>
32    <rendering>
33      <m:math>
34        <iterate name="contents">
35          <separator />
36          <render name="content" />
37        </iterate>
38      </m:math>
39    </rendering>
40  </notation>
41
42  <!-- OMS -->
43  <notation>
44    <prototype>
45      <element ns="http://www.openmath.org/OpenMath" name="OMS">
46        <attribute name="name">
47          <tvar name="symbolname" />
48        </attribute>
49      </element>
50    </prototype>
51    <rendering>
52      <m:mo>
53        <render name="symbolname" />
54      </m:mo>
55    </rendering>
56  </notation>
57
58  <!-- csymbol -->
59  <notation>
60    <prototype>
61      <element ns="http://www.w3.org/1998/Math/MathML" name="csymbol">
62        <tvar name="symbolname" />
63      </element>
64    </prototype>
65    <rendering>
66      <m:mo>
67        <render name="symbolname" />
68      </m:mo>
69    </rendering>
70  </notation>
71
72  <!-- OMV -->
73  <notation>
74    <prototype>
75      <element ns="http://www.openmath.org/OpenMath" name="OMV">
76        <attribute name="name">
77          <tvar name="varname" />
78        </attribute>
79      </element>
80    </prototype>
81    <rendering>
82      <m:mi>
83        <render name="varname" />
84      </m:mi>
85    </rendering>
86  </notation>
87
88  <!-- ci -->
89  <notation>
90    <prototype>
91      <element ns="http://www.w3.org/1998/Math/MathML" name="ci">
92        <tvar name="varname" />
93      </element>
94    </prototype>
95    <rendering>
96      <m:mi>
97        <render name="varname" />
98      </m:mi>
99    </rendering>
100  </notation>
101
102  <!-- OMI -->
103  <notation>
104    <prototype>
105      <element ns="http://www.openmath.org/OpenMath" name="OMI">
106        <tvar name="content" />
107      </element>
108    </prototype>
109    <rendering>
110      <m:mn>
111        <render name="content" />
112      </m:mn>
113    </rendering>
114  </notation>
115
116  <!-- OMF -->
117  <notation>
118    <prototype>
119      <element ns="http://www.openmath.org/OpenMath" name="OMF">
120        <attribute name="dec">
121          <tvar name="content" />
122        </attribute>
123      </element>
124    </prototype>
125    <rendering>
126      <m:mn>
127        <render name="content" />
128      </m:mn>
129    </rendering>
130  </notation>
131
132  <!-- cn -->
133  <notation>
134    <prototype>
135      <element ns="http://www.w3.org/1998/Math/MathML" name="cn">
136        <tvar name="content" />
137      </element>
138    </prototype>
139    <rendering>
140      <m:mn>
141        <render name="content" />
142      </m:mn>
143    </rendering>
144  </notation>
145
146  <!-- OMSTR -->
147  <notation>
148    <prototype>
149      <element ns="http://www.openmath.org/OpenMath" name="OMSTR">
150        <tvar name="content" />
151      </element>
152    </prototype>
153    <rendering>
154      <m:mtext>
155        <render name="content" />
156      </m:mtext>
157    </rendering>
158  </notation>
159
160  <!-- OMB -->
161  <notation>
162    <prototype>
163      <element ns="http://www.openmath.org/OpenMath" name="OMB">
164        <tvar name="content" />
165      </element>
166    </prototype>
167    <rendering>
168      <m:mtext>
169        <render name="content" />
170      </m:mtext>
171    </rendering>
172  </notation>
173
174  <!-- OMA -->
175  <notation>
176    <prototype>
177      <om:OMA>
178        <expr name="fun" />
179        <exprlist name="args">
180          <expr name="arg" />
181        </exprlist>
182      </om:OMA>
183    </prototype>
184    <rendering>
185      <m:mrow>
186        <render name="fun" />
187        <m:mo fence="true" o:egroup="fence">(</m:mo>
188        <iterate name="args">
189          <separator>
190            <m:mo separator="true">,</m:mo>
191          </separator>
192          <render name="arg" />
193        </iterate>
194        <m:mo fence="true" o:egroup="fence">)</m:mo>
195      </m:mrow>
196    </rendering>
197  </notation>
198
199  <!-- apply -->
200  <notation>
201    <prototype>
202      <m:apply>
203        <expr name="bex" />
204        <exprlist name="args">
205          <expr name="arg" />
206        </exprlist>
207      </m:apply>
208    </prototype>
209    <rendering>
210      <m:mrow>
211        <render name="bex" />
212        <m:mo fence="true" o:egroup="fence">(</m:mo>
213        <iterate name="args">
214          <separator>
215            <m:mo separator="true">,</m:mo>
216          </separator>
217          <render name="arg" />
218        </iterate>
219        <m:mo fence="true" o:egroup="fence">)</m:mo>
220      </m:mrow>
221    </rendering>
222  </notation>
223
224  <!-- OMBIND -->
225  <notation>
226    <!-- binding without qualifiers -->
227    <prototype>
228      <om:OMBIND>
229        <expr name="bex" />
230        <om:OMBVAR>
231          <exprlist name="bvars">
232            <expr name="bvar" />
233          </exprlist>
234        </om:OMBVAR>
235        <expr name="body" />
236      </om:OMBIND>
237    </prototype>
238    <rendering>
239      <m:mrow>
240        <render name="bex" />
241        <iterate name="bvars">
242          <separator>
243            <m:mo o:egroup="separator" separator="true">,</m:mo>
244          </separator>
245          <render name="bvar" />
246        </iterate>
247        <m:mo o:egroup="separator" separator="true">.</m:mo>
248        <render name="body" />
249      </m:mrow>
250    </rendering>
251  </notation>
252
253  <!-- bind -->
254  <notation>
255    <prototype>
256      <m:bind>
257        <expr name="bex" />
258        <exprlist name="bvars">
259          <m:bvar>
260            <expr name="bvar" />
261          </m:bvar>
262        </exprlist>
263        <expr name="body" />
264      </m:bind>
265    </prototype>
266    <rendering>
267      <m:mrow>
268        <render name="bex" />
269        <iterate name="bvars">
270          <separator>
271            <m:mo o:egroup="separator" separator="true">,</m:mo>
272          </separator>
273          <render name="bvar" />
274        </iterate>
275        <m:mo o:egroup="separator" separator="true">.</m:mo>
276        <render name="body" />
277      </m:mrow>
278    </rendering>
279  </notation>
280
281  <!-- apply bind -->
282  <notation>
283    <prototype>
284      <m:apply>
285        <expr name="bex" />
286        <exprlist name="bvars">
287          <m:bvar>
288            <expr name="bvar" />
289          </m:bvar>
290        </exprlist>
291        <expr name="body" />
292      </m:apply>
293    </prototype>
294    <rendering>
295      <m:mrow>
296        <render name="bex" />
297        <iterate name="bvars">
298          <separator>
299            <m:mo o:egroup="separator" separator="true">,</m:mo>
300          </separator>
301          <render name="bvar" />
302        </iterate>
303        <m:mo o:egroup="separator" separator="true">.</m:mo>
304        <render name="body" />
305      </m:mrow>
306    </rendering>
307  </notation>
308
309  <!-- pragmatic bind with condition -->
310  <notation>
311    <prototype>
312      <m:bind>
313        <expr name="bex" />
314        <exprlist name="bvars">
315          <m:bvar>
316            <expr name="bvar" />
317          </m:bvar>
318        </exprlist>
319        <m:condition>
320          <expr name="condition" />
321        </m:condition>
322        <expr name="body" />
323      </m:bind>
324    </prototype>
325    <rendering>
326      <m:mrow>
327        <render name="bex" />
328        <iterate name="bvars">
329          <separator>
330            <m:mo o:egroup="separator" separator="true">,</m:mo>
331          </separator>
332          <render name="bvar" />
333        </iterate>
334        <m:mo o:egroup="separator" separator="true">:</m:mo>
335        <render name="condition" />
336        <m:mo o:egroup="separator" separator="true">.</m:mo>
337        <render name="body" />
338      </m:mrow>
339    </rendering>
340  </notation>
341
342  <!-- apply bind with condition -->
343  <notation>
344    <prototype>
345      <m:apply>
346        <expr name="bex" />
347        <exprlist name="bvars">
348          <m:bvar>
349            <expr name="bvar" />
350          </m:bvar>
351        </exprlist>
352        <m:condition>
353          <expr name="condition" />
354        </m:condition>
355        <expr name="body" />
356      </m:apply>
357    </prototype>
358    <rendering>
359      <m:mrow>
360        <render name="bex" />
361        <iterate name="bvars">
362          <separator>
363            <m:mo o:egroup="separator" separator="true">,</m:mo>
364          </separator>
365          <render name="bvar" />
366        </iterate>
367        <m:mo o:egroup="separator" separator="true">:</m:mo>
368        <render name="condition" />
369        <m:mo o:egroup="separator" separator="true">.</m:mo>
370        <render name="body" />
371      </m:mrow>
372    </rendering>
373  </notation>
374
375  <!-- pragmatic bind with domainofapplication -->
376  <notation>
377    <prototype>
378      <m:bind>
379        <expr name="bex" />
380        <exprlist name="bvars">
381          <m:bvar>
382            <expr name="bvar" />
383          </m:bvar>
384        </exprlist>
385        <m:domainofapplication>
386          <expr name="domain" />
387        </m:domainofapplication>
388        <expr name="body" />
389      </m:bind>
390    </prototype>
391    <rendering>
392      <m:mrow>
393        <render name="bex" />
394        <iterate name="bvars">
395          <separator>
396            <m:mo o:egroup="separator" separator="true">,</m:mo>
397          </separator>
398          <render name="bvar" />
399        </iterate>
400        <m:mo o:egroup="separator" separator="true">&#x2208;</m:mo>
401        <render name="domain" />
402        <m:mo o:egroup="separator" separator="true">.</m:mo>
403        <render name="body" />
404      </m:mrow>
405    </rendering>
406  </notation>
407
408  <!-- apply bind with domainofapplication -->
409  <notation>
410    <prototype>
411      <m:apply>
412        <expr name="bex" />
413        <exprlist name="bvars">
414          <m:bvar>
415            <expr name="bvar" />
416          </m:bvar>
417        </exprlist>
418        <m:domainofapplication>
419          <expr name="domain" />
420        </m:domainofapplication>
421        <expr name="body" />
422      </m:apply>
423    </prototype>
424    <rendering>
425      <m:mrow>
426        <render name="bex" />
427        <iterate name="bvars">
428          <separator>
429            <m:mo o:egroup="separator" separator="true">,</m:mo>
430          </separator>
431          <render name="bvar" />
432        </iterate>
433        <m:mo o:egroup="separator" separator="true">&#x2208;</m:mo>
434        <render name="domain" />
435        <m:mo o:egroup="separator" separator="true">.</m:mo>
436        <render name="body" />
437      </m:mrow>
438    </rendering>
439  </notation>
440
441  <!-- OMBVAR - bound variables -->
442  <notation>
443    <prototype>
444      <om:OMBVAR>
445        <exprlist name="bvars">
446          <expr name="bvar" />
447        </exprlist>
448      </om:OMBVAR>
449    </prototype>
450    <rendering>
451      <iterate name="bvars">
452        <separator>
453          <m:mo o:egroup="separator" separator="true">,</m:mo>
454        </separator>
455        <render name="bvar" />
456      </iterate>
457      <m:mo o:egroup="separator" separator="true">.</m:mo>
458    </rendering>
459  </notation>
460
461  <!-- bvar - bound variables -->
462  <notation>
463    <prototype>
464      <bvar>
465        <exprlist name="bvars">
466          <expr name="bvar" />
467        </exprlist>
468      </bvar>
469    </prototype>
470    <rendering>
471      <iterate name="bvars">
472        <separator>
473          <m:mo o:egroup="separator" separator="true">,</m:mo>
474        </separator>
475        <render name="bvar" />
476      </iterate>
477      <m:mo o:egroup="separator" separator="true">.</m:mo>
478    </rendering>
479  </notation>
480
481  <!-- some specific OMATTP -->
482  <notation>
483    <prototype>
484      <om:OMATTR>
485        <om:OMATP>
486          <om:OMS cd="OMPres" name="PMML"/>
487          <om:OMFOREIGN><expr name="content" /></om:OMFOREIGN>
488        </om:OMATP>
489        <expr name="scope"/>
490      </om:OMATTR>
491    </prototype>
492    <rendering>
493      <render name="content" />
494    </rendering>
495  </notation>
496
497  <!-- OMATTR -->
498  <notation>
499    <prototype>
500      <om:OMATTR>
501        <expr name="omatp" />
502        <expr name="omel" />
503      </om:OMATTR>
504    </prototype>
505    <rendering>
506      <m:mrow>
507        <render name="omel" />
508        <m:mo o:egroup="separator" separator="true">:</m:mo>
509        <render name="omatp" />
510      </m:mrow>
511    </rendering>
512  </notation>
513
514  <!-- OMATP -->
515  <notation>
516    <prototype>
517      <om:OMATP>
518        <exprlist name="omatp">
519          <expr name="oms" />
520          <expr name="omel" />
521        </exprlist>
522      </om:OMATP>
523    </prototype>
524    <rendering>
525      <iterate name="omatp">
526        <separator>
527          <m:mo o:egroup="separator" separator="true">,</m:mo>
528        </separator>
529        <m:mo fence="true" o:egroup="fence">(</m:mo>
530        <render name="oms" />
531        <m:mo o:egroup="separator" separator="true">,</m:mo>
532        <render name="omel" />
533        <m:mo fence="true" o:egroup="fence">)</m:mo>
534      </iterate>
535    </rendering>
536  </notation>
537
538  <!-- OME - errors -->
539  <notation>
540    <prototype>
541      <om:OME>
542        <expr name="err" />
543        <expr name="arg" />
544      </om:OME>
545    </prototype>
546    <rendering>
547      <m:mstyle color="#ff0000">
548        <m:mrow>
549          <render name="err" />
550          <m:mo o:egroup="separator" separator="true">:</m:mo>
551          <render name="arg" />
552        </m:mrow>
553      </m:mstyle>
554    </rendering>
555  </notation>
556
557  <!-- cerror - errors -->
558  <notation>
559    <prototype>
560      <m:cerror>
561        <expr name="err" />
562        <expr name="arg" />
563      </m:cerror>
564    </prototype>
565    <rendering>
566      <m:mstyle color="#ff0000">
567        <m:mrow>
568          <render name="err" />
569          <m:mo o:egroup="separator" separator="true">:</m:mo>
570          <render name="arg" />
571        </m:mrow>
572      </m:mstyle>
573    </rendering>
574  </notation>
575
576  <!-- OMFOREIGN - foreign objects -->
577  <notation>
578    <prototype>
579      <om:OMFOREIGN>
580      </om:OMFOREIGN>
581    </prototype>
582    <rendering>
583    </rendering>
584  </notation>
585</notations>
Note: See TracBrowser for help on using the browser.