summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2012-09-07 14:24:50 +0800
committerDaniel Veillard <veillard@redhat.com>2012-09-07 14:24:50 +0800
commit47881284aeaeeb93b3444419adeffc9e11ed1093 (patch)
treeecaee15c2ebf20449e0cb6d96b75c84fe4aae5f5 /xpath.c
parent55b899a23acfa2e1bb36026b50a8f7cb36dc4fda (diff)
downloadlibxml2-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xpath.c b/xpath.c
index 2bb6d344..6552e1b1 100644
--- a/xpath.c
+++ b/xpath.c
@@ -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);
}
}