class
XIncludeFilter extends XMLFilterImpl
Instance Constructors
-
new
XIncludeFilter()
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
val
XINCLUDE_NAMESPACE: String("http://www.w3.org/2001/XInclude")
-
final
def
asInstanceOf[T0]: T0
-
def
characters(ch: Array[Char], start: Int, length: Int): Unit
-
def
clone(): AnyRef
-
def
endDocument(): Unit
-
def
endElement(uri: String, localName: String, qName: String): Unit
-
def
endPrefixMapping(prefix: String): Unit
-
-
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
-
def
getDTDHandler(): DTDHandler
-
-
-
-
-
def
getProperty(arg0: String): AnyRef
-
def
hashCode(): Int
-
def
ignorableWhitespace(ch: Array[Char], start: Int, length: Int): Unit
-
def
insideIncludeElement(): Boolean
-
final
def
isInstanceOf[T0]: Boolean
-
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
-
def
processingInstruction(target: String, data: String): Unit
-
-
-
-
def
setDocumentLocator(locator: Locator): Unit
-
-
-
-
-
def
setProperty(arg0: String, arg1: Any): Unit
-
def
skippedEntity(name: String): Unit
-
def
startDocument(): Unit
-
def
startElement(uri: String, localName: String, qName: String, atts1: Attributes): Unit
-
def
startPrefixMapping(prefix: String, uri: String): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
This is a SAX filter which resolves all XInclude include elements before passing them on to the client application. Currently this class has the following known deviation from the XInclude specification:
Furthermore, I would definitely use a new instance of this class for each document you want to process. I doubt it can be used successfully on multiple documents. Furthermore, I can virtually guarantee that this class is not thread safe. You have been warned.
Since this class is not designed to be subclassed, and since I have not yet considered how that might affect the methods herein or what other protected methods might be needed to support subclasses, I have declared this class final. I may remove this restriction later, though the use-case for subclassing is weak. This class is designed to have its functionality extended via a horizontal chain of filters, not a vertical hierarchy of sub and superclasses.
To use this class:
XIncludeFilter
object with a known base URLXMLReader
object from which the raw document will be read to thesetParent()
method of this object.ContentHandler
object to thesetContentHandler()
method of this object. This is the object which will receive events from the parsed and included document.LexicalHandler
object as the value of this object'shttp://xml.org/sax/properties/lexical-handler
property. Also make sure yourLexicalHandler
asks this object for the status of each comment usinginsideIncludeElement
before doing anything with the comment.parse()
methode.g.
translated from Elliotte Rusty Harold's Java source.