## org.apache.xerces.util
Class AttributesProxy

    java.lang.Object
      org.apache.xerces.util.AttributesProxy

All Implemented Interfaces:
  org.xml.sax.AttributeList, org.xml.sax.Attributes, org.xml.sax.ext.Attributes2

public final class AttributesProxy
extends java.lang.Object
implements org.xml.sax.AttributeList, org.xml.sax.ext.Attributes2

Wraps `XMLAttributes` and makes it look like `AttributeList` and `Attributes`.

Version:
  $Id: AttributesProxy.java,v 1.2 2005/06/13 18:19:45 mrglavas Exp $
Author:
  Arnaud Le Hors, IBM, Andy Clark, IBM

Constructor Summary
`AttributesProxy(org.apache.xerces.xni.XMLAttributes attributes)`

Method Summary
`org.apache.xerces.xni.XMLAttributes` `getAttributes()`
`int` `getIndex(java.lang.String qName)`
`int` `getIndex(java.lang.String uri, java.lang.String localPart)`
`int` `getLength()`
`java.lang.String` `getLocalName(int index)`
`java.lang.String` `getName(int i)`
`java.lang.String` `getQName(int index)`
`java.lang.String` `getType(int i)`
`java.lang.String` `getType(java.lang.String name)`
`java.lang.String` `getType(java.lang.String uri, java.lang.String localName)`
`java.lang.String` `getURI(int index)`
`java.lang.String` `getValue(int i)`
`java.lang.String` `getValue(java.lang.String name)`
`java.lang.String` `getValue(java.lang.String uri, java.lang.String localName)`
`boolean` `isDeclared(int index)` Returns false unless the attribute was declared in the DTD.
`boolean` `isDeclared(java.lang.String qName)` Returns false unless the attribute was declared in the DTD.
`boolean` `isDeclared(java.lang.String uri, java.lang.String localName)` Returns false unless the attribute was declared in the DTD.
`boolean` `isSpecified(int index)` Returns true unless the attribute value was provided by DTD defaulting.
`boolean` `isSpecified(java.lang.String qName)` Returns true unless the attribute value was provided by DTD defaulting.
`boolean` `isSpecified(java.lang.String uri, java.lang.String localName)` Returns true unless the attribute value was provided by DTD defaulting.
`void` `setAttributes(org.apache.xerces.xni.XMLAttributes attributes)` Sets the XML attributes to be wrapped.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AttributesProxy

    public AttributesProxy(org.apache.xerces.xni.XMLAttributes attributes)

Method Detail

### setAttributes

    public void setAttributes(org.apache.xerces.xni.XMLAttributes attributes)

  Sets the XML attributes to be wrapped.

### getAttributes

    public org.apache.xerces.xni.XMLAttributes getAttributes()

### getLength

    public int getLength()

  Specified by:
    `getLength` in interface `org.xml.sax.AttributeList`

### getQName

    public java.lang.String getQName(int index)

  Specified by:
    `getQName` in interface `org.xml.sax.Attributes`

### getURI

    public java.lang.String getURI(int index)

  Specified by:
    `getURI` in interface `org.xml.sax.Attributes`

### getLocalName

    public java.lang.String getLocalName(int index)

  Specified by:
    `getLocalName` in interface `org.xml.sax.Attributes`

### getType

    public java.lang.String getType(int i)

  Specified by:
    `getType` in interface `org.xml.sax.AttributeList`

### getType

    public java.lang.String getType(java.lang.String name)

  Specified by:
    `getType` in interface `org.xml.sax.AttributeList`

### getType

    public java.lang.String getType(java.lang.String uri,
                                    java.lang.String localName)

  Specified by:
    `getType` in interface `org.xml.sax.Attributes`

### getValue

    public java.lang.String getValue(int i)

  Specified by:
    `getValue` in interface `org.xml.sax.AttributeList`

### getValue

    public java.lang.String getValue(java.lang.String name)

  Specified by:
    `getValue` in interface `org.xml.sax.AttributeList`

### getValue

    public java.lang.String getValue(java.lang.String uri,
                                     java.lang.String localName)

  Specified by:
    `getValue` in interface `org.xml.sax.Attributes`

### getIndex

    public int getIndex(java.lang.String qName)

  Specified by:
    `getIndex` in interface `org.xml.sax.Attributes`

### getIndex

    public int getIndex(java.lang.String uri,
                        java.lang.String localPart)

  Specified by:
    `getIndex` in interface `org.xml.sax.Attributes`

### isDeclared

    public boolean isDeclared(int index)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

  Specified by:
    `isDeclared` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `index` - The attribute index (zero-based).
  Returns:
    true if the attribute was declared in the DTD, false otherwise.

### isDeclared

    public boolean isDeclared(java.lang.String qName)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

  Specified by:
    `isDeclared` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `qName` - The XML qualified (prefixed) name.
  Returns:
    true if the attribute was declared in the DTD, false otherwise.

### isDeclared

    public boolean isDeclared(java.lang.String uri,
                              java.lang.String localName)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

  Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

  Specified by:
    `isDeclared` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `uri` - The Namespace URI, or the empty string if the name has no Namespace URI.
    `localName` - The attribute's local name.
  Returns:
    true if the attribute was declared in the DTD, false otherwise.

### isSpecified

    public boolean isSpecified(int index)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns true unless the attribute value was provided by DTD defaulting.

  Specified by:
    `isSpecified` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `index` - The attribute index (zero-based).
  Returns:
    true if the value was found in the XML text, false if the value was provided by DTD defaulting.

### isSpecified

    public boolean isSpecified(java.lang.String qName)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns true unless the attribute value was provided by DTD defaulting.

  Specified by:
    `isSpecified` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `qName` - The XML qualified (prefixed) name.
  Returns:
    true if the value was found in the XML text, false if the value was provided by DTD defaulting.

### isSpecified

    public boolean isSpecified(java.lang.String uri,
                               java.lang.String localName)

  Description copied from interface: `org.xml.sax.ext.Attributes2`
  Returns true unless the attribute value was provided by DTD defaulting.

  Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

  Specified by:
    `isSpecified` in interface `org.xml.sax.ext.Attributes2`
  Parameters:
    `uri` - The Namespace URI, or the empty string if the name has no Namespace URI.
    `localName` - The attribute's local name.
  Returns:
    true if the value was found in the XML text, false if the value was provided by DTD defaulting.

### getName

    public java.lang.String getName(int i)

  Specified by:
    `getName` in interface `org.xml.sax.AttributeList`

Copyright © 1999-2005 Apache XML Project. All Rights Reserved.