Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 : #ifndef nsIXMLContentSink_h___
7 : #define nsIXMLContentSink_h___
8 :
9 : #include "nsIContentSink.h"
10 : #include "nsISupports.h"
11 :
12 : class nsIDocument;
13 : class nsIURI;
14 : class nsIChannel;
15 :
16 : #define NS_IXMLCONTENT_SINK_IID \
17 : { 0x63fedea0, 0x9b0f, 0x4d64, \
18 : { 0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35 } }
19 :
20 : /**
21 : * This interface represents a content sink for generic XML files.
22 : * The goal of this sink is to deal with XML documents that do not
23 : * have pre-built semantics, though it may also be implemented for
24 : * cases in which semantics are hard-wired.
25 : *
26 : * The expectation is that the parser has already performed
27 : * well-formedness and validity checking.
28 : *
29 : * XXX The expectation is that entity expansion will be done by the sink
30 : * itself. This would require, however, that the sink has the ability
31 : * to query the parser for entity replacement text.
32 : *
33 : * XXX This interface does not contain a mechanism for the sink to
34 : * get specific schema/DTD information from the parser. This information
35 : * may be necessary for entity expansion. It is also necessary for
36 : * building the DOM portions that relate to the schema.
37 : *
38 : * XXX This interface does not deal with the presence of an external
39 : * subset. It seems possible that this could be dealt with completely
40 : * at the parser level.
41 : */
42 :
43 22 : class nsIXMLContentSink : public nsIContentSink {
44 : public:
45 :
46 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_SINK_IID)
47 :
48 : };
49 :
50 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIXMLContentSink, NS_IXMLCONTENT_SINK_IID)
51 :
52 : nsresult
53 : NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult, nsIDocument* aDoc,
54 : nsIURI* aURL, nsISupports* aContainer,
55 : nsIChannel *aChannel);
56 :
57 : #endif // nsIXMLContentSink_h___
|