-(********* PROVE E RIPROVE
-let old_true_child = true_child in
-let true_child =
- (from#createElementNS
- ~namespaceURI:(Some (Gdome.domString mathmlns))
- ~qualifiedName:(Gdome.domString "m:mrow") :> Gdome.node) ;
-in
-ignore (f#removeChild old_true_child) ;
-ignore (true_child#appendChild old_true_child) ;
- ignore (p#replaceChild ~oldChild:f ~newChild:true_child) ;
-(*
-ignore (true_child#appendChild old_true_child) ;
- ignore (p#replaceChild ~oldChild:f ~newChild:true_child) ;
-*)
-prerr_endline ("%%% RICORSIONE SU " ^ (match true_child#get_localName with Some s -> s#to_string | None -> "_") ^ "/" ^ (match old_true_child#get_localName with Some s -> s#to_string | None -> "_") ^ " E " ^ (match old_true_child#get_localName with Some s -> s#to_string | None -> "_")) ;
-let fchildren = old_true_child#get_childNodes in
-let l = ref [] in
-for i = 0 to fchildren#get_length -1 do
- l := !l @ [ match (fchildren#item i) with None -> "?" | Some n -> match n#get_localName with Some s -> s#to_string | None -> "_" ]
-done ;
-let tchildren = t#get_childNodes in
-let l2 = ref [] in
-for i = 0 to tchildren#get_length -1 do
- l2 := !l2 @ [ match (tchildren#item i) with None -> "?" | Some n -> match n#get_localName with Some s -> s#to_string | None -> "_" ]
-done ;
-prerr_endline ("%%% Il primo nodo ha i seguenti figli: " ^ String.concat "," !l) ;
-prerr_endline ("%%% Il secondo nodo ha i seguenti figli: " ^ String.concat "," !l2) ;
-
-let fchildren = old_true_child#get_childNodes in
-let tchildren = t#get_childNodes in
-let node_list_of_nodeList nl =
-let rec aux i =
- match nl#item ~index:i with
- None -> []
- | Some n when
- n#get_nodeType = GdomeNodeTypeT.ELEMENT_NODE
- or n#get_nodeType = GdomeNodeTypeT.TEXT_NODE ->
- n::(aux (i+1))
- | Some n ->
-prerr_endline ("### XML_DIFF: mi sto perdendo i nodi di tipo " ^ string_of_int (Obj.magic n#get_nodeType)) ;
- aux (i+1)
-in
- aux 0
- in
-prerr_endline ("RRR XML_DIFF: chiamo dumb_diff su " ^ String.concat ", " (List.map (function n -> match n#get_localName with Some s -> s#to_string | None -> "_") (node_list_of_nodeList fchildren)) ^ " e " ^ String.concat ", " (List.map (function n -> match n#get_localName with Some s -> s#to_string | None -> "_") (node_list_of_nodeList tchildren))) ;
- aux true_child old_true_child t
-(*
- aux p true_child t
-*)
-*****)