Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * Interface for associating a SAX event with a document location. |
michael@0 | 10 | * |
michael@0 | 11 | * Note that the results returned by the object will be valid only |
michael@0 | 12 | * during the scope of each callback method: the application will |
michael@0 | 13 | * receive unpredictable results if it attempts to use the locator at |
michael@0 | 14 | * any other time, or after parsing completes. |
michael@0 | 15 | */ |
michael@0 | 16 | [scriptable, uuid(7a307c6c-6cc9-11da-be43-001422106990)] |
michael@0 | 17 | interface nsISAXLocator: nsISupports { |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * Return the column number where the current document event ends. |
michael@0 | 21 | * |
michael@0 | 22 | * Warning: The return value from the method is intended only as an |
michael@0 | 23 | * approximation for the sake of diagnostics; it is not intended to |
michael@0 | 24 | * provide sufficient information to edit the character content of |
michael@0 | 25 | * the original XML document. For example, when lines contain |
michael@0 | 26 | * combining character sequences, wide characters, surrogate pairs, |
michael@0 | 27 | * or bi-directional text, the value may not correspond to the |
michael@0 | 28 | * column in a text editor's display. |
michael@0 | 29 | * |
michael@0 | 30 | * The return value is an approximation of the column number in the |
michael@0 | 31 | * document entity or external parsed entity where the markup |
michael@0 | 32 | * triggering the event appears. |
michael@0 | 33 | * |
michael@0 | 34 | * If possible, the SAX driver should provide the line position of |
michael@0 | 35 | * the first character after the text associated with the document |
michael@0 | 36 | * event. The first column in each line is column 1. |
michael@0 | 37 | * |
michael@0 | 38 | * @return The column number, or -1 if none is available. |
michael@0 | 39 | */ |
michael@0 | 40 | readonly attribute long columnNumber; |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Return the line number where the current document event ends. |
michael@0 | 44 | * Lines are delimited by line ends, which are defined in the XML |
michael@0 | 45 | * specification. |
michael@0 | 46 | * |
michael@0 | 47 | * Warning: The return value from the method is intended only as an |
michael@0 | 48 | * approximation for the sake of diagnostics; it is not intended to |
michael@0 | 49 | * provide sufficient information to edit the character content of |
michael@0 | 50 | * the original XML document. In some cases, these "line" numbers |
michael@0 | 51 | * match what would be displayed as columns, and in others they may |
michael@0 | 52 | * not match the source text due to internal entity expansion. |
michael@0 | 53 | * |
michael@0 | 54 | * The return value is an approximation of the line number in the |
michael@0 | 55 | * document entity or external parsed entity where the markup |
michael@0 | 56 | * triggering the event appears. |
michael@0 | 57 | * |
michael@0 | 58 | * If possible, the SAX driver should provide the line position of |
michael@0 | 59 | * the first character after the text associated with the document |
michael@0 | 60 | * event. The first line is line 1. |
michael@0 | 61 | * |
michael@0 | 62 | * @return The line number, or -1 if none is available. |
michael@0 | 63 | */ |
michael@0 | 64 | readonly attribute long lineNumber; |
michael@0 | 65 | |
michael@0 | 66 | /** |
michael@0 | 67 | * Return the public identifier for the current document event. |
michael@0 | 68 | * |
michael@0 | 69 | * The return value is the public identifier of the document entity |
michael@0 | 70 | * or of the external parsed entity in which the markup triggering |
michael@0 | 71 | * the event appears. |
michael@0 | 72 | * |
michael@0 | 73 | * @return A string containing the public identifier, or |
michael@0 | 74 | * null if none is available. |
michael@0 | 75 | */ |
michael@0 | 76 | readonly attribute AString publicId; |
michael@0 | 77 | |
michael@0 | 78 | /** |
michael@0 | 79 | * Return the system identifier for the current document event. |
michael@0 | 80 | * |
michael@0 | 81 | * The return value is the system identifier of the document entity |
michael@0 | 82 | * or of the external parsed entity in which the markup triggering |
michael@0 | 83 | * the event appears. |
michael@0 | 84 | * |
michael@0 | 85 | * @return A string containing the system identifier, or null |
michael@0 | 86 | * if none is available. |
michael@0 | 87 | */ |
michael@0 | 88 | readonly attribute AString systemId; |
michael@0 | 89 | }; |