1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- XML Processor -- 6-- -- 7-- Testsuite 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------------------------------------------------------------------------------ 44with League.Strings; 45with Matreshka.Internals.Strings; 46 47package XML.SAX.Input_Sources is 48 49 pragma Preelaborate; 50 51 type SAX_Input_Source is limited interface; 52 53 type SAX_Input_Source_Access is access all SAX_Input_Source'Class; 54 55-- not overriding procedure Set_String 56-- (Self : in out SAX_Input_Source; 57-- String : League.Strings.Universal_String) is abstract; 58-- 59-- procedure Set_Stream 60-- (Self : in out SAX_Input_Source; 61-- Stream : not null access Ada.Streams.Root_Stream_Type'Class); 62 63-- not overriding function Encoding 64-- (Self : SAX_Input_Source) return League.Strings.Universal_String; 65 66 not overriding function Public_Id 67 (Self : SAX_Input_Source) return League.Strings.Universal_String 68 is abstract; 69 -- Returns public identifier for the input source, or an empty string if 70 -- non was supplied. 71 72 not overriding function System_Id 73 (Self : SAX_Input_Source) return League.Strings.Universal_String 74 is abstract; 75 -- Returns system identifier for the input source, or an empty string if 76 -- non was supplied. 77 78-- not overriding procedure Set_Encoding 79-- (Self : in out SAX_Input_Source; 80-- Encoding : League.Strings.Universal_String); 81 82-- not overriding procedure Set_Public_Id 83-- (Self : in out SAX_Input_Source; 84-- Id : League.Strings.Universal_String) is abstract; 85 86 not overriding procedure Set_System_Id 87 (Self : in out SAX_Input_Source; 88 Id : League.Strings.Universal_String) is abstract; 89 -- Sets system identifier of the entity. 90 91 not overriding procedure Set_Version 92 (Self : in out SAX_Input_Source; 93 Version : League.Strings.Universal_String) is abstract; 94 -- Sets XML version for the entity. 95 96 not overriding procedure Next 97 (Self : in out SAX_Input_Source; 98 Buffer : in out 99 not null Matreshka.Internals.Strings.Shared_String_Access; 100 End_Of_Data : out Boolean) is abstract; 101 102 not overriding procedure Reset 103 (Self : in out SAX_Input_Source; 104 Version : League.Strings.Universal_String; 105 Encoding : League.Strings.Universal_String; 106 Rescan : out Boolean; 107 Success : out Boolean) is abstract; 108 -- Resets used version and encoding to specified. Sets Rescan to True when 109 -- encoding is changed and scanning must be restarted from the beginning of 110 -- the entity. Sets Success to False when error is detected. 111 112end XML.SAX.Input_Sources; 113