diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-01-25 19:59:17 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-01-25 19:59:17 +0000 |
| commit | 965a8692622f573930acfa1e880dc3adbb0457d2 (patch) | |
| tree | 9b3055c9b5cb2e0e3fc45ba7cca7dc9e95fe212d | |
| parent | 75b8a0e0b6ea419ccf350e4febfc8c08ef95f318 (diff) | |
| download | lasso-965a8692622f573930acfa1e880dc3adbb0457d2.tar.gz lasso-965a8692622f573930acfa1e880dc3adbb0457d2.tar.xz lasso-965a8692622f573930acfa1e880dc3adbb0457d2.zip | |
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
| -rw-r--r-- | docs/reference/snippet-types.rst | 4 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/reference/snippet-types.rst b/docs/reference/snippet-types.rst index 03b351dc..9390de74 100644 --- a/docs/reference/snippet-types.rst +++ b/docs/reference/snippet-types.rst @@ -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 diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 566a0165..a36c7d63 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -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) { |
