]> err.no Git - sope/blob - sope-xml/SaxObjC/SaxDeclHandler.h
removed NGCString
[sope] / sope-xml / SaxObjC / SaxDeclHandler.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
5
6   OGo 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   OGo 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 OGo; 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 // $Id$
22
23 #ifndef __SaxDeclHandler_H__
24 #define __SaxDeclHandler_H__
25
26 @class NSString;
27
28 /*
29   new in SAX 2.0beta
30
31   In Java this class is in the ext-package, that is,
32   implementation is optional.
33
34   SAX2 extension handler for DTD declaration events. 
35
36   This is an optional extension handler for SAX2 to provide information
37   about DTD declarations in an XML document. XML readers are not required
38   to support this handler.
39
40   Note that data-related DTD declarations (unparsed entities and notations)
41   are already reported through the DTDHandler interface.
42
43   If you are using the declaration handler together with a lexical handler,
44   all of the events will occur between the startDTD and the endDTD events.
45
46   To set the DeclHandler for an XML reader, use the setProperty method with
47   the propertyId "http://xml.org/sax/handlers/DeclHandler". If the reader
48   does not support declaration events, it will throw a
49   SAXNotRecognizedException or a SAXNotSupportedException when you attempt
50   to register the handler.
51 */
52
53 @protocol SaxDeclHandler
54
55 /*
56   Report an attribute type declaration.
57   
58   Only the effective (first) declaration for an attribute will be
59   reported. The type will be one of the strings "CDATA", "ID", "IDREF",
60   "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION",
61   or a parenthesized token group with the separator "|" and all whitespace
62   removed.
63
64   valueDefault - A string representing the attribute default ("#IMPLIED",
65   "#REQUIRED", or "#FIXED") or nil if none of these applies
66 */
67 - (void)attributeDeclaration:(NSString *)_attributeName
68   elementName:(NSString *)_elementName
69   type:(NSString *)_type
70   defaultType:(NSString *)_defType
71   defaultValue:(NSString *)_defValue;
72
73 /*
74   Report an attribute type declaration.
75   
76   Only the effective (first) declaration for an attribute will be
77   reported. The type will be one of the strings "CDATA", "ID", "IDREF",
78   "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION",
79   or a parenthesized token group with the separator "|" and all whitespace
80   removed.
81
82   If it is a parameter entity, the name will begin with '%'.
83 */
84 - (void)elementDeclaration:(NSString *)_name contentModel:(NSString *)_model;
85
86 /*
87   Report a parsed external entity declaration.
88   
89   Only the effective (first) declaration for each entity will be reported.
90
91   If it is a parameter entity, the name will begin with '%'.
92 */
93 - (void)externalEntityDeclaration:(NSString *)_name
94   publicId:(NSString *)_pub
95   systemId:(NSString *)_sys;
96
97 /*
98   Report an internal entity declaration.
99   
100   Only the effective (first) declaration for each entity will be reported.
101
102   If it is a parameter entity, the name will begin with '%'.
103 */
104 - (void)internalEntityDeclaration:(NSString *)_name value:(NSString *)_value;
105
106 @end
107
108 #endif /* __SaxDeclHandler_H__ */