]> err.no Git - sope/blob - sope-xml/STXSaxDriver/STXSaxDriver.h
fixed some comments
[sope] / sope-xml / STXSaxDriver / STXSaxDriver.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 __ExtraSTX_STXSaxDriver_H__
23 #define __ExtraSTX_STXSaxDriver_H__
24
25 #import <Foundation/NSObject.h>
26 #include <SaxObjC/SaxObjC.h>
27
28 @class NSArray, NSDictionary;
29 @class SaxAttributes;
30 @class StructuredTextParagraph, StructuredTextList, StructuredTextListItem;
31 @class StructuredTextLiteralBlock, StructuredTextHeader;
32
33 @interface STXSaxDriver : NSObject < SaxXMLReader >
34 {
35   id<NSObject,SaxContentHandler> contentHandler;
36   id<NSObject,SaxErrorHandler>   errorHandler;
37   id<NSObject,SaxLexicalHandler> lexicalHandler;
38   id<NSObject,SaxEntityResolver> entityResolver;
39
40   NSDictionary  *context;
41   SaxAttributes *attrs;
42 }
43
44 /* handlers */
45
46 - (void)setContentHandler:(id<NSObject,SaxContentHandler>)_handler;
47 - (void)setDTDHandler:(id<NSObject,SaxDTDHandler>)_handler;
48 - (void)setErrorHandler:(id<NSObject,SaxErrorHandler>)_handler;
49 - (void)setEntityResolver:(id<NSObject,SaxEntityResolver>)_handler;
50 - (id<NSObject,SaxContentHandler>)contentHandler;
51 - (id<NSObject,SaxDTDHandler>)dtdHandler;
52 - (id<NSObject,SaxErrorHandler>)errorHandler;
53 - (id<NSObject,SaxEntityResolver>)entityResolver;
54
55 /* parsing */
56
57 - (void)parseFromSource:(id)_source systemId:(NSString *)_sysId;
58
59 /* generating events */
60
61 - (void)produceSaxEventsForParagraph:(StructuredTextParagraph *)_p;
62 - (void)produceSaxEventsForList:(StructuredTextList *)_list;
63 - (void)produceSaxEventsForListItem:(StructuredTextListItem *)_item;
64 - (void)produceSaxEventsForLiteralBlock:(StructuredTextLiteralBlock *)_block;
65 - (void)produceSaxEventsForHeader:(StructuredTextHeader *)_header;
66
67 - (void)produceSaxEventsForElement:(id)_element;
68 - (void)produceSaxEventsForElements:(NSArray *)_elems;
69
70 @end
71
72 #endif /* __ExtraSTX_STXSaxDriver_H__ */