summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-10-28 09:07:41 +0000
committerMike Hommey <mh@glandium.org>2004-10-28 09:07:41 +0000
commit9705f1a5e858108d21a0128556f42b25d16833cd (patch)
treef819e7482d433f8bf5da005695c79189dd5ce527 /xpath.c
parent0732be88d054db33fa0ca479eab9988c8e6be42e (diff)
downloadlibxml2-9705f1a5e858108d21a0128556f42b25d16833cd.tar.gz
Load /tmp/tmp.SgII7T/libxml2-2.6.15 intoupstream/2.6.15
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/xpath.c b/xpath.c
index 9866736..89a8e28 100644
--- a/xpath.c
+++ b/xpath.c
@@ -57,6 +57,13 @@
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
+/*
+ * TODO:
+ * There are a few spots where some tests are done which depend upon ascii
+ * data. These should be enhanced for full UTF8 support (see particularly
+ * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
+ */
+
#if defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XPATH_ENABLED)
/************************************************************************
* *
@@ -247,7 +254,7 @@ xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra)
}
/**
- * xmlXPathErrMemory:
+ * xmlXPathPErrMemory:
* @ctxt: an XPath parser context
* @extra: extra informations
*
@@ -7947,7 +7954,7 @@ xmlXPathCompPrimaryExpr(xmlXPathParserContextPtr ctxt) {
}
NEXT;
SKIP_BLANKS;
- } else if (IS_DIGIT_CH(CUR) || (CUR == '.' && IS_DIGIT_CH(NXT(1)))) {
+ } else if (IS_ASCII_DIGIT(CUR) || (CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) {
xmlXPathCompNumber(ctxt);
} else if ((CUR == '\'') || (CUR == '"')) {
xmlXPathCompLiteral(ctxt);
@@ -8009,12 +8016,12 @@ xmlXPathScanName(xmlXPathParserContextPtr ctxt) {
int len = 0;
SKIP_BLANKS;
- if (!IS_LETTER_CH(CUR) && (CUR != '_') &&
+ if (!IS_ASCII_LETTER(CUR) && (CUR != '_') &&
(CUR != ':')) {
return(NULL);
}
- while ((IS_LETTER_CH(NXT(len))) || (IS_DIGIT_CH(NXT(len))) ||
+ while ((IS_ASCII_LETTER(NXT(len))) || (IS_ASCII_DIGIT(NXT(len))) ||
(NXT(len) == '.') || (NXT(len) == '-') ||
(NXT(len) == '_') || (NXT(len) == ':') ||
(IS_COMBINING_CH(NXT(len))) ||
@@ -8024,7 +8031,7 @@ xmlXPathScanName(xmlXPathParserContextPtr ctxt) {
if (len >= XML_MAX_NAMELEN) {
xmlGenericError(xmlGenericErrorContext,
"xmlScanName: reached XML_MAX_NAMELEN limit\n");
- while ((IS_LETTER_CH(NXT(len))) || (IS_DIGIT_CH(NXT(len))) ||
+ while ((IS_ASCII_LETTER(NXT(len))) || (IS_ASCII_DIGIT(NXT(len))) ||
(NXT(len) == '.') || (NXT(len) == '-') ||
(NXT(len) == '_') || (NXT(len) == ':') ||
(IS_COMBINING_CH(NXT(len))) ||
@@ -8060,8 +8067,10 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
xmlChar *name = NULL; /* we may have to preparse a name to find out */
SKIP_BLANKS;
- if ((CUR == '$') || (CUR == '(') || (IS_DIGIT_CH(CUR)) ||
- (CUR == '\'') || (CUR == '"') || (CUR == '.' && IS_DIGIT_CH(NXT(1)))) {
+ if ((CUR == '$') || (CUR == '(') ||
+ (IS_ASCII_DIGIT(CUR)) ||
+ (CUR == '\'') || (CUR == '"') ||
+ (CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) {
lc = 0;
} else if (CUR == '*') {
/* relative or absolute location path */
@@ -8957,7 +8966,7 @@ xmlXPathCompLocationPath(xmlXPathParserContextPtr ctxt) {
NEXT;
SKIP_BLANKS;
if ((CUR != 0 ) &&
- ((IS_LETTER_CH(CUR)) || (CUR == '_') || (CUR == '.') ||
+ ((IS_ASCII_LETTER(CUR)) || (CUR == '_') || (CUR == '.') ||
(CUR == '@') || (CUR == '*')))
xmlXPathCompRelativeLocationPath(ctxt);
}