diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-09-07 14:24:50 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-09-07 14:24:50 +0800 |
commit | 47881284aeaeeb93b3444419adeffc9e11ed1093 (patch) | |
tree | ecaee15c2ebf20449e0cb6d96b75c84fe4aae5f5 /xpath.c | |
parent | 55b899a23acfa2e1bb36026b50a8f7cb36dc4fda (diff) | |
download | libxml2-47881284aeaeeb93b3444419adeffc9e11ed1093.tar.gz |
Add a forbidden variable error number and message to XPath
Related to https://bugzilla.gnome.org/show_bug.cgi?id=680938
When the XML_XPATH_NOVAR flags is being used it means that
variables are forbidden, not that they are missing
Diffstat (limited to 'xpath.c')
-rw-r--r-- | xpath.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -328,6 +328,7 @@ static const char *xmlXPathErrorMessages[] = { "Char out of XML range\n", "Invalid or incomplete context\n", "Stack usage errror\n", + "Forbidden variable\n", "?? Unknown error ??\n" /* Must be last in the list! */ }; #define MAXERRNO ((int)(sizeof(xmlXPathErrorMessages) / \ @@ -10378,7 +10379,7 @@ xmlXPathCompVariableReference(xmlXPathParserContextPtr ctxt) { name, prefix); SKIP_BLANKS; if ((ctxt->context != NULL) && (ctxt->context->flags & XML_XPATH_NOVAR)) { - XP_ERROR(XPATH_UNDEF_VARIABLE_ERROR); + XP_ERROR(XPATH_FORBID_VARIABLE_ERROR); } } |