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: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * Receive notification of basic DTD-related events. michael@0: * michael@0: * If a SAX application needs information about notations and michael@0: * unparsed entities, then the application implements this interface michael@0: * and registers an instance with the SAX parser using the parser's michael@0: * setDTDHandler method. The parser uses the instance to report michael@0: * notation and unparsed entity declarations to the application. michael@0: * michael@0: * Note that this interface includes only those DTD events that the michael@0: * XML recommendation requires processors to report: notation and michael@0: * unparsed entity declarations. michael@0: * michael@0: * The SAX parser may report these events in any order, regardless michael@0: * of the order in which the notations and unparsed entities were michael@0: * declared; however, all DTD events must be reported after the michael@0: * document handler's startDocument event, and before the first michael@0: * startElement event. (If the LexicalHandler is used, these events michael@0: * must also be reported before the endDTD event.) michael@0: */ michael@0: [scriptable, uuid(4d01f225-6cc5-11da-be43-001422106990)] michael@0: interface nsISAXDTDHandler : nsISupports { michael@0: michael@0: /** michael@0: * Receive notification of a notation declaration event. michael@0: * michael@0: * It is up to the application to record the notation for later michael@0: * reference, if necessary; notations may appear as attribute values michael@0: * and in unparsed entity declarations, and are sometime used with michael@0: * processing instruction target names. michael@0: * michael@0: * At least one of publicId and systemId must be non-null. If a michael@0: * system identifier is present, and it is a URL, the SAX parser michael@0: * must resolve it fully before passing it to the application michael@0: * through this event. michael@0: * michael@0: * There is no guarantee that the notation declaration will be michael@0: * reported before any unparsed entities that use it. michael@0: * michael@0: * @param name The notation name. michael@0: * @param publicId The notation's public identifier, or null if none was michael@0: * given. michael@0: * @param systemId The notation's system identifier, or null if none was michael@0: * given. michael@0: */ michael@0: void notationDecl(in AString name, michael@0: in AString publicId, michael@0: in AString systemId); michael@0: michael@0: /** michael@0: * Receive notification of an unparsed entity declaration event. michael@0: * michael@0: * Note that the notation name corresponds to a notation reported michael@0: * by the notationDecl event. It is up to the application to record michael@0: * the entity for later reference, if necessary; unparsed entities michael@0: * may appear as attribute values. michael@0: * michael@0: * If the system identifier is a URL, the parser must resolve it michael@0: * fully before passing it to the application. michael@0: * michael@0: * @param name The unparsed entity's name. michael@0: * @param publicId The entity's public identifier, or null if none was michael@0: * given. michael@0: * @param systemId The entity's system identifier, or null if none was michael@0: * given. michael@0: * @param notationName The name of the associated notation. michael@0: */ michael@0: void unparsedEntityDecl(in AString name, in AString publicId, michael@0: in AString systemId, in AString notationName); michael@0: };