|
1 /* -*- Mode: C++; tab-width: 2; 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 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 /** |
|
9 * Receive notification of basic DTD-related events. |
|
10 * |
|
11 * If a SAX application needs information about notations and |
|
12 * unparsed entities, then the application implements this interface |
|
13 * and registers an instance with the SAX parser using the parser's |
|
14 * setDTDHandler method. The parser uses the instance to report |
|
15 * notation and unparsed entity declarations to the application. |
|
16 * |
|
17 * Note that this interface includes only those DTD events that the |
|
18 * XML recommendation requires processors to report: notation and |
|
19 * unparsed entity declarations. |
|
20 * |
|
21 * The SAX parser may report these events in any order, regardless |
|
22 * of the order in which the notations and unparsed entities were |
|
23 * declared; however, all DTD events must be reported after the |
|
24 * document handler's startDocument event, and before the first |
|
25 * startElement event. (If the LexicalHandler is used, these events |
|
26 * must also be reported before the endDTD event.) |
|
27 */ |
|
28 [scriptable, uuid(4d01f225-6cc5-11da-be43-001422106990)] |
|
29 interface nsISAXDTDHandler : nsISupports { |
|
30 |
|
31 /** |
|
32 * Receive notification of a notation declaration event. |
|
33 * |
|
34 * It is up to the application to record the notation for later |
|
35 * reference, if necessary; notations may appear as attribute values |
|
36 * and in unparsed entity declarations, and are sometime used with |
|
37 * processing instruction target names. |
|
38 * |
|
39 * At least one of publicId and systemId must be non-null. If a |
|
40 * system identifier is present, and it is a URL, the SAX parser |
|
41 * must resolve it fully before passing it to the application |
|
42 * through this event. |
|
43 * |
|
44 * There is no guarantee that the notation declaration will be |
|
45 * reported before any unparsed entities that use it. |
|
46 * |
|
47 * @param name The notation name. |
|
48 * @param publicId The notation's public identifier, or null if none was |
|
49 * given. |
|
50 * @param systemId The notation's system identifier, or null if none was |
|
51 * given. |
|
52 */ |
|
53 void notationDecl(in AString name, |
|
54 in AString publicId, |
|
55 in AString systemId); |
|
56 |
|
57 /** |
|
58 * Receive notification of an unparsed entity declaration event. |
|
59 * |
|
60 * Note that the notation name corresponds to a notation reported |
|
61 * by the notationDecl event. It is up to the application to record |
|
62 * the entity for later reference, if necessary; unparsed entities |
|
63 * may appear as attribute values. |
|
64 * |
|
65 * If the system identifier is a URL, the parser must resolve it |
|
66 * fully before passing it to the application. |
|
67 * |
|
68 * @param name The unparsed entity's name. |
|
69 * @param publicId The entity's public identifier, or null if none was |
|
70 * given. |
|
71 * @param systemId The entity's system identifier, or null if none was |
|
72 * given. |
|
73 * @param notationName The name of the associated notation. |
|
74 */ |
|
75 void unparsedEntityDecl(in AString name, in AString publicId, |
|
76 in AString systemId, in AString notationName); |
|
77 }; |