diff options
author | Daniil Baturin <daniil@baturin.org> | 2017-01-16 14:20:19 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2017-01-16 14:20:19 +0700 |
commit | cfff74d6774de069b3233c04771bfc26ee988bdd (patch) | |
tree | 4dd806dc7989aa328bd12928bfdd93fc76fb3243 /src | |
parent | 9da79730078c820443940832ad84b13b8dcb3105 (diff) | |
download | vyconf-cfff74d6774de069b3233c04771bfc26ee988bdd.tar.gz vyconf-cfff74d6774de069b3233c04771bfc26ee988bdd.zip |
Update reference tree loader to match the schema.
Diffstat (limited to 'src')
-rw-r--r-- | src/reference_tree.ml | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/reference_tree.ml b/src/reference_tree.ml index 61e1efa..87ab881 100644 --- a/src/reference_tree.ml +++ b/src/reference_tree.ml @@ -73,17 +73,10 @@ let data_from_xml d x = | Xml.Element ("constraint", _, _) -> load_constraint_from_xml d x | Xml.Element ("hidden", _, _) -> {d with hidden=true} | Xml.Element ("secret", _, _) -> {d with secret=true} + | Xml.Element ("keepChildOrder", _, _) -> {d with keep_order=true} | _ -> raise (Bad_interface_definition "Malformed property tag") in Xml.fold aux d x -let get_keep_child_order xml = - match xml with - | Xml.Element ("tagNode", _, _) -> - (match (Util.find_xml_child "keepChildOrder" xml) with - | Some _ -> true - | None -> false) - | _ -> false - let rec insert_from_xml basepath reftree xml = match xml with | Xml.Element (tag, _, _) -> @@ -97,8 +90,7 @@ let rec insert_from_xml basepath reftree xml = let node_owner = try let o = Xml.attrib xml "owner" in Some o with _ -> None in - let keep_order = get_keep_child_order xml in - let data = {data with node_type = node_type; owner = node_owner; keep_order = keep_order} in + let data = {data with node_type=node_type; owner=node_owner} in let name = Xml.attrib xml "name" in let path = basepath @ [name] in let new_tree = Vytree.insert reftree path data in |