michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsIXMLContentSink_h___ michael@0: #define nsIXMLContentSink_h___ michael@0: michael@0: #include "nsIContentSink.h" michael@0: #include "nsISupports.h" michael@0: michael@0: class nsIDocument; michael@0: class nsIURI; michael@0: class nsIChannel; michael@0: michael@0: #define NS_IXMLCONTENT_SINK_IID \ michael@0: { 0x63fedea0, 0x9b0f, 0x4d64, \ michael@0: { 0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35 } } michael@0: michael@0: /** michael@0: * This interface represents a content sink for generic XML files. michael@0: * The goal of this sink is to deal with XML documents that do not michael@0: * have pre-built semantics, though it may also be implemented for michael@0: * cases in which semantics are hard-wired. michael@0: * michael@0: * The expectation is that the parser has already performed michael@0: * well-formedness and validity checking. michael@0: * michael@0: * XXX The expectation is that entity expansion will be done by the sink michael@0: * itself. This would require, however, that the sink has the ability michael@0: * to query the parser for entity replacement text. michael@0: * michael@0: * XXX This interface does not contain a mechanism for the sink to michael@0: * get specific schema/DTD information from the parser. This information michael@0: * may be necessary for entity expansion. It is also necessary for michael@0: * building the DOM portions that relate to the schema. michael@0: * michael@0: * XXX This interface does not deal with the presence of an external michael@0: * subset. It seems possible that this could be dealt with completely michael@0: * at the parser level. michael@0: */ michael@0: michael@0: class nsIXMLContentSink : public nsIContentSink { michael@0: public: michael@0: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_SINK_IID) michael@0: michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIXMLContentSink, NS_IXMLCONTENT_SINK_IID) michael@0: michael@0: nsresult michael@0: NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult, nsIDocument* aDoc, michael@0: nsIURI* aURL, nsISupports* aContainer, michael@0: nsIChannel *aChannel); michael@0: michael@0: #endif // nsIXMLContentSink_h___