XML: Do not add empty Value node for nodes with child nodes in TNDS
This fixes some validation issues against DM_ddf DTD that were caused by the conversion from the internal tree structure to TNDS. Only the leaf nodes are supposed to have the Value node. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
13dd13fc01
commit
02eec9954c
1 changed files with 3 additions and 1 deletions
|
@ -246,7 +246,9 @@ static void node_to_tnds(struct xml_node_ctx *ctx, xml_node_t *out,
|
|||
xml_node_create_text(ctx, tnds, NULL, "Path", uri);
|
||||
|
||||
val = get_val(ctx, node);
|
||||
xml_node_create_text(ctx, tnds, NULL, "Value", val ? val : "");
|
||||
if (val || !xml_node_first_child(ctx, node))
|
||||
xml_node_create_text(ctx, tnds, NULL, "Value",
|
||||
val ? val : "");
|
||||
xml_node_get_text_free(ctx, val);
|
||||
|
||||
new_uri = add_path(uri, name);
|
||||
|
|
Loading…
Reference in a new issue