public static boolean isDefinedNSDecl(SerializationHandler serializer,int attr,DTM dtm){
  if (DTM.NAMESPACE_NODE == dtm.getNodeType(attr)) {
    String prefix=dtm.getNodeNameX(attr);
    String uri=serializer.getNamespaceURIFromPrefix(prefix);
    if ((null != uri) && uri.equals(dtm.getStringValue(attr)))     return true;
  }
  return false;
}

public static boolean isDefinedNSDecl ( SerializationHandler serializer , int attr , DTM dtm ) { if ( DTM . NAMESPACE_NODE == dtm . getNodeType ( attr ) ) { String prefix = dtm . getNodeNameX ( attr ) ; String uri = serializer . getNamespaceURIFromPrefix ( prefix ) ; if ( ( null != uri ) && uri . equals ( dtm . getStringValue ( attr ) ) ) return true ; } return false ; }
returns whether a namespace is defined
