fixing #130453 XInclude element with no href attribute fully integrating
* xinclude.c: fixing #130453 XInclude element with no href attribute
* relaxng.c rngparser.c include/libxml2/relaxng.h: fully integrating
the compact syntax will require more work, postponed for the
2.6.5 release.
Daniel
diff --git a/xinclude.c b/xinclude.c
index e4f9821..56f7350 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -1841,10 +1841,9 @@
*/
href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
if (href == NULL) {
- /* @@@@ */
- xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
- XML_XINCLUDE_NO_HREF, "no href\n", NULL);
- return(-1);
+ href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
+ if (href == NULL)
+ return(-1);
}
parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
if (parse != NULL) {