parser/xml/public/nsISAXMutableAttributes.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/parser/xml/public/nsISAXMutableAttributes.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,127 @@
     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 +#include "nsISAXAttributes.idl"
    1.11 +
    1.12 +/**
    1.13 + * This interface extends the nsISAXAttributes interface with
    1.14 + * manipulators so that the list can be modified or reused.
    1.15 + */
    1.16 +[scriptable, uuid(8b1de83d-cebb-49fa-8245-c0fe319eb7b6)]
    1.17 +interface nsISAXMutableAttributes : nsISAXAttributes {
    1.18 +
    1.19 +  /**
    1.20 +   * Add an attribute to the end of the list.
    1.21 +   *
    1.22 +   * For the sake of speed, this method does no checking
    1.23 +   * to see if the attribute is already in the list: that is
    1.24 +   * the responsibility of the application.
    1.25 +   *
    1.26 +   * @param uri The Namespace URI, or the empty string if
    1.27 +   *        none is available or Namespace processing is not
    1.28 +   *        being performed.
    1.29 +   * @param localName The local name, or the empty string if
    1.30 +   *        Namespace processing is not being performed.
    1.31 +   * @param qName The qualified (prefixed) name, or the empty string
    1.32 +   *        if qualified names are not available.
    1.33 +   * @param type The attribute type as a string.
    1.34 +   * @param value The attribute value.
    1.35 +   */
    1.36 +  void addAttribute(in AString uri,
    1.37 +                    in AString localName,
    1.38 +                    in AString qName,
    1.39 +                    in AString type,
    1.40 +                    in AString value);
    1.41 +
    1.42 +  /**
    1.43 +   * Clear the attribute list for reuse.
    1.44 +   */
    1.45 +  void clear();
    1.46 +
    1.47 +  /**
    1.48 +   * Remove an attribute from the list.
    1.49 +   *
    1.50 +   * @param index The index of the attribute (zero-based).
    1.51 +   */
    1.52 +  void removeAttribute(in unsigned long index);
    1.53 +
    1.54 +  /**
    1.55 +   * Set the attributes list. This method will clear any attributes in
    1.56 +   * the list before adding the attributes from the argument.
    1.57 +   *
    1.58 +   * @param attributes The attributes object to replace populate the
    1.59 +   *                   list with.
    1.60 +   */
    1.61 +  void setAttributes(in nsISAXAttributes attributes);
    1.62 +
    1.63 +  /**
    1.64 +   * Set an attribute in the list.
    1.65 +   *
    1.66 +   * For the sake of speed, this method does no checking for name
    1.67 +   * conflicts or well-formedness: such checks are the responsibility
    1.68 +   * of the application.
    1.69 +   *
    1.70 +   * @param index The index of the attribute (zero-based).
    1.71 +   * @param uri The Namespace URI, or the empty string if
    1.72 +   *        none is available or Namespace processing is not
    1.73 +   *        being performed.
    1.74 +   * @param localName The local name, or the empty string if
    1.75 +   *        Namespace processing is not being performed.
    1.76 +   * @param qName The qualified name, or the empty string
    1.77 +   *        if qualified names are not available.
    1.78 +   * @param type The attribute type as a string.
    1.79 +   * @param value The attribute value.
    1.80 +   */
    1.81 +  void setAttribute(in unsigned long index,
    1.82 +                    in AString uri,
    1.83 +                    in AString localName,
    1.84 +                    in AString qName,
    1.85 +                    in AString type,
    1.86 +                    in AString value);
    1.87 + 
    1.88 +  /**
    1.89 +   * Set the local name of a specific attribute.
    1.90 +   *
    1.91 +   * @param index The index of the attribute (zero-based).
    1.92 +   * @param localName The attribute's local name, or the empty
    1.93 +   *        string for none.
    1.94 +   */
    1.95 +  void setLocalName(in unsigned long index, in AString localName);
    1.96 +
    1.97 +  /**
    1.98 +   * Set the qualified name of a specific attribute.
    1.99 +   *
   1.100 +   * @param index The index of the attribute (zero-based).
   1.101 +   * @param qName The attribute's qualified name, or the empty
   1.102 +   *        string for none.
   1.103 +   */
   1.104 +  void setQName(in unsigned long index, in AString qName);
   1.105 +
   1.106 +  /**
   1.107 +   * Set the type of a specific attribute.
   1.108 +   *
   1.109 +   * @param index The index of the attribute (zero-based).
   1.110 +   * @param type The attribute's type.
   1.111 +   */
   1.112 +  void setType(in unsigned long index, in AString type);
   1.113 +
   1.114 +  /**
   1.115 +   * Set the Namespace URI of a specific attribute.
   1.116 +   *
   1.117 +   * @param index The index of the attribute (zero-based).
   1.118 +   * @param uri The attribute's Namespace URI, or the empty
   1.119 +   *        string for none.
   1.120 +   */
   1.121 +  void setURI(in unsigned long index, in AString uri);
   1.122 +
   1.123 +  /**
   1.124 +   * Set the value of a specific attribute.
   1.125 +   *
   1.126 +   * @param index The index of the attribute (zero-based).
   1.127 +   * @param value The attribute's value.
   1.128 +   */
   1.129 +  void setValue(in unsigned long index, in AString value);
   1.130 +};

mercurial