diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2006-05-16 08:10:28 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2006-05-16 08:10:28 +0000 |
| commit | dec18ebdc15c7b3d3a7337bc9c021998c3b2e0db (patch) | |
| tree | 89029dec6a9385846262a0fb91415f0d05e49b73 | |
| parent | e42861c2aa5e22772c4139315a65486682f3e106 (diff) | |
| download | lasso-dec18ebdc15c7b3d3a7337bc9c021998c3b2e0db.tar.gz lasso-dec18ebdc15c7b3d3a7337bc9c021998c3b2e0db.tar.xz lasso-dec18ebdc15c7b3d3a7337bc9c021998c3b2e0db.zip | |
support for SNIPPET_LIST_XMLNODES (very old patch)
| -rw-r--r-- | lasso/xml/saml_attribute_value.c | 2 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lasso/xml/saml_attribute_value.c b/lasso/xml/saml_attribute_value.c index c7a61e32..2d73affc 100644 --- a/lasso/xml/saml_attribute_value.c +++ b/lasso/xml/saml_attribute_value.c @@ -35,7 +35,7 @@ /*****************************************************************************/ static struct XmlSnippet schema_snippets[] = { - { "", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoSamlAttributeValue, any) }, + { "", SNIPPET_LIST_XMLNODES, G_STRUCT_OFFSET(LassoSamlAttributeValue, any) }, { NULL, 0, 0 } }; diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index f4d94df8..98c2ec3d 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -370,6 +370,21 @@ lasso_node_impl_init_from_xml(LassoNode *node, xmlNode *xmlnode) while (class && LASSO_IS_NODE_CLASS(class) && class->node_data) { for (t = xmlnode->children; t; t = t->next) { + if (t->type == XML_TEXT_NODE) { + for (snippet = class->node_data->snippets; + snippet && snippet->name; snippet++) { + type = snippet->type & 0xff; + value = G_STRUCT_MEMBER_P(node, snippet->offset); + + if (type != SNIPPET_LIST_XMLNODES) + continue; + + GList **location = value; + *location = g_list_append(*location, xmlCopyNode(t, 1)); + } + continue; + } + if (t->type != XML_ELEMENT_NODE) continue; |
