1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                               XML Processor                              --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2010-2011, Vadim Godunko <vgodunko@gmail.com>                --
12-- All rights reserved.                                                     --
13--                                                                          --
14-- Redistribution and use in source and binary forms, with or without       --
15-- modification, are permitted provided that the following conditions       --
16-- are met:                                                                 --
17--                                                                          --
18--  * Redistributions of source code must retain the above copyright        --
19--    notice, this list of conditions and the following disclaimer.         --
20--                                                                          --
21--  * Redistributions in binary form must reproduce the above copyright     --
22--    notice, this list of conditions and the following disclaimer in the   --
23--    documentation and/or other materials provided with the distribution.  --
24--                                                                          --
25--  * Neither the name of the Vadim Godunko, IE nor the names of its        --
26--    contributors may be used to endorse or promote products derived from  --
27--    this software without specific prior written permission.              --
28--                                                                          --
29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      --
30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        --
31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR    --
32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT     --
33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   --
34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR   --
36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF   --
37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING     --
38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS       --
39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.             --
40--                                                                          --
41------------------------------------------------------------------------------
42--  $Revision: 2031 $ $Date: 2011-07-24 16:07:15 +0400 (Sun, 24 Jul 2011) $
43------------------------------------------------------------------------------
44
45package Matreshka.Internals.XML is
46
47   pragma Pure;
48
49   type Attribute_Identifier is private;
50   No_Attribute : constant Attribute_Identifier;
51   --  Internal identifier of attribute type declaration.
52
53   type Element_Identifier is private;
54   No_Element : constant Element_Identifier;
55   --  Internal identifier of element declaration.
56
57   type Entity_Identifier is private;
58   No_Entity   : constant Entity_Identifier;
59   Entity_lt   : constant Entity_Identifier;
60   Entity_gt   : constant Entity_Identifier;
61   Entity_amp  : constant Entity_Identifier;
62   Entity_apos : constant Entity_Identifier;
63   Entity_quot : constant Entity_Identifier;
64   --  Internal identifier of entity.
65
66   type Notation_Identifier is private;
67   No_Notation : constant Notation_Identifier;
68   --  Internal identifier of notation.
69
70   type Symbol_Identifier is private;
71   No_Symbol       : constant Symbol_Identifier;
72   Symbol_lt       : constant Symbol_Identifier;
73   Symbol_gt       : constant Symbol_Identifier;
74   Symbol_amp      : constant Symbol_Identifier;
75   Symbol_apos     : constant Symbol_Identifier;
76   Symbol_quot     : constant Symbol_Identifier;
77   Symbol_CDATA    : constant Symbol_Identifier;
78   Symbol_ID       : constant Symbol_Identifier;
79   Symbol_IDREF    : constant Symbol_Identifier;
80   Symbol_IDREFS   : constant Symbol_Identifier;
81   Symbol_NMTOKEN  : constant Symbol_Identifier;
82   Symbol_NMTOKENS : constant Symbol_Identifier;
83   Symbol_ENTITY   : constant Symbol_Identifier;
84   Symbol_ENTITIES : constant Symbol_Identifier;
85   Symbol_NOTATION : constant Symbol_Identifier;
86   Symbol_xml      : constant Symbol_Identifier;
87   Symbol_xmlns    : constant Symbol_Identifier;
88   Symbol_xml_NS   : constant Symbol_Identifier;
89   Symbol_xmlns_NS : constant Symbol_Identifier;
90   Symbol_xml_base : constant Symbol_Identifier;
91   --  Internal identifier of symbol. Symbols are used to associate different
92   --  kinds of items with name, and to minimize amount of used memory to store
93   --  names.
94
95private
96
97   type Attribute_Identifier is mod 2 ** 32;
98   No_Attribute : constant Attribute_Identifier := 0;
99
100   type Element_Identifier is mod 2 ** 32;
101   No_Element : constant Element_Identifier := 0;
102
103   type Entity_Identifier is mod 2 ** 32;
104   No_Entity   : constant Entity_Identifier := 0;
105   Entity_lt   : constant Entity_Identifier := 1;
106   Entity_gt   : constant Entity_Identifier := 2;
107   Entity_amp  : constant Entity_Identifier := 3;
108   Entity_apos : constant Entity_Identifier := 4;
109   Entity_quot : constant Entity_Identifier := 5;
110
111   type Notation_Identifier is mod 2 ** 32;
112   No_Notation : constant Notation_Identifier := 0;
113
114   type Symbol_Identifier is mod 2 ** 32;
115   No_Symbol       : constant Symbol_Identifier := 0;
116   Symbol_lt       : constant Symbol_Identifier := 1;
117   Symbol_gt       : constant Symbol_Identifier := 2;
118   Symbol_amp      : constant Symbol_Identifier := 3;
119   Symbol_apos     : constant Symbol_Identifier := 4;
120   Symbol_quot     : constant Symbol_Identifier := 5;
121   Symbol_CDATA    : constant Symbol_Identifier := 6;
122   Symbol_ID       : constant Symbol_Identifier := 7;
123   Symbol_IDREF    : constant Symbol_Identifier := 8;
124   Symbol_IDREFS   : constant Symbol_Identifier := 9;
125   Symbol_NMTOKEN  : constant Symbol_Identifier := 10;
126   Symbol_NMTOKENS : constant Symbol_Identifier := 11;
127   Symbol_ENTITY   : constant Symbol_Identifier := 12;
128   Symbol_ENTITIES : constant Symbol_Identifier := 13;
129   Symbol_NOTATION : constant Symbol_Identifier := 14;
130   Symbol_xml      : constant Symbol_Identifier := 15;
131   Symbol_xmlns    : constant Symbol_Identifier := 16;
132   Symbol_xml_NS   : constant Symbol_Identifier := 17;
133   Symbol_xmlns_NS : constant Symbol_Identifier := 18;
134   Symbol_xml_base : constant Symbol_Identifier := 19;
135
136end Matreshka.Internals.XML;
137