From ea9642779e6def5d819230403fb16523d0bb70e1 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 10 Mar 2009 22:31:23 +0000 Subject: Sync commentary about expected behaviour with spec. svn path=/trunk/hubbub/; revision=6767 --- examples/libxml.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'examples/libxml.c') diff --git a/examples/libxml.c b/examples/libxml.c index bb57835..0c6863c 100644 --- a/examples/libxml.c +++ b/examples/libxml.c @@ -721,6 +721,12 @@ int append_child(void *ctx, void *parent, void *child, void **result) xmlNode *chld = (xmlNode *) child; xmlNode *p = (xmlNode *) parent; + /* Note: this does not exactly follow the current specification. + * See http://www.whatwg.org/specs/web-apps/current-work/ \ + * multipage/tree-construction.html#insert-a-character + * for the exact behaviour required. + */ + if (chld->type == XML_TEXT_NODE && p->last != NULL && p->last->type == XML_TEXT_NODE) { /* Need to clone the child, as libxml will free it if it @@ -926,6 +932,11 @@ int form_associate(void *ctx, void *form, void *node) * useful because forms may be misnested in the source data and thus * it is not necessarily sufficient to search the resultant DOM to * perform the association. + * + * Note that this callback will be called even if the node has + * an @form. In that case, the association should be between the node + * and the form identified by the ID in @form. This may not be the same + * as the form passed in. */ return 0; } -- cgit v1.2.3