Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#INVALID_QNAME_ERR
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#INVALID_QNAME_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: ApplyTemplates.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void parseContents(Parser parser) { final String select = getAttribute("select"); final String mode = getAttribute("mode"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } if (mode.length() > 0) { if (!XML11Char.isXML11ValidQName(mode)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, mode, this); parser.reportError(Constants.ERROR, err); } _modeName = parser.getQNameIgnoreDefaultNs(mode); } // instantiate Mode if needed, cache (apply temp) function name _functionName = parser.getTopLevelStylesheet().getMode(_modeName).functionName(); parseChildren(parser);// with-params }
Example 2
Source File: WithParam.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * The contents of a <xsl:with-param> elements are either in the element's * 'select' attribute (this has precedence) or in the element body. */ public void parseContents(Parser parser) { final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); } final String select = getAttribute("select"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } parseChildren(parser); }
Example 3
Source File: DecimalFormatting.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Parse the name of the <xsl:decimal-formatting/> element */ public void parseContents(Parser parser) { // Get the name of these decimal formatting symbols final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)){ ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } } _name = parser.getQNameIgnoreDefaultNs(name); if (_name == null) { _name = parser.getQNameIgnoreDefaultNs(EMPTYSTRING); } // Check if a set of symbols has already been registered under this name SymbolTable stable = parser.getSymbolTable(); if (stable.getDecimalFormatting(_name) != null) { reportWarning(this, parser, ErrorMsg.SYMBOLS_REDEF_ERR, _name.toString()); } else { stable.addDecimalFormatting(_name, this); } }
Example 4
Source File: WithParam.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * The contents of a <xsl:with-param> elements are either in the element's * 'select' attribute (this has precedence) or in the element body. */ public void parseContents(Parser parser) { final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); } final String select = getAttribute("select"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } parseChildren(parser); }
Example 5
Source File: ApplyTemplates.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void parseContents(Parser parser) { final String select = getAttribute("select"); final String mode = getAttribute("mode"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } if (mode.length() > 0) { if (!XML11Char.isXML11ValidQName(mode)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, mode, this); parser.reportError(Constants.ERROR, err); } _modeName = parser.getQNameIgnoreDefaultNs(mode); } // instantiate Mode if needed, cache (apply temp) function name _functionName = parser.getTopLevelStylesheet().getMode(_modeName).functionName(); parseChildren(parser);// with-params }
Example 6
Source File: DecimalFormatting.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Parse the name of the <xsl:decimal-formatting/> element */ public void parseContents(Parser parser) { // Get the name of these decimal formatting symbols final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)){ ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } } _name = parser.getQNameIgnoreDefaultNs(name); if (_name == null) { _name = parser.getQNameIgnoreDefaultNs(EMPTYSTRING); } // Check if a set of symbols has already been registered under this name SymbolTable stable = parser.getSymbolTable(); if (stable.getDecimalFormatting(_name) != null) { reportWarning(this, parser, ErrorMsg.SYMBOLS_REDEF_ERR, _name.toString()); } else { stable.addDecimalFormatting(_name, this); } }
Example 7
Source File: ApplyTemplates.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void parseContents(Parser parser) { final String select = getAttribute("select"); final String mode = getAttribute("mode"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } if (mode.length() > 0) { if (!XML11Char.isXML11ValidQName(mode)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, mode, this); parser.reportError(Constants.ERROR, err); } _modeName = parser.getQNameIgnoreDefaultNs(mode); } // instantiate Mode if needed, cache (apply temp) function name _functionName = parser.getTopLevelStylesheet().getMode(_modeName).functionName(); parseChildren(parser);// with-params }
Example 8
Source File: WithParam.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * The contents of a <xsl:with-param> elements are either in the element's * 'select' attribute (this has precedence) or in the element body. */ public void parseContents(Parser parser) { final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); } final String select = getAttribute("select"); if (select.length() > 0) { _select = parser.parseExpression(this, "select", null); } parseChildren(parser); }
Example 9
Source File: VariableBase.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Parse the contents of the <xsl:decimal-format> element. */ public void parseContents(Parser parser) { // Get the 'name attribute String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); // Check whether variable/param of the same name is already in scope VariableBase other = parser.lookupVariable(_name); if ((other != null) && (other.getParent() == getParent())) { reportError(this, parser, ErrorMsg.VARIABLE_REDEF_ERR, name); } select = getAttribute("select"); if (select.length() > 0) { _select = getParser().parseExpression(this, "select", null); if (_select.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "select"); return; } } // Children must be parsed first -> static scoping parseChildren(parser); }
Example 10
Source File: Key.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Parse the <xsl:key> element and attributes * @param parser A reference to the stylesheet parser */ public void parseContents(Parser parser) { // Get the required attributes and parser XPath expressions final String name = getAttribute("name"); if (!XML11Char.isXML11ValidQName(name)){ ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } // Parse key name and add to symbol table _name = parser.getQNameIgnoreDefaultNs(name); getSymbolTable().addKey(_name, this); _match = parser.parsePattern(this, "match", null); _use = parser.parseExpression(this, "use", null); // Make sure required attribute(s) have been set if (_name == null) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); return; } if (_match.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "match"); return; } if (_use.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "use"); return; } }
Example 11
Source File: VariableBase.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Parse the contents of the <xsl:decimal-format> element. */ public void parseContents(Parser parser) { // Get the 'name attribute String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); // Check whether variable/param of the same name is already in scope VariableBase other = parser.lookupVariable(_name); if ((other != null) && (other.getParent() == getParent())) { reportError(this, parser, ErrorMsg.VARIABLE_REDEF_ERR, name); } select = getAttribute("select"); if (select.length() > 0) { _select = getParser().parseExpression(this, "select", null); if (_select.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "select"); return; } } // Children must be parsed first -> static scoping parseChildren(parser); }
Example 12
Source File: Copy.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void parseContents(Parser parser) { final String useSets = getAttribute("use-attribute-sets"); if (useSets.length() > 0) { if (!Util.isValidQNames(useSets)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this); parser.reportError(Constants.ERROR, err); } _useSets = new UseAttributeSets(useSets, parser); } parseChildren(parser); }
Example 13
Source File: Key.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Parse the <xsl:key> element and attributes * @param parser A reference to the stylesheet parser */ public void parseContents(Parser parser) { // Get the required attributes and parser XPath expressions final String name = getAttribute("name"); if (!XML11Char.isXML11ValidQName(name)){ ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } // Parse key name and add to symbol table _name = parser.getQNameIgnoreDefaultNs(name); getSymbolTable().addKey(_name, this); _match = parser.parsePattern(this, "match", null); _use = parser.parseExpression(this, "use", null); // Make sure required attribute(s) have been set if (_name == null) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); return; } if (_match.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "match"); return; } if (_use.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "use"); return; } }
Example 14
Source File: VariableBase.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parse the contents of the <xsl:decimal-format> element. */ public void parseContents(Parser parser) { // Get the 'name attribute String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } setName(parser.getQNameIgnoreDefaultNs(name)); } else reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); // Check whether variable/param of the same name is already in scope VariableBase other = parser.lookupVariable(_name); if ((other != null) && (other.getParent() == getParent())) { reportError(this, parser, ErrorMsg.VARIABLE_REDEF_ERR, name); } select = getAttribute("select"); if (select.length() > 0) { _select = getParser().parseExpression(this, "select", null); if (_select.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "select"); return; } } // Children must be parsed first -> static scoping parseChildren(parser); }
Example 15
Source File: Copy.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void parseContents(Parser parser) { final String useSets = getAttribute("use-attribute-sets"); if (useSets.length() > 0) { if (!Util.isValidQNames(useSets)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this); parser.reportError(Constants.ERROR, err); } _useSets = new UseAttributeSets(useSets, parser); } parseChildren(parser); }
Example 16
Source File: Key.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Parse the <xsl:key> element and attributes * @param parser A reference to the stylesheet parser */ public void parseContents(Parser parser) { // Get the required attributes and parser XPath expressions final String name = getAttribute("name"); if (!XML11Char.isXML11ValidQName(name)){ ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } // Parse key name and add to symbol table _name = parser.getQNameIgnoreDefaultNs(name); getSymbolTable().addKey(_name, this); _match = parser.parsePattern(this, "match", null); _use = parser.parseExpression(this, "use", null); // Make sure required attribute(s) have been set if (_name == null) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); return; } if (_match.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "match"); return; } if (_use.isDummy()) { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "use"); return; } }
Example 17
Source File: CallTemplate.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void parseContents(Parser parser) { final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } _name = parser.getQNameIgnoreDefaultNs(name); } else { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); } parseChildren(parser); }
Example 18
Source File: Copy.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void parseContents(Parser parser) { final String useSets = getAttribute("use-attribute-sets"); if (useSets.length() > 0) { if (!Util.isValidQNames(useSets)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this); parser.reportError(Constants.ERROR, err); } _useSets = new UseAttributeSets(useSets, parser); } parseChildren(parser); }
Example 19
Source File: CallTemplate.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void parseContents(Parser parser) { final String name = getAttribute("name"); if (name.length() > 0) { if (!XML11Char.isXML11ValidQName(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, name, this); parser.reportError(Constants.ERROR, err); } _name = parser.getQNameIgnoreDefaultNs(name); } else { reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name"); } parseChildren(parser); }
Example 20
Source File: Copy.java From JDKSourceCode1.8 with MIT License | 5 votes |
public void parseContents(Parser parser) { final String useSets = getAttribute("use-attribute-sets"); if (useSets.length() > 0) { if (!Util.isValidQNames(useSets)) { ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this); parser.reportError(Constants.ERROR, err); } _useSets = new UseAttributeSets(useSets, parser); } parseChildren(parser); }