01: // Attributes2.java - extended Attributes
02: // http://www.saxproject.org
03: // Public Domain: no warranty.
04: // $Id: Attributes2.java,v 1.3 2002/02/01 20:06:20 db Exp $
05:
06: package org.xml.sax.ext;
07:
08: import org.xml.sax.Attributes;
09:
10: /**
11: * SAX2 extension to augment the per-attribute information
12: * provided though {@link Attributes}.
13: * If an implementation supports this extension, the attributes
14: * provided in {@link org.xml.sax.ContentHandler#startElement
15: * ContentHandler.startElement() } will implement this interface,
16: * and the <em>http://xml.org/sax/features/use-attributes2</em>
17: * feature flag will have the value <em>true</em>.
18: *
19: * <blockquote>
20: * <em>This module, both source code and documentation, is in the
21: * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
22: * </blockquote>
23: *
24: * <p> XMLReader implementations are not required to support this
25: * information, and it is not part of core-only SAX2 distributions.</p>
26: *
27: * @since SAX 2.0 (extensions 1.1 alpha)
28: * @author David Brownell
29: * @version TBS
30: */
31: public interface Attributes2 extends Attributes {
32: /**
33: * Returns true unless the attribute value was provided
34: * by DTD defaulting.
35: *
36: * @param index The attribute index (zero-based).
37: * @return true if the value was found in the XML text,
38: * false if the value was provided by DTD defaulting.
39: * @exception java.lang.ArrayIndexOutOfBoundsException When the
40: * supplied index does not identify an attribute.
41: */
42: public boolean isSpecified(int index);
43:
44: /**
45: * Returns true unless the attribute value was provided
46: * by DTD defaulting.
47: *
48: * @param uri The Namespace URI, or the empty string if
49: * the name has no Namespace URI.
50: * @param localName The attribute's local name.
51: * @return true if the value was found in the XML text,
52: * false if the value was provided by DTD defaulting.
53: * @exception java.lang.IllegalArgumentException When the
54: * supplied names do not identify an attribute.
55: */
56: public boolean isSpecified(String uri, String localName);
57:
58: /**
59: * Returns true unless the attribute value was provided
60: * by DTD defaulting.
61: *
62: * @param qName The XML 1.0 qualified name.
63: * @return true if the value was found in the XML text,
64: * false if the value was provided by DTD defaulting.
65: * @exception java.lang.IllegalArgumentException When the
66: * supplied name does not identify an attribute.
67: */
68: public boolean isSpecified(String qName);
69: }
|