Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#ELEMENT_PARSE_ERR
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#ELEMENT_PARSE_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 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 2
Source File: Parser.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = _parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 3
Source File: Parser.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 4
Source File: Parser.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = _parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 5
Source File: Parser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = _parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 6
Source File: Parser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = _parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 7
Source File: Parser.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 8
Source File: Parser.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }
Example 9
Source File: Parser.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * SAX2: Receive notification of the beginning of an element. * The parser may re-use the attribute list that we're passed so * we clone the attributes in our own Attributes implementation */ public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException { final int col = qname.lastIndexOf(':'); final String prefix = (col == -1) ? null : qname.substring(0, col); SyntaxTreeNode element = makeInstance(uri, prefix, localname, attributes); if (element == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ELEMENT_PARSE_ERR, prefix+':'+localname); throw new SAXException(err.toString()); } // If this is the root element of the XML document we need to make sure // that it contains a definition of the XSL namespace URI if (_root == null) { if ((_prefixMapping == null) || (_prefixMapping.containsValue(Constants.XSLT_URI) == false)) _rootNamespaceDef = false; else _rootNamespaceDef = true; _root = element; } else { SyntaxTreeNode parent = (SyntaxTreeNode)_parentStack.peek(); parent.addElement(element); element.setParent(parent); } element.setAttributes(new AttributesImpl(attributes)); element.setPrefixMapping(_prefixMapping); if (element instanceof Stylesheet) { // Extension elements and excluded elements have to be // handled at this point in order to correctly generate // Fallback elements from <xsl:fallback>s. getSymbolTable().setCurrentNode(element); ((Stylesheet)element).declareExtensionPrefixes(this); } _prefixMapping = null; _parentStack.push(element); }