1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xml/document/public/nsIXMLContentSink.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef nsIXMLContentSink_h___ 1.9 +#define nsIXMLContentSink_h___ 1.10 + 1.11 +#include "nsIContentSink.h" 1.12 +#include "nsISupports.h" 1.13 + 1.14 +class nsIDocument; 1.15 +class nsIURI; 1.16 +class nsIChannel; 1.17 + 1.18 +#define NS_IXMLCONTENT_SINK_IID \ 1.19 + { 0x63fedea0, 0x9b0f, 0x4d64, \ 1.20 + { 0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35 } } 1.21 + 1.22 +/** 1.23 + * This interface represents a content sink for generic XML files. 1.24 + * The goal of this sink is to deal with XML documents that do not 1.25 + * have pre-built semantics, though it may also be implemented for 1.26 + * cases in which semantics are hard-wired. 1.27 + * 1.28 + * The expectation is that the parser has already performed 1.29 + * well-formedness and validity checking. 1.30 + * 1.31 + * XXX The expectation is that entity expansion will be done by the sink 1.32 + * itself. This would require, however, that the sink has the ability 1.33 + * to query the parser for entity replacement text. 1.34 + * 1.35 + * XXX This interface does not contain a mechanism for the sink to 1.36 + * get specific schema/DTD information from the parser. This information 1.37 + * may be necessary for entity expansion. It is also necessary for 1.38 + * building the DOM portions that relate to the schema. 1.39 + * 1.40 + * XXX This interface does not deal with the presence of an external 1.41 + * subset. It seems possible that this could be dealt with completely 1.42 + * at the parser level. 1.43 + */ 1.44 + 1.45 +class nsIXMLContentSink : public nsIContentSink { 1.46 +public: 1.47 + 1.48 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_SINK_IID) 1.49 + 1.50 +}; 1.51 + 1.52 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIXMLContentSink, NS_IXMLCONTENT_SINK_IID) 1.53 + 1.54 +nsresult 1.55 +NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult, nsIDocument* aDoc, 1.56 + nsIURI* aURL, nsISupports* aContainer, 1.57 + nsIChannel *aChannel); 1.58 + 1.59 +#endif // nsIXMLContentSink_h___