Java Code Examples for com.sun.org.apache.xerces.internal.xni.XMLLocator#getExpandedSystemId()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.XMLLocator#getExpandedSystemId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XMLParseException.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 2
Source File: XIncludeHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the file indicated by the given XMLLocator has already been included
 * in the current stack.
 * @param includedSource the source to check for inclusion
 * @return true if the source has already been included
 */
protected boolean searchForRecursiveIncludes(XMLLocator includedSource) {
    String includedSystemId = includedSource.getExpandedSystemId();

    if (includedSystemId == null) {
        try {
            includedSystemId =
                XMLEntityManager.expandSystemId(
                    includedSource.getLiteralSystemId(),
                    includedSource.getBaseSystemId(),
                    false);
        }
        catch (MalformedURIException e) {
            reportFatalError("ExpandedSystemId");
        }
    }

    if (includedSystemId.equals(fCurrentBaseURI.getExpandedSystemId())) {
        return true;
    }

    if (fParentXIncludeHandler == null) {
        return false;
    }
    return fParentXIncludeHandler.searchForRecursiveIncludes(
        includedSource);
}
 
Example 3
Source File: XMLParseException.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 4
Source File: XMLParseException.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 5
Source File: XMLParseException.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 6
Source File: XIncludeHandler.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private void setupCurrentBaseURI(XMLLocator locator) {
    fCurrentBaseURI.setBaseSystemId(locator.getBaseSystemId());
    if (locator.getLiteralSystemId() != null) {
        fCurrentBaseURI.setLiteralSystemId(locator.getLiteralSystemId());
    }
    else {
        fCurrentBaseURI.setLiteralSystemId(fHrefFromParent);
    }

    String expandedSystemId = locator.getExpandedSystemId();
    if (expandedSystemId == null) {
        // attempt to expand it ourselves
        try {
            expandedSystemId =
                XMLEntityManager.expandSystemId(
                    fCurrentBaseURI.getLiteralSystemId(),
                    fCurrentBaseURI.getBaseSystemId(),
                    false);
            if (expandedSystemId == null) {
                expandedSystemId = fCurrentBaseURI.getLiteralSystemId();
            }
        }
        catch (MalformedURIException e) {
            reportFatalError("ExpandedSystemId");
        }
    }
    fCurrentBaseURI.setExpandedSystemId(expandedSystemId);
}
 
Example 7
Source File: XMLParseException.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 8
Source File: XMLParseException.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 9
Source File: XIncludeHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the file indicated by the given XMLLocator has already been included
 * in the current stack.
 * @param includedSource the source to check for inclusion
 * @return true if the source has already been included
 */
protected boolean searchForRecursiveIncludes(XMLLocator includedSource) {
    String includedSystemId = includedSource.getExpandedSystemId();

    if (includedSystemId == null) {
        try {
            includedSystemId =
                XMLEntityManager.expandSystemId(
                    includedSource.getLiteralSystemId(),
                    includedSource.getBaseSystemId(),
                    false);
        }
        catch (MalformedURIException e) {
            reportFatalError("ExpandedSystemId");
        }
    }

    if (includedSystemId.equals(fCurrentBaseURI.getExpandedSystemId())) {
        return true;
    }

    if (fParentXIncludeHandler == null) {
        return false;
    }
    return fParentXIncludeHandler.searchForRecursiveIncludes(
        includedSource);
}
 
Example 10
Source File: XMLParseException.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 11
Source File: XMLParseException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 12
Source File: XMLParseException.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 13
Source File: XMLParseException.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 14
Source File: XMLParseException.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 15
Source File: XMLParseException.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 16
Source File: XIncludeHandler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the file indicated by the given XMLLocator has already been included
 * in the current stack.
 * @param includedSource the source to check for inclusion
 * @return true if the source has already been included
 */
protected boolean searchForRecursiveIncludes(XMLLocator includedSource) {
    String includedSystemId = includedSource.getExpandedSystemId();

    if (includedSystemId == null) {
        try {
            includedSystemId =
                XMLEntityManager.expandSystemId(
                    includedSource.getLiteralSystemId(),
                    includedSource.getBaseSystemId(),
                    false);
        }
        catch (MalformedURIException e) {
            reportFatalError("ExpandedSystemId");
        }
    }

    if (includedSystemId.equals(fCurrentBaseURI.getExpandedSystemId())) {
        return true;
    }

    if (fParentXIncludeHandler == null) {
        return false;
    }
    return fParentXIncludeHandler.searchForRecursiveIncludes(
        includedSource);
}
 
Example 17
Source File: XMLParseException.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 18
Source File: XMLParseException.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator, String message) {
    super(message);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}
 
Example 19
Source File: XIncludeHandler.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Checks if the file indicated by the given XMLLocator has already been included
 * in the current stack.
 * @param includedSource the source to check for inclusion
 * @return true if the source has already been included
 */
protected boolean searchForRecursiveIncludes(XMLLocator includedSource) {
    String includedSystemId = includedSource.getExpandedSystemId();

    if (includedSystemId == null) {
        try {
            includedSystemId =
                XMLEntityManager.expandSystemId(
                    includedSource.getLiteralSystemId(),
                    includedSource.getBaseSystemId(),
                    false);
        }
        catch (MalformedURIException e) {
            reportFatalError("ExpandedSystemId");
        }
    }

    if (includedSystemId.equals(fCurrentBaseURI.getExpandedSystemId())) {
        return true;
    }

    if (fParentXIncludeHandler == null) {
        return false;
    }
    return fParentXIncludeHandler.searchForRecursiveIncludes(
        includedSource);
}
 
Example 20
Source File: XMLParseException.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Constructs a parse exception. */
public XMLParseException(XMLLocator locator,
                         String message, Exception exception) {
    super(message, exception);
    if (locator != null) {
        fPublicId = locator.getPublicId();
        fLiteralSystemId = locator.getLiteralSystemId();
        fExpandedSystemId = locator.getExpandedSystemId();
        fBaseSystemId = locator.getBaseSystemId();
        fLineNumber = locator.getLineNumber();
        fColumnNumber = locator.getColumnNumber();
        fCharacterOffset = locator.getCharacterOffset();
    }
}