]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/doc/EXTENSIONS.xml
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / DEVEL / pxp / pxp / doc / EXTENSIONS.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE readme SYSTEM "readme.dtd" [
3
4 <!ENTITY % common SYSTEM "common.xml">
5 %common;
6
7 <!-- Special HTML config: -->
8 <!ENTITY % readme:html:up '<a href="../..">up</a>'>
9
10 <!ENTITY % config SYSTEM "config.xml">
11 %config;
12
13 ]>
14
15 <readme title="Extensions of the XML specification">
16
17   <sect1>
18     <title>This document</title>
19     <p>This parser has some options extending the XML specification. Here, the 
20 options are explained.
21 </p>
22   </sect1>
23
24   <sect1>
25     <title>Optional declarations instead of mandatory declarations</title>
26
27 <p>The XML spec demands that elements, notations, and attributes must be
28 declared. However, there are sometimes situations where a different rule would
29 be better: <em>If</em> there is a declaration, the actual instance of the
30 element type, notation reference or attribute must match the pattern of the
31 declaration; but if the declaration is missing, a reasonable default declaration
32 should be assumed.</p> 
33
34 <p>I have an example that seems to be typical: The inclusion of HTML into a
35 meta language. Imagine you have defined some type of "generator" or other tool
36 working with HTML fragments, and your document contains two types of elements:
37 The generating elements (with a name like "gen:xxx"), and the object elements
38 which are HTML. As HTML is still evolving, you do not want to declare the HTML
39 elements; the HTML fragments should be treated as well-formed XML fragments. In
40 contrast to this, the elements of the generator should be declared and
41 validated because you can more easily detect errors.</p> 
42
43 <p>The following two processing instructions can be included into the DTD:</p>
44     <ul>
45       <li><p><code><![CDATA[<?pxp:dtd optional-element-and-notation-declarations?>]]></code>
46         References to unknown element types and notations no longer cause an
47         error. The element may contain everything, but it must be still
48         well-formed. It may have arbitrary attributes, and every attribute is
49         treated as an #IMPLIED CDATA attribute.</p>
50       </li>
51       <li><p><code><![CDATA[<?pxp:dtd optional-attribute-declarations elements="x y ..."?>]]></code>
52         References to unknown attributes inside one of the enumerated elements
53         no longer cause an error. Such an attribute is treated as an #IMPLIED
54         CDATA attribute.
55 </p>
56
57 <p>If there are several "optional-attribute-declarations" PIs, they are all
58 interpreted (implicitly merged).</p>
59       </li>
60     </ul>
61   </sect1>
62 </readme>