本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.ELEMENT_PARSE_ERR属性的典型用法代码示例。如果您正苦于以下问题:Java ErrorMsg.ELEMENT_PARSE_ERR属性的具体用法?Java ErrorMsg.ELEMENT_PARSE_ERR怎么用?Java ErrorMsg.ELEMENT_PARSE_ERR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg
的用法示例。
在下文中一共展示了ErrorMsg.ELEMENT_PARSE_ERR属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startElement
/**
* 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);
}