Empty node name is allowed for LIST_NODES; this allows nodes to be

reconstructed looking at their names and namespaces.  This is useful
to implement xs:any
This commit is contained in:
Frédéric Péters 2005-01-25 19:59:17 +00:00
parent 75b8a0e0b6
commit 965a869262
2 changed files with 5 additions and 1 deletions

View File

@ -51,6 +51,10 @@ SNIPPET_LIST_NODES
<Value-n/>
</Parent>
[note: if there are no other nodes; it is possible to leave snippet name as
the empty string; nodes will then be constructed looking at their names and
namespaces (this is useful for xs:any)]
SNIPPET_LIST_CONTENT

View File

@ -331,7 +331,7 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode)
type = snippet->type & 0xff;
value = G_STRUCT_MEMBER_P(node, snippet->offset);
if (strcmp(t->name, snippet->name) != 0)
if (strcmp(t->name, snippet->name) != 0 && snippet->name[0])
continue;
if (type == SNIPPET_NODE) {