|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gnu.xml.pipeline.EventFilter
|
+--gnu.xml.pipeline.XIncludeFilter
Filter to process an XPointer-free subset of
XInclude, supporting its
use as a kind of replacement for parsed general entities.
XInclude works much like the #include of C/C++ but
works for XML documents as well as unparsed text files.
Restrictions from the 16-May-2001 draft of XInclude are as follows:
XML documents that are included will normally be processed using
the default SAX namespace rules, meaning that prefix information may
be discarded. This may be changed with setSavingPrefixes().
TBD: "IURI" handling.
| Fields inherited from class gnu.xml.pipeline.EventFilter |
DECL_HANDLER, FEATURE_URI, LEXICAL_HANDLER, PROPERTY_URI |
| Constructor Summary | |
XIncludeFilter(EventConsumer next)
|
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
void |
comment(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
void |
endCDATA()
SAX2: passes this callback to the next consumer, if any |
void |
endDocument()
SAX2: passes this callback to the next consumer, if any |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
SAX2: passes this callback to the next consumer, if any |
void |
endEntity(java.lang.String name)
SAX2: passes this callback to the next consumer, if any. |
void |
endPrefixMapping(java.lang.String prefix)
SAX2: passes this callback to the next consumer, if any |
void |
externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
SAX2: passes this callback to the next consumer, if any |
int |
getColumnNumber()
Used for proxy locator; do not call directly. |
int |
getLineNumber()
Used for proxy locator; do not call directly. |
java.lang.String |
getPublicId()
Used for proxy locator; do not call directly. |
java.lang.String |
getSystemId()
Used for proxy locator; do not call directly. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
boolean |
isSavingPrefixes()
Returns the flag controlling the setting of the SAX2 namespace-prefixes flag when parsing included documents. |
void |
processingInstruction(java.lang.String target,
java.lang.String value)
SAX2: passes this callback to the next consumer, if any |
void |
setDocumentLocator(Locator locator)
Passes "this" down the filter chain as a proxy locator. |
void |
setSavingPrefixes(boolean flag)
Assigns the flag controlling the setting of the SAX2 namespace-prefixes flag. |
void |
skippedEntity(java.lang.String name)
SAX2: passes this callback to the next consumer, if any |
void |
startCDATA()
SAX2: passes this callback to the next consumer, if any |
void |
startDocument()
SAX2: passes this callback to the next consumer, if any |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
SAX2: passes this callback to the next consumer, if any |
void |
startEntity(java.lang.String name)
SAX2: passes this callback to the next consumer, if any. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
SAX2: passes this callback to the next consumer, if any |
| Methods inherited from class gnu.xml.pipeline.EventFilter |
attributeDecl, bind, chainTo, elementDecl, endDTD, getContentHandler, getDocumentLocator, getDTDHandler, getErrorHandler, getNext, getProperty, internalEntityDecl, notationDecl, setContentHandler, setDTDHandler, setErrorHandler, setProperty, startDTD, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XIncludeFilter(EventConsumer next)
throws SAXException
| Method Detail |
public void setDocumentLocator(Locator locator)
setDocumentLocator in class EventFilterorg.xml.sax.ContentHandlerlocator - An object that can return the location of
any SAX document event.Locatorpublic java.lang.String getSystemId()
getSystemId in interface Locatororg.xml.sax.LocatorLocator.getPublicId()public java.lang.String getPublicId()
getPublicId in interface Locatororg.xml.sax.LocatorLocator.getSystemId()public int getLineNumber()
getLineNumber in interface Locatororg.xml.sax.LocatorLocator.getColumnNumber()public int getColumnNumber()
getColumnNumber in interface Locatororg.xml.sax.LocatorLocator.getLineNumber()public void setSavingPrefixes(boolean flag)
public boolean isSavingPrefixes()
public void startDocument()
throws SAXException
EventFilterstartDocument in class EventFilterorg.xml.sax.ContentHandlerSAXException - Any SAX exception, possibly
wrapping another exception.ContentHandler.endDocument()
public void endDocument()
throws SAXException
EventFilterendDocument in class EventFilterorg.xml.sax.ContentHandlerSAXException - Any SAX exception, possibly
wrapping another exception.ContentHandler.startDocument()
public void externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
EventFilterexternalEntityDecl in class EventFilterorg.xml.sax.ext.DeclHandlername - The name of the entity. If it is a parameter
entity, the name will begin with '%'.publicId - The declared public identifier of the entity, or
null if none was declared.systemId - The declared system identifier of the entity.SAXException - The application may raise an exception.DeclHandler.internalEntityDecl(java.lang.String, java.lang.String),
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void startEntity(java.lang.String name)
throws SAXException
EventFilterstartEntity in class EventFilterorg.xml.sax.ext.LexicalHandlername - The name of the entity. If it is a parameter
entity, the name will begin with '%', and if it is the
external DTD subset, it will be "[dtd]".SAXException - The application may raise an exception.LexicalHandler.endEntity(java.lang.String),
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String),
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(java.lang.String name)
throws SAXException
EventFilterendEntity in class EventFilterorg.xml.sax.ext.LexicalHandlername - The name of the entity that is ending.SAXException - The application may raise an exception.LexicalHandler.startEntity(java.lang.String)
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
throws SAXException
EventFilterstartElement in class EventFilterorg.xml.sax.ContentHandleruri - The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName - The qualified name (with prefix), or the
empty string if qualified names are not available.atts - The attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object.SAXException - Any SAX exception, possibly
wrapping another exception.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String),
Attributes
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws SAXException
EventFilterendElement in class EventFilterorg.xml.sax.ContentHandleruri - The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName - The qualified XML 1.0 name (with prefix), or the
empty string if qualified names are not available.SAXException - Any SAX exception, possibly
wrapping another exception.
public void characters(char[] ch,
int start,
int length)
throws SAXException
EventFiltercharacters in class EventFilterorg.xml.sax.ContentHandlerch - The characters from the XML document.start - The start position in the array.length - The number of characters to read from the array.SAXException - Any SAX exception, possibly
wrapping another exception.ContentHandler.ignorableWhitespace(char[], int, int),
Locator
public void processingInstruction(java.lang.String target,
java.lang.String value)
throws SAXException
EventFilterprocessingInstruction in class EventFilterorg.xml.sax.ContentHandlertarget - The processing instruction target.data - The processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the target.SAXException - Any SAX exception, possibly
wrapping another exception.
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
EventFilterignorableWhitespace in class EventFilterorg.xml.sax.ContentHandlerch - The characters from the XML document.start - The start position in the array.length - The number of characters to read from the array.SAXException - Any SAX exception, possibly
wrapping another exception.ContentHandler.characters(char[], int, int)
public void comment(char[] ch,
int start,
int length)
throws SAXException
EventFiltercomment in class EventFilterorg.xml.sax.ext.LexicalHandlerch - An array holding the characters in the comment.start - The starting position in the array.length - The number of characters to use from the array.SAXException - The application may raise an exception.
public void startCDATA()
throws SAXException
EventFilterstartCDATA in class EventFilterorg.xml.sax.ext.LexicalHandlerSAXException - The application may raise an exception.LexicalHandler.endCDATA()
public void endCDATA()
throws SAXException
EventFilterendCDATA in class EventFilterorg.xml.sax.ext.LexicalHandlerSAXException - The application may raise an exception.LexicalHandler.startCDATA()
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws SAXException
EventFilterstartPrefixMapping in class EventFilterorg.xml.sax.ContentHandlerprefix - The Namespace prefix being declared.uri - The Namespace URI the prefix is mapped to.SAXException - The client may throw
an exception during processing.ContentHandler.endPrefixMapping(java.lang.String),
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endPrefixMapping(java.lang.String prefix)
throws SAXException
EventFilterendPrefixMapping in class EventFilterorg.xml.sax.ContentHandlerprefix - The prefix that was being mapping.SAXException - The client may throw
an exception during processing.ContentHandler.startPrefixMapping(java.lang.String, java.lang.String),
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void skippedEntity(java.lang.String name)
throws SAXException
EventFilterskippedEntity in class EventFilterorg.xml.sax.ContentHandlername - 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]".SAXException - Any SAX exception, possibly
wrapping another exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2001-11-20.