Class EmptySource

  • All Implemented Interfaces:
    Source

    public class EmptySource
    extends Object
    implements 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 Detail

      • getInstance

        public static EmptySource getInstance()
      • setSystemId

        public void setSystemId​(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 Source
        Parameters:
        systemId - The system identifier as a URL string.
      • getSystemId

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