public void prepareAttributes() throws XPathException { String selectAtt = null; String errorAtt = null; AttributeCollection atts = getAttributeList(); for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else if (f.equals("errors")) { errorAtt = atts.getValue(a); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (errorAtt == null) { // default is "catch all errors" nameTest = AnyNodeTest.getInstance(); // for error recovery } else { List<QNameTest> tests = parseNameTests(errorAtt); if (tests.size() == 0) { compileError("xsl:catch/@errors must not be empty"); } if (tests.size() == 1) { nameTest = tests.get(0); } else { nameTest = new UnionQNameTest(tests); } } }
public void prepareAttributes() throws XPathException { String selectAtt = null; String errorAtt = null; AttributeCollection atts = getAttributeList(); for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else if (f.equals("errors")) { errorAtt = atts.getValue(a); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (errorAtt == null) { // default is "catch all errors" nameTest = AnyNodeTest.getInstance(); // for error recovery } else { List<QNameTest> tests = parseNameTests(errorAtt); if (tests.size() == 0) { compileError("xsl:catch/@errors must not be empty"); } if (tests.size() == 1) { nameTest = tests.get(0); } else { nameTest = new UnionQNameTest(tests); } } }