public class XmlModuleHandler extends org.xml.sax.helpers.DefaultHandler
Constructor and Description |
---|
XmlModuleHandler()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Processes PCData characters.
|
void |
endElement(String namespaceURI,
String localName,
String qName)
The only action taken here is some bookkeeping in connection
with the HTML metadata.
|
void |
error(SAXParseException e)
Processes a parsing exception.
|
Set<String> |
getAttributeValues()
Returns the set of attribute values.
|
String |
getDTDURI()
Returns the DTD URI.
|
HtmlMetadata |
getHtmlMetadata()
Returns the HTML metadata object.
|
List<Message> |
getMessages()
Returns the List of messages generated during the parse.
|
Map<String,String> |
getNamespaces()
Returns the map of prefixes to namespaces.
|
List<String[]> |
getNotations()
Returns the list of notations.
|
List<ProcessingInstructionInfo> |
getProcessingInstructions()
Returns the List of processing instructions.
|
String |
getRoot()
Returns the qualified name of the root element.
|
List<SchemaInfo> |
getSchemas()
Returns the list of schemas.
|
boolean |
getSigFlag()
Returns
true if we have seen an element or a
processing instruction, which implies that we've seen an
XML declaration. |
List<String[]> |
getUnparsedEntities()
Returns the list of unparsed entities.
|
boolean |
hasSchemaURI(SchemaInfo newinfo) |
boolean |
isValid()
Returns the validity state.
|
void |
notationDecl(String name,
String publicID,
String systemID)
Puts all notations into the notation list.
|
void |
processingInstruction(String target,
String data)
Handles a processing instruction.
|
InputSource |
resolveEntity(String publicId,
String systemId)
Overrides standard resolveEntity.
|
void |
setLocalSchemas(Map<String,File> schemas)
Sets a map of schema URIs to local files.
|
void |
setXhtmlFlag(boolean flag)
Sets the value of the XHTML flag.
|
void |
startElement(String namespaceURI,
String localName,
String qualifiedName,
Attributes atts)
Looks for the first element encountered.
|
void |
startPrefixMapping(String prefix,
String uri)
Begin the scope of a prefix-URI Namespace mapping.
|
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Picks up unparsed entity declarations, after calling the
superclass's unparsedEntityDecl, and puts their information
into the unparsed entity declaration list as an array of
four strings: [ name, publicId, systemId, notationName].
|
void |
warning(SAXParseException e)
Processes a warning.
|
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, setDocumentLocator, skippedEntity, startDocument
public void setXhtmlFlag(boolean flag)
public void setLocalSchemas(Map<String,File> schemas)
public HtmlMetadata getHtmlMetadata()
public void startElement(String namespaceURI, String localName, String qualifiedName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName)
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
getProcessingInstructions
.
Each element of the list is an array of two Strings. Element 0 of
the array is the target, and element 1 is the data.processingInstruction
in interface ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void notationDecl(String name, String publicID, String systemID) throws SAXException
notationDecl
in interface DTDHandler
notationDecl
in class org.xml.sax.helpers.DefaultHandler
SAXException
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
unparsedEntityDecl
in interface DTDHandler
unparsedEntityDecl
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void warning(SAXParseException e)
warning
in interface ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
public void error(SAXParseException e)
error
in interface ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
public List<SchemaInfo> getSchemas()
public List<String[]> getUnparsedEntities()
public Map<String,String> getNamespaces()
public String getDTDURI()
public List<ProcessingInstructionInfo> getProcessingInstructions()
public List<String[]> getNotations()
public String getRoot()
public List<Message> getMessages()
public boolean isValid()
error
has been called, the return value will be false
.public boolean getSigFlag()
true
if we have seen an element or a
processing instruction, which implies that we've seen an
XML declaration.public boolean hasSchemaURI(SchemaInfo newinfo)
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.