Exemplo n.º 1
0
 private void checkID(final JElement je) {
   final org.jdom2.Element emt = (org.jdom2.Element) (je.shadow);
   if (emt.hasAttributes()) {
     for (final Attribute a : emt.getAttributes()) {
       if (a.getAttributeType() == AttributeType.ID) {
         if (idmap.put(a.getValue(), je) != null) {
           throw new DOMException(
               DOMException.INVALID_STATE_ERR, "Multiple elements with id " + a.getValue());
         }
       }
     }
   }
 }