parser/xml/public/nsISAXDTDHandler.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/parser/xml/public/nsISAXDTDHandler.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,77 @@
     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 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/**
    1.12 + * Receive notification of basic DTD-related events.
    1.13 + *
    1.14 + * If a SAX application needs information about notations and
    1.15 + * unparsed entities, then the application implements this interface
    1.16 + * and registers an instance with the SAX parser using the parser's
    1.17 + * setDTDHandler method. The parser uses the instance to report
    1.18 + * notation and unparsed entity declarations to the application.
    1.19 + *
    1.20 + * Note that this interface includes only those DTD events that the
    1.21 + * XML recommendation requires processors to report: notation and
    1.22 + * unparsed entity declarations.
    1.23 + *
    1.24 + * The SAX parser may report these events in any order, regardless
    1.25 + * of the order in which the notations and unparsed entities were
    1.26 + * declared; however, all DTD events must be reported after the
    1.27 + * document handler's startDocument event, and before the first
    1.28 + * startElement event. (If the LexicalHandler is used, these events
    1.29 + * must also be reported before the endDTD event.)
    1.30 + */
    1.31 +[scriptable, uuid(4d01f225-6cc5-11da-be43-001422106990)]
    1.32 +interface nsISAXDTDHandler : nsISupports {
    1.33 +
    1.34 +  /**
    1.35 +   * Receive notification of a notation declaration event.
    1.36 +   *
    1.37 +   * It is up to the application to record the notation for later
    1.38 +   * reference, if necessary; notations may appear as attribute values
    1.39 +   * and in unparsed entity declarations, and are sometime used with
    1.40 +   * processing instruction target names.
    1.41 +   *
    1.42 +   * At least one of publicId and systemId must be non-null. If a
    1.43 +   * system identifier is present, and it is a URL, the SAX parser
    1.44 +   * must resolve it fully before passing it to the application
    1.45 +   * through this event.
    1.46 +   *
    1.47 +   * There is no guarantee that the notation declaration will be
    1.48 +   * reported before any unparsed entities that use it.
    1.49 +   *
    1.50 +   * @param name The notation name.
    1.51 +   * @param publicId The notation's public identifier, or null if none was
    1.52 +   *                  given.
    1.53 +   * @param systemId The notation's system identifier, or null if none was
    1.54 +   *                  given.
    1.55 +   */
    1.56 +  void notationDecl(in AString name,
    1.57 +                    in AString publicId,
    1.58 +                    in AString systemId);
    1.59 +
    1.60 +  /**
    1.61 +   * Receive notification of an unparsed entity declaration event.
    1.62 +   *
    1.63 +   * Note that the notation name corresponds to a notation reported
    1.64 +   * by the notationDecl event. It is up to the application to record
    1.65 +   * the entity for later reference, if necessary; unparsed entities
    1.66 +   * may appear as attribute values.
    1.67 +   *
    1.68 +   * If the system identifier is a URL, the parser must resolve it
    1.69 +   * fully before passing it to the application.
    1.70 +   *
    1.71 +   * @param name The unparsed entity's name.
    1.72 +   * @param publicId The entity's public identifier, or null if none was
    1.73 +   *                  given.
    1.74 +   * @param systemId The entity's system identifier, or null if none was
    1.75 +   *                  given.
    1.76 +   * @param notationName The name of the associated notation.
    1.77 +   */
    1.78 +  void unparsedEntityDecl(in AString name, in AString publicId,
    1.79 +                          in AString systemId, in AString notationName);
    1.80 +};

mercurial