By setting performIDcheck variable, the ID/IDREF checking
can be either turned on or turned off.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected static final Locator | |
| protected final Set | idrefs
this map remembers every IDREF token encountered in this document |
| protected final Map | ids
this map remembers every ID token encountered in this document |
| protected Locator | locator
Document Locator that is given by XML reader. |
| protected final NamespaceSupport | namespaceSupport
namespace prefix to namespace URI resolver. |
| private final Set | notations
declared notations. |
| protected boolean | performIDcheck
set this flag to true to perform ID/IDREF validation. |
| private final Set | unparsedEntities
unparsed entities found in the document. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | endElement(String
the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed namespaceUri, String the local name (without prefix), or the
empty string if Namespace processing is not being
performed localName, String the qualified XML name (with prefix), or the
empty string if qualified names are not available qName)Implements org. |
| public void | endPrefixMapping(String
the prefix that was being mapped.
This is the empty string when a default mapping scope ends. prefix)Implements org. |
| public String | getBaseUri()
Implements org. |
| public final Locator | |
| protected void | |
| public boolean | isNotation(String notationName)
Implements org. |
| public boolean | isUnparsedEntity(String entityName)
Implements org. |
| public void | notationDecl(String
The notation name. name, String The notation's public identifier, or null if
none was given. publicId, String The notation's system identifier, or null if
none was given. systemId)Implements org. |
| protected abstract void | |
| public void | onID(Datatype dt, StringToken token)
Implements com. |
| public void | processingInstruction(String
the processing instruction target name, String the processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the target data)Implements org. |
| public String | resolveNamespacePrefix(String prefix)
Implements org. |
| public void | setDocumentLocator(Locator
an object that can return the location of
any SAX document event loc)Implements org. |
| public void | skippedEntity(String
the name of the skipped entity. If it is a
parameter entity, the name will begin with '%', and if
it is the external DTD subset, it will be the string
"[dtd]" p)Implements org. |
| public void | startElement(String
the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed namespaceUri, String the local name (without prefix), or the
empty string if Namespace processing is not being
performed localName, String the qualified name (with prefix), or the
empty string if qualified names are not available qName, Attributes the attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object. The value of this object after
startElement returns is undefined atts)Implements org. |
| public void | startPrefixMapping(String
the Namespace prefix being declared.
An empty string is used for the default element namespace,
which has no prefix. prefix, String the Namespace URI the prefix is mapped to uri)Implements org. |
| public void | unparsedEntityDecl(String
The unparsed entity's name. name, String The entity's public identifier, or null if none
was given. publicId, String The entity's system identifier. systemId, String The name of the associated notation. notationName)Implements org. |
| contextPushed | back to summary |
|---|---|
| private boolean contextPushed | |
| dummyLocator | back to summary |
|---|---|
| protected static final Locator dummyLocator | |
| idrefs | back to summary |
|---|---|
| protected final Set<Object> idrefs this map remembers every IDREF token encountered in this document | |
| ids | back to summary |
|---|---|
| protected final Map<Object, Object> ids this map remembers every ID token encountered in this document | |
| locator | back to summary |
|---|---|
| protected Locator locator Document Locator that is given by XML reader. Sometimes it doesn't set the locator, so start with a dummy instance. | |
| namespaceSupport | back to summary |
|---|---|
| protected final NamespaceSupport namespaceSupport namespace prefix to namespace URI resolver. this object memorizes mapping information. | |
| notations | back to summary |
|---|---|
| private final Set<String> notations declared notations. | |
| performIDcheck | back to summary |
|---|---|
| protected boolean performIDcheck set this flag to true to perform ID/IDREF validation. this value cannot be modified in the middle of the validation. | |
| unparsedEntities | back to summary |
|---|---|
| private final Set<String> unparsedEntities unparsed entities found in the document. | |
| AbstractVerifier | back to summary |
|---|---|
| public AbstractVerifier() | |
| endElement | back to summary |
|---|---|
| public void endElement(String namespaceUri, String localName, String qName) throws SAXException Implements org. Doc from org. Receive notification of the end of an element. The SAX parser will invoke this method at the end of every
element in the XML document; there will be a corresponding
For information on the names, see startElement.
| |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) Implements org. Doc from org. End the scope of a prefix-URI mapping. See
| |
| getBaseUri | back to summary |
|---|---|
| public String getBaseUri() Implements org. Doc from org. Returns the base URI of the context. The null string may be returned if no base URI is known. | |
| getLocator | back to summary |
|---|---|
| public final Locator getLocator() | |
| init | back to summary |
|---|---|
| protected void init() | |
| isNotation | back to summary |
|---|---|
| public boolean isNotation(String notationName) Implements org. Doc from org. Checks if a notation is declared with the specified name.
| |
| isUnparsedEntity | back to summary |
|---|---|
| public boolean isUnparsedEntity(String entityName) Implements org. Doc from org. Checks if an unparsed entity is declared with the specified name.
| |
| notationDecl | back to summary |
|---|---|
| public void notationDecl(String name, String publicId, String systemId) Implements org. Doc from org. Receive notification of a notation declaration event. It is up to the application to record the notation for later reference, if necessary; notations may appear as attribute values and in unparsed entity declarations, and are sometime used with processing instruction target names. At least one of publicId and systemId must be non-null. If a system identifier is present, and it is a URL, the SAX parser must resolve it fully before passing it to the application through this event. There is no guarantee that the notation declaration will be reported before any unparsed entities that use it. | |
| onDuplicateId | back to summary |
|---|---|
| protected abstract void onDuplicateId(String id) this method is called when a duplicate id value is found. | |
| onID | back to summary |
|---|---|
| public void onID(Datatype dt, StringToken token) Implements com. Doc from com. this method is called when a type with ID semantics is matched. It is the callee's responsibility that stores ID and checks doubly defined ID, if it is necessary. | |
| processingInstruction | back to summary |
|---|---|
| public void processingInstruction(String name, String data) Implements org. Doc from org. Receive notification of a processing instruction. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element. A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method. Like | |
| resolveNamespacePrefix | back to summary |
|---|---|
| public String resolveNamespacePrefix(String prefix) Implements org. Doc from org. Resolves a namespace prefix to the corresponding namespace URI. This method is used for validating the QName type, for example. If the prefix is "" (empty string), it indicates an unprefixed value. The callee should resolve it as for an unprefixed element, rather than for an unprefixed attribute. If the prefix is "xml", then the callee must resolve this prefix into "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
| |
| setDocumentLocator | back to summary |
|---|---|
| public void setDocumentLocator(Locator loc) Implements org. Doc from org. Receive an object for locating the origin of SAX document events. SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ContentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only
during the invocation SAX event callbacks after
| |
| skippedEntity | back to summary |
|---|---|
| public void skippedEntity(String p) Implements org. Doc from org. Receive notification of a skipped entity. This is not called for entity references within markup constructs such as element start tags or markup declarations. (The XML recommendation requires reporting skipped external entities. SAX also reports internal entity expansion/non-expansion, except within markup constructs.) The Parser will invoke this method each time the entity is
skipped. Non-validating processors may skip entities if they
have not seen the declarations (because, for example, the
entity was declared in an external DTD subset). All processors
may skip external entities, depending on the values of the
| |
| startElement | back to summary |
|---|---|
| public void startElement(String namespaceUri, String localName, String qName, Attributes atts) throws SAXException Implements org. Doc from org. Receive notification of the beginning of an element. The Parser will invoke this method at the beginning of every
element in the XML document; there will be a corresponding
This event allows up to three name components for each element:
Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:
Note that the attribute list provided will contain only
attributes with explicit values (specified or defaulted):
#IMPLIED attributes will be omitted. The attribute list
will contain attributes used for Namespace declarations
(xmlns* attributes) only if the
Like
| |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) Implements org. Doc from org. Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for
normal Namespace processing: the SAX XML reader will
automatically replace prefixes for element and attribute
names when the There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not
guaranteed to be properly nested relative to each other:
all startPrefixMapping events will occur immediately before the
corresponding There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable. | |
| unparsedEntityDecl | back to summary |
|---|---|
| public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) Implements org. Doc from org. Receive notification of an unparsed entity declaration event. Note that the notation name corresponds to a notation
reported by the If the system identifier is a URL, the parser must resolve it fully before passing it to the application. | |