]> err.no Git - sope/blob - sope-xml/SaxObjC/SaxXMLReader.h
fixed a header file
[sope] / sope-xml / SaxObjC / SaxXMLReader.h
1 /*
2   Copyright (C) 2000-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
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 __SaxXMLReader_H__
24 #define __SaxXMLReader_H__
25
26 #import <Foundation/NSObject.h>
27 #include <SaxObjC/SaxContentHandler.h>
28 #include <SaxObjC/SaxDTDHandler.h>
29 #include <SaxObjC/SaxErrorHandler.h>
30 #include <SaxObjC/SaxEntityResolver.h>
31
32 /*
33   new in SAX 2.0beta, replaces SaxParser
34
35   Interface for reading an XML document using callbacks. 
36
37   This is a common interface that can be shared by many XML parsers. This
38   interface allows an application to set and query features and properties
39   in the parser, to register event handlers for document processing, and to
40   initiate a document parse.
41
42   This interface replaces the (now deprecated) SAX 1.0 Parser interface; it
43   currently extends Parser to aid in the transition to SAX2, but it will
44   likely not do so in any future versions of SAX.
45
46   The Reader interface contains two important enhancements over the old
47   Parser interface:
48
49     1. it adds a standard way to query and set features and properties; and 
50     2. it adds Namespace support, which is required for many higher-level XML
51        standards. 
52
53   There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader
54   and vice-versa.
55 */
56
57 @protocol SaxXMLReader
58
59 /* features & properties */
60
61 - (void)setFeature:(NSString *)_name to:(BOOL)_value;
62 - (BOOL)feature:(NSString *)_name;
63 - (void)setProperty:(NSString *)_name to:(id)_value;
64 - (id)property:(NSString *)_name;
65
66 /* handlers */
67
68 - (void)setContentHandler:(id<NSObject,SaxContentHandler>)_handler;
69 - (void)setDTDHandler:(id<NSObject,SaxDTDHandler>)_handler;
70 - (void)setErrorHandler:(id<NSObject,SaxErrorHandler>)_handler;
71 - (void)setEntityResolver:(id<NSObject,SaxEntityResolver>)_handler;
72 - (id<NSObject,SaxContentHandler>)contentHandler;
73 - (id<NSObject,SaxDTDHandler>)dtdHandler;
74 - (id<NSObject,SaxErrorHandler>)errorHandler;
75 - (id<NSObject,SaxEntityResolver>)entityResolver;
76
77 /* parsing */
78
79 - (void)parseFromSource:(id)_source;
80 - (void)parseFromSource:(id)_source systemId:(NSString *)_sysId;
81 - (void)parseFromSystemId:(NSString *)_sysId;
82
83 @end
84
85 #endif /* __SaxXMLReader_H__ */