Class EmptySource

  • All Implemented Interfaces:
    javax.xml.transform.Source

    public class EmptySource
    extends java.lang.Object
    implements javax.xml.transform.Source
    This class is an implementation of the JAXP Source interface. It represents a dummy Source, which resolves to an empty sequence. A URIResolver (called perhaps in furtherance of the doc() or document() function can choose to return an EmptySource for example if a URI is not accessible; the effect is that the call on doc() or document() returns an empty sequence. This may be useful to emulate the behaviour of earlier versions of XSLT.

    The class is a singleton marker class.

    See also bug 4752.

    Since:
    10.4
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static EmptySource getInstance()  
      java.lang.String getSystemId()
      Get the system identifier that was set with setSystemId.
      void setSystemId​(java.lang.String systemId)
      Set the system identifier for this Source.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.xml.transform.Source

        isEmpty
    • Method Detail

      • getInstance

        public static EmptySource getInstance()
      • setSystemId

        public void setSystemId​(java.lang.String systemId)
        Set the system identifier for this Source. This is a dummy implementation to satisfy the interface, and it does nothing.
        Specified by:
        setSystemId in interface javax.xml.transform.Source
        Parameters:
        systemId - The system identifier as a URL string.
      • getSystemId

        public java.lang.String getSystemId()
        Get the system identifier that was set with setSystemId.
        Specified by:
        getSystemId in interface javax.xml.transform.Source
        Returns:
        null (always). The class is stateless.