private static void applyAttributes (Element element, Attributes attributes)
throws BeanException, SAXException {
assert (element != null);
assert (attributes != null);
NamedAttributeProxy proxy = new NamedAttributeProxy (element);
for (int attribute = 0; attribute < attributes.getLength (); ++attribute) {
String name = toName (attributes.getLocalName (attribute), attributes
.getQName (attribute));
try {
proxy.setProperty (name, attributes.getValue (attribute));
} catch (Exception e) {
throw new SAXException (e);
}
}
}