X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmlminidom%2Ftest.ml;h=a906c05527c39dceffd42702e57ce960b570c2a5;hb=b1fb6b8e1767d775bc452303629e95941d142bea;hp=1a239f8f60abc13b97cf683720d168a84b6a0b80;hpb=95382c071236ad4bf8e42041839493dec191f921;p=helm.git diff --git a/helm/DEVEL/mlminidom/test.ml b/helm/DEVEL/mlminidom/test.ml index 1a239f8f6..a906c0552 100644 --- a/helm/DEVEL/mlminidom/test.ml +++ b/helm/DEVEL/mlminidom/test.ml @@ -32,14 +32,17 @@ let check_attribute_ns attr = in match parent,ns_uri,attr_name,attr_value with Some parent_node,Some uri,Some attribute_name,Some attribute_value -> - let attr_value = Minidom.node_get_attribute_ns parent_node attribute_name uri + let attr_info = + (Minidom.node_get_attribute_ns parent_node attribute_name uri, + Minidom.node_has_attribute_ns parent_node attribute_name uri) in begin - match attr_value with - Some attr1 -> + match attr_info with + Some attr1, true -> Printf.printf "found the attribute with ns %s (was %s)\n" (Minidom.string_of_mDOMString attr1) (Minidom.string_of_mDOMString attribute_value) - | None -> + | None, false -> Printf.printf "attribute not found (uri was %s)!!!!\n" (Minidom.string_of_mDOMString uri) + | _,_ -> assert false end | _ -> Printf.printf "parent_node == NULL || uri == NULL || attribute_name == NULL || attribute_value == NULL\n" @@ -101,4 +104,3 @@ let rec print_node n node = ;; print_node 0 root;; -