Class

scala.xml.include.sax

XIncludeFilter

Related Doc: package sax

Permalink

class XIncludeFilter extends XMLFilterImpl

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:

  1. XPointer is not supported.

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:

e.g.

val includer = new XIncludeFilter(base)
includer setParent parser
includer setContentHandler new SAXXIncluder(System.out)
includer parse args(i)

translated from Elliotte Rusty Harold's Java source.

Linear Supertypes
XMLFilterImpl, ErrorHandler, ContentHandler, DTDHandler, org.xml.sax.EntityResolver, XMLFilter, XMLReader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. XIncludeFilter
  2. XMLFilterImpl
  3. ErrorHandler
  4. ContentHandler
  5. DTDHandler
  6. EntityResolver
  7. XMLFilter
  8. XMLReader
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new XIncludeFilter()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val XINCLUDE_NAMESPACE: String("http://www.w3.org/2001/XInclude")

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def characters(ch: Array[Char], start: Int, length: Int): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def endDocument(): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  9. def endElement(uri: String, localName: String, qName: String): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  10. def endPrefixMapping(prefix: String): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def error(arg0: org.xml.sax.SAXParseException): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → ErrorHandler
    Annotations
    @throws( classOf[org.xml.sax.SAXException] )
  14. def fatalError(arg0: org.xml.sax.SAXParseException): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → ErrorHandler
    Annotations
    @throws( classOf[org.xml.sax.SAXException] )
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getContentHandler(): ContentHandler

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  18. def getDTDHandler(): DTDHandler

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  19. def getEntityResolver(): org.xml.sax.EntityResolver

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  20. def getErrorHandler(): ErrorHandler

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  21. def getFeature(arg0: String): Boolean

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( ... ) @throws( ... )
  22. def getParent(): XMLReader

    Permalink
    Definition Classes
    XMLFilterImpl → XMLFilter
  23. def getProperty(arg0: String): AnyRef

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( ... ) @throws( ... )
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def ignorableWhitespace(ch: Array[Char], start: Int, length: Int): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  26. def insideIncludeElement(): Boolean

    Permalink

    This utility method returns true if and only if this reader is currently inside a non-empty include element.

    This utility method returns true if and only if this reader is currently inside a non-empty include element. (This is not the same as being inside the node set which replaces the include element.) This is primarily needed for comments inside include elements. It must be checked by the actual LexicalHandler to see whether a comment is passed or not.

    returns

    boolean

  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def notationDecl(arg0: String, arg1: String, arg2: String): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → DTDHandler
    Annotations
    @throws( classOf[org.xml.sax.SAXException] )
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def parse(arg0: String): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( classOf[java.io.IOException] ) @throws( classOf[org.xml.sax.SAXException] )
  33. def parse(arg0: org.xml.sax.InputSource): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( classOf[java.io.IOException] ) @throws( classOf[org.xml.sax.SAXException] )
  34. def processingInstruction(target: String, data: String): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  35. def resolveEntity(arg0: String, arg1: String): org.xml.sax.InputSource

    Permalink
    Definition Classes
    XMLFilterImpl → EntityResolver
    Annotations
    @throws( classOf[java.io.IOException] ) @throws( classOf[org.xml.sax.SAXException] )
  36. def setContentHandler(arg0: ContentHandler): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  37. def setDTDHandler(arg0: DTDHandler): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  38. def setDocumentLocator(locator: Locator): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  39. def setEntityResolver(arg0: org.xml.sax.EntityResolver): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  40. def setErrorHandler(arg0: ErrorHandler): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
  41. def setFeature(arg0: String, arg1: Boolean): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( ... ) @throws( ... )
  42. def setParent(arg0: XMLReader): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLFilter
  43. def setProperty(arg0: String, arg1: Any): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → XMLReader
    Annotations
    @throws( ... ) @throws( ... )
  44. def skippedEntity(name: String): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  45. def startDocument(): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  46. def startElement(uri: String, localName: String, qName: String, atts1: Attributes): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  47. def startPrefixMapping(prefix: String, uri: String): Unit

    Permalink
    Definition Classes
    XIncludeFilter → XMLFilterImpl → ContentHandler
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. def unparsedEntityDecl(arg0: String, arg1: String, arg2: String, arg3: String): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → DTDHandler
    Annotations
    @throws( classOf[org.xml.sax.SAXException] )
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. def warning(arg0: org.xml.sax.SAXParseException): Unit

    Permalink
    Definition Classes
    XMLFilterImpl → ErrorHandler
    Annotations
    @throws( classOf[org.xml.sax.SAXException] )

Inherited from XMLFilterImpl

Inherited from ErrorHandler

Inherited from ContentHandler

Inherited from DTDHandler

Inherited from org.xml.sax.EntityResolver

Inherited from XMLFilter

Inherited from XMLReader

Inherited from AnyRef

Inherited from Any

Ungrouped