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

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#NOT_STYLESHEET_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
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 2
Source File: Parser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 3
Source File: Parser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 4
Source File: Parser.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 5
Source File: Parser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 6
Source File: Parser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 7
Source File: Parser.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 8
Source File: Parser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 9
Source File: Parser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 10
Source File: Parser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}
 
Example 11
Source File: Parser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance of the <code>Stylesheet</code> class,
 * and then parse, typecheck and compile the instance.
 * Must be called after <code>parse()</code>.
 */
public Stylesheet makeStylesheet(SyntaxTreeNode element)
    throws CompilerException {
    try {
        Stylesheet stylesheet;

        if (element instanceof Stylesheet) {
            stylesheet = (Stylesheet)element;
        }
        else {
            stylesheet = new Stylesheet();
            stylesheet.setSimplified();
            stylesheet.addElement(element);
            stylesheet.setAttributes((AttributesImpl) element.getAttributes());

            // Map the default NS if not already defined
            if (element.lookupNamespace(EMPTYSTRING) == null) {
                element.addPrefixMapping(EMPTYSTRING, EMPTYSTRING);
            }
        }
        stylesheet.setParser(this);
        return stylesheet;
    }
    catch (ClassCastException e) {
        ErrorMsg err = new ErrorMsg(ErrorMsg.NOT_STYLESHEET_ERR, element);
        throw new CompilerException(err.toString());
    }
}