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/. */
6 #include
"nsISupports.idl"
7 #include
"nsISAXAttributes.idl"
10 * This interface extends the nsISAXAttributes interface with
11 * manipulators so that the list can be modified or reused.
13 [scriptable
, uuid(8b1de83d
-cebb
-49fa
-8245-c0fe319eb7b6
)]
14 interface nsISAXMutableAttributes
: nsISAXAttributes
{
17 * Add an attribute to the end of the list.
19 * For the sake of speed, this method does no checking
20 * to see if the attribute is already in the list: that is
21 * the responsibility of the application.
23 * @param uri The Namespace URI, or the empty string if
24 * none is available or Namespace processing is not
26 * @param localName The local name, or the empty string if
27 * Namespace processing is not being performed.
28 * @param qName The qualified (prefixed) name, or the empty string
29 * if qualified names are not available.
30 * @param type The attribute type as a string.
31 * @param value The attribute value.
33 void addAttribute
(in AString uri
,
40 * Clear the attribute list for reuse.
45 * Remove an attribute from the list.
47 * @param index The index of the attribute (zero-based).
49 void removeAttribute
(in unsigned long index
);
52 * Set the attributes list. This method will clear any attributes in
53 * the list before adding the attributes from the argument.
55 * @param attributes The attributes object to replace populate the
58 void setAttributes
(in nsISAXAttributes attributes
);
61 * Set an attribute in the list.
63 * For the sake of speed, this method does no checking for name
64 * conflicts or well-formedness: such checks are the responsibility
67 * @param index The index of the attribute (zero-based).
68 * @param uri The Namespace URI, or the empty string if
69 * none is available or Namespace processing is not
71 * @param localName The local name, or the empty string if
72 * Namespace processing is not being performed.
73 * @param qName The qualified name, or the empty string
74 * if qualified names are not available.
75 * @param type The attribute type as a string.
76 * @param value The attribute value.
78 void setAttribute
(in unsigned long index
,
86 * Set the local name of a specific attribute.
88 * @param index The index of the attribute (zero-based).
89 * @param localName The attribute's local name, or the empty
92 void setLocalName
(in unsigned long index
, in AString localName
);
95 * Set the qualified name of a specific attribute.
97 * @param index The index of the attribute (zero-based).
98 * @param qName The attribute's qualified name, or the empty
101 void setQName
(in unsigned long index
, in AString qName
);
104 * Set the type of a specific attribute.
106 * @param index The index of the attribute (zero-based).
107 * @param type The attribute's type.
109 void setType
(in unsigned long index
, in AString type
);
112 * Set the Namespace URI of a specific attribute.
114 * @param index The index of the attribute (zero-based).
115 * @param uri The attribute's Namespace URI, or the empty
118 void setURI
(in unsigned long index
, in AString uri
);
121 * Set the value of a specific attribute.
123 * @param index The index of the attribute (zero-based).
124 * @param value The attribute's value.
126 void setValue
(in unsigned long index
, in AString value
);