/** * Method for use by subclasses (processing-instruction and namespace) that take * a name and a select attribute * * @return the expression defining the name attribute * @throws XPathException if an error is detected */ protected Expression prepareAttributesNameAndSelect() throws XPathException { Expression name = null; String nameAtt = null; String selectAtt = null; AttributeCollection atts = getAttributeList(); for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("name")) { nameAtt = Whitespace.trim(atts.getValue(a)); name = makeAttributeValueTemplate(nameAtt, a); } else if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (nameAtt == null) { reportAbsence("name"); } return name; }
/** * Method for use by subclasses (processing-instruction and namespace) that take * a name and a select attribute * * @return the expression defining the name attribute * @throws XPathException if an error is detected */ protected Expression prepareAttributesNameAndSelect() throws XPathException { Expression name = null; String nameAtt = null; String selectAtt = null; AttributeCollection atts = getAttributeList(); for (int a = 0; a < atts.getLength(); a++) { String f = atts.getQName(a); if (f.equals("name")) { nameAtt = Whitespace.trim(atts.getValue(a)); name = makeAttributeValueTemplate(nameAtt, a); } else if (f.equals("select")) { selectAtt = atts.getValue(a); select = makeExpression(selectAtt, a); } else { checkUnknownAttribute(atts.getNodeName(a)); } } if (nameAtt == null) { reportAbsence("name"); } return name; }