2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
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
23 #ifndef __SaxDeclHandler_H__
24 #define __SaxDeclHandler_H__
31 In Java this class is in the ext-package, that is,
32 implementation is optional.
34 SAX2 extension handler for DTD declaration events.
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.
40 Note that data-related DTD declarations (unparsed entities and notations)
41 are already reported through the DTDHandler interface.
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.
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.
53 @protocol SaxDeclHandler
56 Report an attribute type declaration.
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
64 valueDefault - A string representing the attribute default ("#IMPLIED",
65 "#REQUIRED", or "#FIXED") or nil if none of these applies
67 - (void)attributeDeclaration:(NSString *)_attributeName
68 elementName:(NSString *)_elementName
69 type:(NSString *)_type
70 defaultType:(NSString *)_defType
71 defaultValue:(NSString *)_defValue;
74 Report an attribute type declaration.
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
82 If it is a parameter entity, the name will begin with '%'.
84 - (void)elementDeclaration:(NSString *)_name contentModel:(NSString *)_model;
87 Report a parsed external entity declaration.
89 Only the effective (first) declaration for each entity will be reported.
91 If it is a parameter entity, the name will begin with '%'.
93 - (void)externalEntityDeclaration:(NSString *)_name
94 publicId:(NSString *)_pub
95 systemId:(NSString *)_sys;
98 Report an internal entity declaration.
100 Only the effective (first) declaration for each entity will be reported.
102 If it is a parameter entity, the name will begin with '%'.
104 - (void)internalEntityDeclaration:(NSString *)_name value:(NSString *)_value;
108 #endif /* __SaxDeclHandler_H__ */