]> err.no Git - sope/blob - sope-xml/SaxObjC/SaxDeclHandler.h
fixed base64 decoding bug
[sope] / sope-xml / SaxObjC / SaxDeclHandler.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with SOPE; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #ifndef __SaxDeclHandler_H__
23 #define __SaxDeclHandler_H__
24
25 @class NSString;
26
27 /*
28   new in SAX 2.0beta
29
30   In Java this class is in the ext-package, that is,
31   implementation is optional.
32
33   SAX2 extension handler for DTD declaration events. 
34
35   This is an optional extension handler for SAX2 to provide information
36   about DTD declarations in an XML document. XML readers are not required
37   to support this handler.
38
39   Note that data-related DTD declarations (unparsed entities and notations)
40   are already reported through the DTDHandler interface.
41
42   If you are using the declaration handler together with a lexical handler,
43   all of the events will occur between the startDTD and the endDTD events.
44
45   To set the DeclHandler for an XML reader, use the setProperty method with
46   the propertyId "http://xml.org/sax/handlers/DeclHandler". If the reader
47   does not support declaration events, it will throw a
48   SAXNotRecognizedException or a SAXNotSupportedException when you attempt
49   to register the handler.
50 */
51
52 @protocol SaxDeclHandler
53
54 /*
55   Report an attribute type declaration.
56   
57   Only the effective (first) declaration for an attribute will be
58   reported. The type will be one of the strings "CDATA", "ID", "IDREF",
59   "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION",
60   or a parenthesized token group with the separator "|" and all whitespace
61   removed.
62
63   valueDefault - A string representing the attribute default ("#IMPLIED",
64   "#REQUIRED", or "#FIXED") or nil if none of these applies
65 */
66 - (void)attributeDeclaration:(NSString *)_attributeName
67   elementName:(NSString *)_elementName
68   type:(NSString *)_type
69   defaultType:(NSString *)_defType
70   defaultValue:(NSString *)_defValue;
71
72 /*
73   Report an attribute type declaration.
74   
75   Only the effective (first) declaration for an attribute will be
76   reported. The type will be one of the strings "CDATA", "ID", "IDREF",
77   "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION",
78   or a parenthesized token group with the separator "|" and all whitespace
79   removed.
80
81   If it is a parameter entity, the name will begin with '%'.
82 */
83 - (void)elementDeclaration:(NSString *)_name contentModel:(NSString *)_model;
84
85 /*
86   Report a parsed external entity declaration.
87   
88   Only the effective (first) declaration for each entity will be reported.
89
90   If it is a parameter entity, the name will begin with '%'.
91 */
92 - (void)externalEntityDeclaration:(NSString *)_name
93   publicId:(NSString *)_pub
94   systemId:(NSString *)_sys;
95
96 /*
97   Report an internal entity declaration.
98   
99   Only the effective (first) declaration for each entity will be reported.
100
101   If it is a parameter entity, the name will begin with '%'.
102 */
103 - (void)internalEntityDeclaration:(NSString *)_name value:(NSString *)_value;
104
105 @end
106
107 #endif /* __SaxDeclHandler_H__ */