content/xml/document/public/nsIXMLContentSink.h

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

mercurial