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: #include "nsISAXAttributes.idl" michael@0: michael@0: /** michael@0: * This interface extends the nsISAXAttributes interface with michael@0: * manipulators so that the list can be modified or reused. michael@0: */ michael@0: [scriptable, uuid(8b1de83d-cebb-49fa-8245-c0fe319eb7b6)] michael@0: interface nsISAXMutableAttributes : nsISAXAttributes { michael@0: michael@0: /** michael@0: * Add an attribute to the end of the list. michael@0: * michael@0: * For the sake of speed, this method does no checking michael@0: * to see if the attribute is already in the list: that is michael@0: * the responsibility of the application. michael@0: * michael@0: * @param uri The Namespace URI, or the empty string if michael@0: * none is available or Namespace processing is not michael@0: * being performed. michael@0: * @param localName The local name, or the empty string if michael@0: * Namespace processing is not being performed. michael@0: * @param qName The qualified (prefixed) name, or the empty string michael@0: * if qualified names are not available. michael@0: * @param type The attribute type as a string. michael@0: * @param value The attribute value. michael@0: */ michael@0: void addAttribute(in AString uri, michael@0: in AString localName, michael@0: in AString qName, michael@0: in AString type, michael@0: in AString value); michael@0: michael@0: /** michael@0: * Clear the attribute list for reuse. michael@0: */ michael@0: void clear(); michael@0: michael@0: /** michael@0: * Remove an attribute from the list. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: */ michael@0: void removeAttribute(in unsigned long index); michael@0: michael@0: /** michael@0: * Set the attributes list. This method will clear any attributes in michael@0: * the list before adding the attributes from the argument. michael@0: * michael@0: * @param attributes The attributes object to replace populate the michael@0: * list with. michael@0: */ michael@0: void setAttributes(in nsISAXAttributes attributes); michael@0: michael@0: /** michael@0: * Set an attribute in the list. michael@0: * michael@0: * For the sake of speed, this method does no checking for name michael@0: * conflicts or well-formedness: such checks are the responsibility michael@0: * of the application. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param uri The Namespace URI, or the empty string if michael@0: * none is available or Namespace processing is not michael@0: * being performed. michael@0: * @param localName The local name, or the empty string if michael@0: * Namespace processing is not being performed. michael@0: * @param qName The qualified name, or the empty string michael@0: * if qualified names are not available. michael@0: * @param type The attribute type as a string. michael@0: * @param value The attribute value. michael@0: */ michael@0: void setAttribute(in unsigned long index, michael@0: in AString uri, michael@0: in AString localName, michael@0: in AString qName, michael@0: in AString type, michael@0: in AString value); michael@0: michael@0: /** michael@0: * Set the local name of a specific attribute. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param localName The attribute's local name, or the empty michael@0: * string for none. michael@0: */ michael@0: void setLocalName(in unsigned long index, in AString localName); michael@0: michael@0: /** michael@0: * Set the qualified name of a specific attribute. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param qName The attribute's qualified name, or the empty michael@0: * string for none. michael@0: */ michael@0: void setQName(in unsigned long index, in AString qName); michael@0: michael@0: /** michael@0: * Set the type of a specific attribute. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param type The attribute's type. michael@0: */ michael@0: void setType(in unsigned long index, in AString type); michael@0: michael@0: /** michael@0: * Set the Namespace URI of a specific attribute. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param uri The attribute's Namespace URI, or the empty michael@0: * string for none. michael@0: */ michael@0: void setURI(in unsigned long index, in AString uri); michael@0: michael@0: /** michael@0: * Set the value of a specific attribute. michael@0: * michael@0: * @param index The index of the attribute (zero-based). michael@0: * @param value The attribute's value. michael@0: */ michael@0: void setValue(in unsigned long index, in AString value); michael@0: };