Java Code Examples for com.sun.org.apache.xerces.internal.xni.XMLString#clear()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.XMLString#clear() . 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: XMLDTDScannerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 2
Source File: XMLDTDScannerImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 3
Source File: XMLDTDScannerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName);
    }
    return defaultType;

}
 
Example 4
Source File: XMLDTDScannerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 5
Source File: XMLDTDScannerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 6
Source File: XMLDTDScannerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 7
Source File: XMLDTDScannerImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 8
Source File: XMLDTDScannerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName, false);
    }
    return defaultType;

}
 
Example 9
Source File: XMLDTDScannerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC, elName);
    }
    return defaultType;

}
 
Example 10
Source File: XMLDTDScannerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC);
    }
    return defaultType;

}
 
Example 11
Source File: XMLDTDScannerImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Scans an attribute default declaration
 * <p>
 * <pre>
 * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 * </pre>
 *
 * @param name The name of the attribute being scanned.
 * @param defaultVal The string to fill in with the default value.
 */
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {

    String defaultType = null;
    fString.clear();
    defaultVal.clear();
    if (fEntityScanner.skipString("#REQUIRED")) {
        defaultType = "#REQUIRED";
    }
    else if (fEntityScanner.skipString("#IMPLIED")) {
        defaultType = "#IMPLIED";
    }
    else {
        if (fEntityScanner.skipString("#FIXED")) {
            defaultType = "#FIXED";
            // spaces
            if (!skipSeparator(true, !scanningInternalSubset())) {
                reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
                new Object[]{elName, atName});
            }
        }
        // AttValue
        boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
        scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
        fAttributes, 0, isVC);
    }
    return defaultType;

}