Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#ILLEGAL_ATTRIBUTE_ERR
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg#ILLEGAL_ATTRIBUTE_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 |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 2
Source File: Parser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 3
Source File: Parser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = (String[]) _instructionAttrs.get(qname); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 4
Source File: Parser.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 5
Source File: Parser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 6
Source File: Parser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 7
Source File: Parser.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 8
Source File: Parser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 9
Source File: Parser.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = _instructionAttrs.get(qname.getStringRep()); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 10
Source File: Parser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = (String[]) _instructionAttrs.get(qname); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }
Example 11
Source File: Parser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * checks the list of attributes against a list of allowed attributes * for a particular element node. */ private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = (String[]) _instructionAttrs.get(qname); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String attrQName = attrs.getQName(i); if (isStylesheet && attrQName.equals("version")) { versionIsOne = attrs.getValue(i).equals("1.0"); } // Ignore if special or if it has a prefix if (attrQName.startsWith("xml") || attrQName.indexOf(':') > 0) continue; for (j = 0; j < legal.length; j++) { if (attrQName.equalsIgnoreCase(legal[j])) { break; } } if (j == legal.length) { final ErrorMsg err = new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); // Workaround for the TCK failure ErrorListener.errorTests.error001.. err.setWarningError(true); reportError(WARNING, err); } } } }