nsIXMLContentSink.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* -*- Mode: C++; tab-width: 8; 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. #include "nsIContentSink.h"
  8. #include "nsISupports.h"
  9. class nsIDocument;
  10. class nsIURI;
  11. class nsIChannel;
  12. #define NS_IXMLCONTENT_SINK_IID \
  13. { 0x63fedea0, 0x9b0f, 0x4d64, \
  14. { 0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35 } }
  15. /**
  16. * This interface represents a content sink for generic XML files.
  17. * The goal of this sink is to deal with XML documents that do not
  18. * have pre-built semantics, though it may also be implemented for
  19. * cases in which semantics are hard-wired.
  20. *
  21. * The expectation is that the parser has already performed
  22. * well-formedness and validity checking.
  23. *
  24. * XXX The expectation is that entity expansion will be done by the sink
  25. * itself. This would require, however, that the sink has the ability
  26. * to query the parser for entity replacement text.
  27. *
  28. * XXX This interface does not contain a mechanism for the sink to
  29. * get specific schema/DTD information from the parser. This information
  30. * may be necessary for entity expansion. It is also necessary for
  31. * building the DOM portions that relate to the schema.
  32. *
  33. * XXX This interface does not deal with the presence of an external
  34. * subset. It seems possible that this could be dealt with completely
  35. * at the parser level.
  36. */
  37. class nsIXMLContentSink : public nsIContentSink {
  38. public:
  39. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_SINK_IID)
  40. };
  41. NS_DEFINE_STATIC_IID_ACCESSOR(nsIXMLContentSink, NS_IXMLCONTENT_SINK_IID)
  42. nsresult
  43. NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult, nsIDocument* aDoc,
  44. nsIURI* aURL, nsISupports* aContainer,
  45. nsIChannel *aChannel);
  46. #endif // nsIXMLContentSink_h___