2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
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
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.
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
22 #ifndef __SaxDeclHandler_H__
23 #define __SaxDeclHandler_H__
30 In Java this class is in the ext-package, that is,
31 implementation is optional.
33 SAX2 extension handler for DTD declaration events.
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.
39 Note that data-related DTD declarations (unparsed entities and notations)
40 are already reported through the DTDHandler interface.
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.
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.
52 @protocol SaxDeclHandler
55 Report an attribute type declaration.
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
63 valueDefault - A string representing the attribute default ("#IMPLIED",
64 "#REQUIRED", or "#FIXED") or nil if none of these applies
66 - (void)attributeDeclaration:(NSString *)_attributeName
67 elementName:(NSString *)_elementName
68 type:(NSString *)_type
69 defaultType:(NSString *)_defType
70 defaultValue:(NSString *)_defValue;
73 Report an attribute type declaration.
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
81 If it is a parameter entity, the name will begin with '%'.
83 - (void)elementDeclaration:(NSString *)_name contentModel:(NSString *)_model;
86 Report a parsed external entity declaration.
88 Only the effective (first) declaration for each entity will be reported.
90 If it is a parameter entity, the name will begin with '%'.
92 - (void)externalEntityDeclaration:(NSString *)_name
93 publicId:(NSString *)_pub
94 systemId:(NSString *)_sys;
97 Report an internal entity declaration.
99 Only the effective (first) declaration for each entity will be reported.
101 If it is a parameter entity, the name will begin with '%'.
103 - (void)internalEntityDeclaration:(NSString *)_name value:(NSString *)_value;
107 #endif /* __SaxDeclHandler_H__ */