}
private ErrorSet validateOneSet(AttributeSet attrSet) throws SAXException, IOException,
ParserConfigurationException, SdkException, Exception
{
ErrorSet errSet = null;
AttributeType[] attrs = attrSet.getAttribute();
if(attrs == null) {
return errSet;
}
Document xml = attrXmlProvider.getMultipleCSXml(new AttributeSet[]{attrSet});
for(int i = 0; i < attrs.length; i++ ) {
Attribute attr = (Attribute)attrSet.getAttribute(i);
String select = getRuleSelectString(attrSet.getAttributeSetID(), attr.getAttributeID());
NodeList rules = XPathUtil.selectNodes(select, xml);
int rCnt = rules.getLength();
for (int r = 0; r < rCnt; r++) {
Error err = validateAttr(attr, rules.item(r));
if (err != null) {
if (errSet == null)
errSet = new ErrorSet(attrSet.getAttributeSetID());
errSet.addError(err);
}
}
}
return errSet;