Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#NAMESPACE_UNDEF_ERR

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#NAMESPACE_UNDEF_ERR . 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: Parser.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 2
Source File: Parser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 3
Source File: Parser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 4
Source File: Parser.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 5
Source File: Parser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 6
Source File: Parser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 7
Source File: Parser.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 8
Source File: Parser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 9
Source File: Parser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 10
Source File: Parser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}
 
Example 11
Source File: Parser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private QName getQName(final String stringRep, boolean reportError,
    boolean ignoreDefaultNs)
{
    // parse and retrieve namespace
    final int colon = stringRep.lastIndexOf(':');
    if (colon != -1) {
        final String prefix = stringRep.substring(0, colon);
        final String localname = stringRep.substring(colon + 1);
        String namespace = null;

        // Get the namespace uri from the symbol table
        if (prefix.equals(XMLNS_PREFIX) == false) {
            namespace = _symbolTable.lookupNamespace(prefix);
            if (namespace == null && reportError) {
                final int line = getLineNumber();
                ErrorMsg err = new ErrorMsg(ErrorMsg.NAMESPACE_UNDEF_ERR,
                                            line, prefix);
                reportError(ERROR, err);
            }
        }
        return getQName(namespace, prefix, localname);
    }
    else {
        if (stringRep.equals(XMLNS_PREFIX)) {
            ignoreDefaultNs = true;
        }
        final String defURI = ignoreDefaultNs ? null
                              : _symbolTable.lookupNamespace(EMPTYSTRING);
        return getQName(defURI, null, stringRep);
    }
}