gnu.xml.pipeline

Class XIncludeFilter

public class XIncludeFilter extends EventFilter implements Locator

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.

Version: $Date: 2001/10/25 07:32:04 $

Author: David Brownell

Constructor Summary
XIncludeFilter(EventConsumer next)
Method Summary
voidcharacters(char[] ch, int start, int length)
voidcomment(char[] ch, int start, int length)
voidendCDATA()
voidendDocument()
voidendElement(String uri, String localName, String qName)
voidendEntity(String name)
voidendPrefixMapping(String prefix)
voidexternalEntityDecl(String name, String publicId, String systemId)
intgetColumnNumber()
Used for proxy locator; do not call directly.
intgetLineNumber()
Used for proxy locator; do not call directly.
StringgetPublicId()
Used for proxy locator; do not call directly.
StringgetSystemId()
Used for proxy locator; do not call directly.
voidignorableWhitespace(char[] ch, int start, int length)
booleanisSavingPrefixes()
Returns the flag controlling the setting of the SAX2 namespace-prefixes flag when parsing included documents.
voidprocessingInstruction(String target, String value)
voidsetDocumentLocator(Locator locator)
Passes "this" down the filter chain as a proxy locator.
voidsetSavingPrefixes(boolean flag)
Assigns the flag controlling the setting of the SAX2 namespace-prefixes flag.
voidskippedEntity(String name)
voidstartCDATA()
voidstartDocument()
voidstartElement(String uri, String localName, String qName, Attributes atts)
voidstartEntity(String name)
voidstartPrefixMapping(String prefix, String uri)

Constructor Detail

XIncludeFilter

public XIncludeFilter(EventConsumer next)

Method Detail

characters

public void characters(char[] ch, int start, int length)

comment

public void comment(char[] ch, int start, int length)

endCDATA

public void endCDATA()

endDocument

public void endDocument()

endElement

public void endElement(String uri, String localName, String qName)

endEntity

public void endEntity(String name)

endPrefixMapping

public void endPrefixMapping(String prefix)

externalEntityDecl

public void externalEntityDecl(String name, String publicId, String systemId)

getColumnNumber

public int getColumnNumber()
Used for proxy locator; do not call directly.

getLineNumber

public int getLineNumber()
Used for proxy locator; do not call directly.

getPublicId

public String getPublicId()
Used for proxy locator; do not call directly.

getSystemId

public String getSystemId()
Used for proxy locator; do not call directly.

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int length)

isSavingPrefixes

public boolean isSavingPrefixes()
Returns the flag controlling the setting of the SAX2 namespace-prefixes flag when parsing included documents. The default value is the SAX2 default (false), which discards information that can be useful.

processingInstruction

public void processingInstruction(String target, String value)

setDocumentLocator

public void setDocumentLocator(Locator locator)
Passes "this" down the filter chain as a proxy locator.

setSavingPrefixes

public void setSavingPrefixes(boolean flag)
Assigns the flag controlling the setting of the SAX2 namespace-prefixes flag.

skippedEntity

public void skippedEntity(String name)

startCDATA

public void startCDATA()

startDocument

public void startDocument()

startElement

public void startElement(String uri, String localName, String qName, Attributes atts)

startEntity

public void startEntity(String name)

startPrefixMapping

public void startPrefixMapping(String prefix, String uri)

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 2011-08-26.