Interface Location

    • Method Detail

      • getSystemId

        java.lang.String getSystemId()
        Get the system ID. This should be the system identifier of an XML external entity; if a stylesheet module comprises multiple external entities, the distinction should be retained. This means, for example, that an instruction in a stylesheet can have a different system identifier from its parent instruction. However, SAX parsers only provide location information at the element level, so when part of an XPath expression is in a different external entity from other parts of the same expression, this distinction is lost.

        The system identifier of a node is in general not the same as its base URI. The base URI is affected by xml:base attributes; the system identifier is not.

        Specified by:
        getSystemId in interface org.xml.sax.Locator
        Specified by:
        getSystemId in interface javax.xml.transform.SourceLocator
        the system ID, or null if the information is not available.
      • getPublicId

        java.lang.String getPublicId()
        Get the Public ID
        Specified by:
        getPublicId in interface org.xml.sax.Locator
        Specified by:
        getPublicId in interface javax.xml.transform.SourceLocator
        usually null
      • getLineNumber

        int getLineNumber()
        Get the line number. This line number is relative to the external entity identified by the system identifier. Line numbers start at 1. The value may be an approximation; SAX parsers only provide line number information at the level of element nodes.
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        Specified by:
        getLineNumber in interface javax.xml.transform.SourceLocator
        the line number, or -1 if the information is not available.
      • getColumnNumber

        int getColumnNumber()
        Get the column number. This column number is relative to the line identified by the line number. Column numbers start at 1.
        Specified by:
        getColumnNumber in interface org.xml.sax.Locator
        Specified by:
        getColumnNumber in interface javax.xml.transform.SourceLocator
        the column number, or -1 if the information is not available.
      • saveLocation

        Location saveLocation()
        Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.
        an immutable copy (which may be the original object, if it is already immutable)