Java Code Examples for com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription#getBaseSystemId()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription#getBaseSystemId() . 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: EntityResolver2Wrapper.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 2
Source File: EntityResolver2Wrapper.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 3
Source File: EntityResolver2Wrapper.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 4
Source File: EntityResolver2Wrapper.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 5
Source File: EntityResolver2Wrapper.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 6
Source File: EntityResolver2Wrapper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 7
Source File: EntityResolver2Wrapper.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 8
Source File: EntityResolver2Wrapper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 9
Source File: EntityResolver2Wrapper.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 10
Source File: EntityResolver2Wrapper.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}
 
Example 11
Source File: EntityResolver2Wrapper.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <p>Locates an external subset for documents which do not explicitly
 * provide one. If no external subset is provided, this method should
 * return <code>null</code>.</p>
 *
 * @param grammarDescription a description of the DTD
 *
 * @throws XNIException Thrown on general error.
 * @throws IOException  Thrown if resolved entity stream cannot be
 *                      opened or some other i/o error occurs.
 */
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription)
        throws XNIException, IOException {

    if (fEntityResolver != null) {

        String name = grammarDescription.getRootName();
        String baseURI = grammarDescription.getBaseSystemId();

        // Resolve using EntityResolver2
        try {
            InputSource inputSource = fEntityResolver.getExternalSubset(name, baseURI);
            return (inputSource != null) ? createXMLInputSource(inputSource, baseURI) : null;
        }
        // error resolving external subset
        catch (SAXException e) {
            Exception ex = e.getException();
            if (ex == null) {
                ex = e;
            }
            throw new XNIException(ex);
        }
    }

    // unable to resolve external subset
    return null;

}