diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-10-10 16:18:22 +0200 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-10-10 16:31:03 +0200 |
commit | aa7fae5fc1e512ab5e9db883f13c1c34ec28cde7 (patch) | |
tree | d2b64e38937eff468018fbcfba4ade026cef8368 /lasso/xml | |
parent | 7b1aa28c2c692d74abf7ed030721a29ea7f5cfa2 (diff) | |
download | lasso-aa7fae5fc1e512ab5e9db883f13c1c34ec28cde7.tar.gz lasso-aa7fae5fc1e512ab5e9db883f13c1c34ec28cde7.tar.xz lasso-aa7fae5fc1e512ab5e9db883f13c1c34ec28cde7.zip |
[xml] if a SNIPPET_LIST_NODES as the SNIPPET_ANY flag, allows really any kind of node through LassoMiscTextNode
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/xml.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 259830be..8677c2de 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -1345,12 +1345,9 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode) LassoNode *n; n = lasso_node_new_from_xmlNode_with_type(t, snippet->class_name); - if (n == NULL && snippet_any == snippet && - t->properties == NULL && t->children && - t->children->type == XML_TEXT_NODE && - t->children->next == NULL) { - /* unknown, but no attributes, and content - * is text ? -> use generic object */ + if (n == NULL && snippet_any == snippet) { + /* unknown, can be text or node -> make a + * LassoMiscTextNode */ n = lasso_node_new_from_xmlNode_with_type(t, "LassoMiscTextNode"); } |