+ method private loadDir dir =
+ let mathml = MatitaMisc.empty_boxml () in
+ let content = Http_getter.ls dir in
+ let root = mathml#get_documentElement in
+ let new_box_elt name =
+ mathml#createElementNS ~namespaceURI:(Some Misc.boxml_ns)
+ ~qualifiedName:(Gdome.domString ("b:" ^ name))
+ in
+ let new_text content = mathml#createTextNode (Gdome.domString content) in
+ let b_v = new_box_elt "v" in
+ List.iter
+ (fun item ->
+ let b_text = new_box_elt "text" in
+ let uri, elt =
+ match item with
+ | Http_getter_types.Ls_section subdir ->
+ (dir ^ subdir ^ "/"), (new_text (subdir ^ "/"))
+ | Http_getter_types.Ls_object obj ->
+ (dir ^ obj.Http_getter_types.uri),
+ (new_text obj.Http_getter_types.uri)
+ in
+ b_text#setAttributeNS ~namespaceURI:(Some Misc.xlink_ns)
+ ~qualifiedName:(Gdome.domString "xlink:href")
+ ~value:(Gdome.domString uri);
+ ignore (b_v#appendChild ~newChild:(b_text :> Gdome.node));
+ ignore (b_text#appendChild ~newChild:(elt :> Gdome.node)))
+ content;
+ ignore (root#appendChild ~newChild:(b_v :> Gdome.node));
+(* Misc.domImpl#saveDocumentToFile ~doc:mathml ~name:"pippo" (); *)
+ mathView#load_root ~root:root
+