Lines Matching +defs:val +defs:output

80 * If defined, this will optimize expressions like "key('foo', 'val')[b][1]"
140 * @val: a double value
149 xmlXPathIsNaN(double val) {
150 return(trio_isnan(val));
155 * @val: a double value
164 xmlXPathIsInf(double val) {
165 return(trio_isinf(val));
172 * @val: a double value
181 xmlXPathGetSign(double val) {
182 return(trio_signbit(val));
793 #define PUSH_FULL_EXPR(op, op1, op2, val, val2, val3, val4, val5) \
795 (op), (val), (val2), (val3), (val4), (val5))
796 #define PUSH_LONG_EXPR(op, val, val2, val3, val4, val5) \
798 (op), (val), (val2), (val3), (val4), (val5))
800 #define PUSH_LEAVE_EXPR(op, val, val2) \
801 xmlXPathCompExprAdd(ctxt->comp, -1, -1, (op), (val), (val2), 0 ,NULL ,NULL)
803 #define PUSH_UNARY_EXPR(op, ch, val, val2) \
804 xmlXPathCompExprAdd(ctxt->comp, (ch), -1, (op), (val), (val2), 0 ,NULL ,NULL)
806 #define PUSH_BINARY_EXPR(op, ch1, ch2, val, val2) \
808 (val), (val2), 0 ,NULL ,NULL)
875 xmlXPathDebugDumpNode(FILE *output, xmlNodePtr cur, int depth) {
883 fprintf(output, shift);
884 fprintf(output, "Node is NULL !\n");
891 fprintf(output, shift);
892 fprintf(output, " /\n");
894 xmlDebugDumpAttr(output, (xmlAttrPtr)cur, depth);
896 xmlDebugDumpOneNode(output, cur, depth);
899 xmlXPathDebugDumpNodeList(FILE *output, xmlNodePtr cur, int depth) {
908 fprintf(output, shift);
909 fprintf(output, "Node is NULL !\n");
917 xmlDebugDumpOneNode(output, tmp, depth);
922 xmlXPathDebugDumpNodeSet(FILE *output, xmlNodeSetPtr cur, int depth) {
931 fprintf(output, shift);
932 fprintf(output, "NodeSet is NULL !\n");
938 fprintf(output, "Set contains %d nodes:\n", cur->nodeNr);
940 fprintf(output, shift);
941 fprintf(output, "%d", i + 1);
942 xmlXPathDebugDumpNode(output, cur->nodeTab[i], depth + 1);
948 xmlXPathDebugDumpValueTree(FILE *output, xmlNodeSetPtr cur, int depth) {
957 fprintf(output, shift);
958 fprintf(output, "Value Tree is NULL !\n");
963 fprintf(output, shift);
964 fprintf(output, "%d", i + 1);
965 xmlXPathDebugDumpNodeList(output, cur->nodeTab[0]->children, depth + 1);
969 xmlXPathDebugDumpLocationSet(FILE *output, xmlLocationSetPtr cur, int depth) {
978 fprintf(output, shift);
979 fprintf(output, "LocationSet is NULL !\n");
985 fprintf(output, shift);
986 fprintf(output, "%d : ", i + 1);
987 xmlXPathDebugDumpObject(output, cur->locTab[i], depth + 1);
994 * @output: the FILE * to dump the output
1001 xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) {
1005 if (output == NULL) return;
1012 fprintf(output, shift);
1015 fprintf(output, "Object is empty (NULL)\n");
1020 fprintf(output, "Object is uninitialized\n");
1023 fprintf(output, "Object is a Node Set :\n");
1024 xmlXPathDebugDumpNodeSet(output, cur->nodesetval, depth);
1027 fprintf(output, "Object is an XSLT value tree :\n");
1028 xmlXPathDebugDumpValueTree(output, cur->nodesetval, depth);
1031 fprintf(output, "Object is a Boolean : ");
1032 if (cur->boolval) fprintf(output, "true\n");
1033 else fprintf(output, "false\n");
1038 fprintf(output, "Object is a number : Infinity\n");
1041 fprintf(output, "Object is a number : -Infinity\n");
1045 fprintf(output, "Object is a number : NaN\n");
1047 fprintf(output, "Object is a number : 0\n");
1049 fprintf(output, "Object is a number : %0g\n", cur->floatval);
1054 fprintf(output, "Object is a string : ");
1055 xmlDebugDumpString(output, cur->stringval);
1056 fprintf(output, "\n");
1059 fprintf(output, "Object is a point : index %d in node", cur->index);
1060 xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user, depth + 1);
1061 fprintf(output, "\n");
1066 fprintf(output, "Object is a collapsed range :\n");
1067 fprintf(output, shift);
1069 fprintf(output, "index %d in ", cur->index);
1070 fprintf(output, "node\n");
1071 xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user,
1074 fprintf(output, "Object is a range :\n");
1075 fprintf(output, shift);
1076 fprintf(output, "From ");
1078 fprintf(output, "index %d in ", cur->index);
1079 fprintf(output, "node\n");
1080 xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user,
1082 fprintf(output, shift);
1083 fprintf(output, "To ");
1085 fprintf(output, "index %d in ", cur->index2);
1086 fprintf(output, "node\n");
1087 xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user2,
1089 fprintf(output, "\n");
1094 fprintf(output, "Object is a Location Set:\n");
1095 xmlXPathDebugDumpLocationSet(output,
1100 fprintf(output, "Object is user defined\n");
1106 xmlXPathDebugDumpStepOp(FILE *output, xmlXPathCompExprPtr comp,
1115 fprintf(output, shift);
1117 fprintf(output, "Step is NULL\n");
1122 fprintf(output, "END"); break;
1124 fprintf(output, "AND"); break;
1126 fprintf(output, "OR"); break;
1129 fprintf(output, "EQUAL =");
1131 fprintf(output, "EQUAL !=");
1135 fprintf(output, "CMP <");
1137 fprintf(output, "CMP >");
1139 fprintf(output, "=");
1143 fprintf(output, "PLUS -");
1145 fprintf(output, "PLUS +");
1147 fprintf(output, "PLUS unary -");
1149 fprintf(output, "PLUS unary - -");
1153 fprintf(output, "MULT *");
1155 fprintf(output, "MULT div");
1157 fprintf(output, "MULT mod");
1160 fprintf(output, "UNION"); break;
1162 fprintf(output, "ROOT"); break;
1164 fprintf(output, "NODE"); break;
1166 fprintf(output, "RESET"); break;
1168 fprintf(output, "SORT"); break;
1176 fprintf(output, "COLLECT ");
1179 fprintf(output, " 'ancestors' "); break;
1181 fprintf(output, " 'ancestors-or-self' "); break;
1183 fprintf(output, " 'attributes' "); break;
1185 fprintf(output, " 'child' "); break;
1187 fprintf(output, " 'descendant' "); break;
1189 fprintf(output, " 'descendant-or-self' "); break;
1191 fprintf(output, " 'following' "); break;
1193 fprintf(output, " 'following-siblings' "); break;
1195 fprintf(output, " 'namespace' "); break;
1197 fprintf(output, " 'parent' "); break;
1199 fprintf(output, " 'preceding' "); break;
1201 fprintf(output, " 'preceding-sibling' "); break;
1203 fprintf(output, " 'self' "); break;
1207 fprintf(output, "'none' "); break;
1209 fprintf(output, "'type' "); break;
1211 fprintf(output, "'PI' "); break;
1213 fprintf(output, "'all' "); break;
1215 fprintf(output, "'namespace' "); break;
1217 fprintf(output, "'name' "); break;
1221 fprintf(output, "'node' "); break;
1223 fprintf(output, "'comment' "); break;
1225 fprintf(output, "'text' "); break;
1227 fprintf(output, "'PI' "); break;
1230 fprintf(output, "%s:", prefix);
1232 fprintf(output, "%s", (const char *) name);
1239 fprintf(output, "ELEM ");
1240 xmlXPathDebugDumpObject(output, object, 0);
1248 fprintf(output, "VARIABLE %s:%s", prefix, name);
1250 fprintf(output, "VARIABLE %s", name);
1259 fprintf(output, "FUNCTION %s:%s(%d args)",
1262 fprintf(output, "FUNCTION %s(%d args)", name, nbargs);
1265 case XPATH_OP_ARG: fprintf(output, "ARG"); break;
1266 case XPATH_OP_PREDICATE: fprintf(output, "PREDICATE"); break;
1267 case XPATH_OP_FILTER: fprintf(output, "FILTER"); break;
1269 case XPATH_OP_RANGETO: fprintf(output, "RANGETO"); break;
1272 fprintf(output, "UNKNOWN %d\n", op->op); return;
1274 fprintf(output, "\n");
1277 xmlXPathDebugDumpStepOp(output, comp, &comp->steps[op->ch1], depth + 1);
1279 xmlXPathDebugDumpStepOp(output, comp, &comp->steps[op->ch2], depth + 1);
1284 * @output: the FILE * for the output
1291 xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
1296 if ((output == NULL) || (comp == NULL)) return;
1302 fprintf(output, shift);
1304 fprintf(output, "Compiled Expression : %d elements\n",
1307 xmlXPathDebugDumpStepOp(output, comp, &comp->steps[i], depth + 1);
1914 * @val: the NodePtr value
1917 * Wrap the Nodeset @val in a new xmlXPathObjectPtr
1922 xmlXPathCacheWrapNodeSet(xmlXPathContextPtr ctxt, xmlNodeSetPtr val)
1936 ret->nodesetval = val;
1944 return(xmlXPathWrapNodeSet(val));
1951 * @val: the xmlChar * value
1954 * Wraps the @val string into an XPath object.
1959 xmlXPathCacheWrapString(xmlXPathContextPtr ctxt, xmlChar *val)
1973 ret->stringval = val;
1989 ret->stringval = val;
1996 return(xmlXPathWrapString(val));
2002 * @val: the NodePtr value
2006 * it with the single Node @val
2011 xmlXPathCacheNewNodeSet(xmlXPathContextPtr ctxt, xmlNodePtr val)
2027 if (val) {
2029 (val->type == XML_NAMESPACE_DECL))
2031 xmlXPathNodeSetAddUnique(ret->nodesetval, val);
2033 ret->nodesetval->nodeTab[0] = val;
2054 ret->nodesetval = xmlXPathNodeSetCreate(val);
2061 return(xmlXPathNewNodeSet(val));
2067 * @val: the char * value
2070 * Acquire an xmlXPathObjectPtr of type string and of value @val
2075 xmlXPathCacheNewCString(xmlXPathContextPtr ctxt, const char *val)
2089 ret->stringval = xmlStrdup(BAD_CAST val);
2103 ret->stringval = xmlStrdup(BAD_CAST val);
2110 return(xmlXPathNewCString(val));
2116 * @val: the xmlChar * value
2119 * Acquire an xmlXPathObjectPtr of type string and of value @val
2124 xmlXPathCacheNewString(xmlXPathContextPtr ctxt, const xmlChar *val)
2137 if (val != NULL)
2138 ret->stringval = xmlStrdup(val);
2154 if (val != NULL)
2155 ret->stringval = xmlStrdup(val);
2164 return(xmlXPathNewString(val));
2170 * @val: the boolean value
2173 * Acquires an xmlXPathObjectPtr of type boolean and of value @val
2178 xmlXPathCacheNewBoolean(xmlXPathContextPtr ctxt, int val)
2191 ret->boolval = (val != 0);
2205 ret->boolval = (val != 0);
2212 return(xmlXPathNewBoolean(val));
2218 * @val: the double value
2221 * Acquires an xmlXPathObjectPtr of type double and of value @val
2226 xmlXPathCacheNewFloat(xmlXPathContextPtr ctxt, double val)
2239 ret->floatval = val;
2253 ret->floatval = val;
2260 return(xmlXPathNewFloat(val));
2266 * @val: an XPath object
2272 * (or the operation is done directly on @val)
2276 xmlXPathCacheConvertString(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
2279 if (val == NULL)
2282 switch (val->type) {
2290 res = xmlXPathCastNodeSetToString(val->nodesetval);
2293 return(val);
2295 res = xmlXPathCastBooleanToString(val->boolval);
2298 res = xmlXPathCastNumberToString(val->floatval);
2307 xmlXPathReleaseObject(ctxt, val);
2316 * @val: the original object
2324 xmlXPathCacheObjectCopy(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val)
2326 if (val == NULL)
2330 switch (val->type) {
2333 xmlXPathNodeSetMerge(NULL, val->nodesetval)));
2335 return(xmlXPathCacheNewString(ctxt, val->stringval));
2337 return(xmlXPathCacheNewBoolean(ctxt, val->boolval));
2339 return(xmlXPathCacheNewFloat(ctxt, val->floatval));
2344 return(xmlXPathObjectCopy(val));
2350 * @val: an XPath object
2356 * is done directly on @val)
2359 xmlXPathCacheConvertBoolean(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
2362 if (val == NULL)
2364 if (val->type == XPATH_BOOLEAN)
2365 return(val);
2366 ret = xmlXPathCacheNewBoolean(ctxt, xmlXPathCastToBoolean(val));
2367 xmlXPathReleaseObject(ctxt, val);
2374 * @val: an XPath object
2380 * is done directly on @val)
2383 xmlXPathCacheConvertNumber(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
2386 if (val == NULL)
2388 if (val->type == XPATH_NUMBER)
2389 return(val);
2390 ret = xmlXPathCacheNewFloat(ctxt, xmlXPathCastToNumber(val));
2391 xmlXPathReleaseObject(ctxt, val);
2668 #define SKIP(val) ctxt->cur += (val)
2669 #define NXT(val) ctxt->cur[(val)]
2704 * @buffer: output buffer
2705 * @buffersize: size of output buffer
3417 * @val: an initial xmlNodePtr, or NULL
3419 * Create a new xmlNodeSetPtr of type double and of value @val
3424 xmlXPathNodeSetCreate(xmlNodePtr val) {
3433 if (val != NULL) {
3444 if (val->type == XML_NAMESPACE_DECL) {
3445 xmlNsPtr ns = (xmlNsPtr) val;
3450 ret->nodeTab[ret->nodeNr++] = val;
3459 * Create a new xmlNodeSetPtr of type double and of value @val
3489 * @val: the node
3491 * checks whether @cur contains @val
3493 * Returns true (1) if @cur contains @val, false (0) otherwise
3496 xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val) {
3499 if ((cur == NULL) || (val == NULL)) return(0);
3500 if (val->type == XML_NAMESPACE_DECL) {
3505 ns1 = (xmlNsPtr) val;
3516 if (cur->nodeTab[i] == val)
3584 * @val: a new xmlNodePtr
3589 xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
3592 if ((cur == NULL) || (val == NULL)) return;
3595 if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
3604 if (cur->nodeTab[i] == val) return;
3631 if (val->type == XML_NAMESPACE_DECL) {
3632 xmlNsPtr ns = (xmlNsPtr) val;
3637 cur->nodeTab[cur->nodeNr++] = val;
3643 * @val: a new xmlNodePtr
3649 xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
3650 if ((cur == NULL) || (val == NULL)) return;
3653 if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
3683 if (val->type == XML_NAMESPACE_DECL) {
3684 xmlNsPtr ns = (xmlNsPtr) val;
3689 cur->nodeTab[cur->nodeNr++] = val;
4049 * @val: an xmlNodePtr
4054 xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val) {
4058 if (val == NULL) return;
4064 if (cur->nodeTab[i] == val) break;
4070 val->name);
4086 * @val: the index to remove
4091 xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val) {
4093 if (val >= cur->nodeNr) return;
4094 if ((cur->nodeTab[val] != NULL) &&
4095 (cur->nodeTab[val]->type == XML_NAMESPACE_DECL))
4096 xmlXPathNodeSetFreeNs((xmlNsPtr) cur->nodeTab[val]);
4098 for (;val < cur->nodeNr;val++)
4099 cur->nodeTab[val] = cur->nodeTab[val + 1];
4211 * @output: a FILE * for the output
4217 xmlGenericErrorContextNodeSet(FILE *output, xmlNodeSetPtr obj) {
4220 if (output == NULL) output = xmlGenericErrorContext;
4222 fprintf(output, "NodeSet == NULL !\n");
4226 fprintf(output, "NodeSet is empty\n");
4230 fprintf(output, " nodeTab == NULL !\n");
4235 fprintf(output, " NULL !\n");
4240 fprintf(output, " /");
4242 fprintf(output, " noname!");
4243 else fprintf(output, " %s", obj->nodeTab[i]->name);
4245 fprintf(output, "\n");
4251 * @val: the NodePtr value
4254 * it with the single Node @val
4259 xmlXPathNewNodeSet(xmlNodePtr val) {
4270 ret->nodesetval = xmlXPathNodeSetCreate(val);
4280 * @val: the NodePtr value
4283 * it with the tree root @val
4288 xmlXPathNewValueTree(xmlNodePtr val) {
4299 ret->user = (void *) val;
4300 ret->nodesetval = xmlXPathNodeSetCreate(val);
4309 * @val: an existing NodeSet
4312 * it with the Nodeset @val
4317 xmlXPathNewNodeSetList(xmlNodeSetPtr val)
4322 if (val == NULL)
4324 else if (val->nodeTab == NULL)
4327 ret = xmlXPathNewNodeSet(val->nodeTab[0]);
4328 for (i = 1; i < val->nodeNr; ++i)
4329 xmlXPathNodeSetAddUnique(ret->nodesetval, val->nodeTab[i]);
4337 * @val: the NodePtr value
4339 * Wrap the Nodeset @val in a new xmlXPathObjectPtr
4344 xmlXPathWrapNodeSet(xmlNodeSetPtr val) {
4354 ret->nodesetval = val;
5120 * @val: the double value
5122 * Create a new xmlXPathObjectPtr of type double and of value @val
5127 xmlXPathNewFloat(double val) {
5137 ret->floatval = val;
5146 * @val: the boolean value
5148 * Create a new xmlXPathObjectPtr of type boolean and of value @val
5153 xmlXPathNewBoolean(int val) {
5163 ret->boolval = (val != 0);
5172 * @val: the xmlChar * value
5174 * Create a new xmlXPathObjectPtr of type string and of value @val
5179 xmlXPathNewString(const xmlChar *val) {
5189 if (val != NULL)
5190 ret->stringval = xmlStrdup(val);
5201 * @val: the xmlChar * value
5203 * Wraps the @val string into an XPath object.
5208 xmlXPathWrapString (xmlChar *val) {
5218 ret->stringval = val;
5227 * @val: the char * value
5229 * Create a new xmlXPathObjectPtr of type string and of value @val
5234 xmlXPathNewCString(const char *val) {
5244 ret->stringval = xmlStrdup(BAD_CAST val);
5253 * @val: the char * value
5260 xmlXPathWrapCString (char * val) {
5261 return(xmlXPathWrapString((xmlChar *)(val)));
5266 * @val: the user data
5268 * Wraps the @val data into an XPath object.
5273 xmlXPathWrapExternal (void *val) {
5283 ret->user = val;
5292 * @val: the original object
5299 xmlXPathObjectCopy(xmlXPathObjectPtr val) {
5302 if (val == NULL)
5310 memcpy(ret, val , (size_t) sizeof(xmlXPathObject));
5312 xmlXPathDebugObjUsageRequested(NULL, val->type);
5314 switch (val->type) {
5321 ret->stringval = xmlStrdup(val->stringval);
5330 if ((val->nodesetval != NULL) &&
5331 (val->nodesetval->nodeTab != NULL)) {
5338 xmlStrdup(val->nodesetval->nodeTab[0]->name);
5342 cur = val->nodesetval->nodeTab[0]->children;
5357 ret->nodesetval = xmlXPathNodeSetMerge(NULL, val->nodesetval);
5364 xmlLocationSetPtr loc = val->user;
5370 ret->user = val->user;
5375 val->type);
5572 * @val: a boolean
5579 xmlXPathCastBooleanToString (int val) {
5581 if (val)
5590 * @val: a number
5597 xmlXPathCastNumberToString (double val) {
5599 switch (xmlXPathIsInf(val)) {
5607 if (xmlXPathIsNaN(val)) {
5609 } else if (val == 0 && xmlXPathGetSign(val) != 0) {
5614 xmlXPathFormatNumber(val, buf, 99);
5658 * @val: an XPath object
5666 xmlXPathCastToString(xmlXPathObjectPtr val) {
5669 if (val == NULL)
5671 switch (val->type) {
5680 ret = xmlXPathCastNodeSetToString(val->nodesetval);
5683 return(xmlStrdup(val->stringval));
5685 ret = xmlXPathCastBooleanToString(val->boolval);
5688 ret = xmlXPathCastNumberToString(val->floatval);
5704 * @val: an XPath object
5709 * is done directly on @val)
5712 xmlXPathConvertString(xmlXPathObjectPtr val) {
5715 if (val == NULL)
5718 switch (val->type) {
5726 res = xmlXPathCastNodeSetToString(val->nodesetval);
5729 return(val);
5731 res = xmlXPathCastBooleanToString(val->boolval);
5734 res = xmlXPathCastNumberToString(val->floatval);
5743 xmlXPathFreeObject(val);
5751 * @val: a boolean
5758 xmlXPathCastBooleanToNumber(int val) {
5759 if (val)
5766 * @val: a string
5773 xmlXPathCastStringToNumber(const xmlChar * val) {
5774 return(xmlXPathStringEvalNumber(val));
5824 * @val: an XPath object
5831 xmlXPathCastToNumber(xmlXPathObjectPtr val) {
5834 if (val == NULL)
5836 switch (val->type) {
5845 ret = xmlXPathCastNodeSetToNumber(val->nodesetval);
5848 ret = xmlXPathCastStringToNumber(val->stringval);
5851 ret = val->floatval;
5854 ret = xmlXPathCastBooleanToNumber(val->boolval);
5869 * @val: an XPath object
5874 * is done directly on @val)
5877 xmlXPathConvertNumber(xmlXPathObjectPtr val) {
5880 if (val == NULL)
5882 if (val->type == XPATH_NUMBER)
5883 return(val);
5884 ret = xmlXPathNewFloat(xmlXPathCastToNumber(val));
5885 xmlXPathFreeObject(val);
5891 * @val: a number
5898 xmlXPathCastNumberToBoolean (double val) {
5899 if (xmlXPathIsNaN(val) || (val == 0.0))
5906 * @val: a string
5913 xmlXPathCastStringToBoolean (const xmlChar *val) {
5914 if ((val == NULL) || (xmlStrlen(val) == 0))
5936 * @val: an XPath object
5943 xmlXPathCastToBoolean (xmlXPathObjectPtr val) {
5946 if (val == NULL)
5948 switch (val->type) {
5957 ret = xmlXPathCastNodeSetToBoolean(val->nodesetval);
5960 ret = xmlXPathCastStringToBoolean(val->stringval);
5963 ret = xmlXPathCastNumberToBoolean(val->floatval);
5966 ret = val->boolval;
5982 * @val: an XPath object
5987 * is done directly on @val)
5990 xmlXPathConvertBoolean(xmlXPathObjectPtr val) {
5993 if (val == NULL)
5995 if (val->type == XPATH_BOOLEAN)
5996 return(val);
5997 ret = xmlXPathNewBoolean(xmlXPathCastToBoolean(val));
5998 xmlXPathFreeObject(val);
6366 * @ns < @val (1, 1, ...
6367 * @ns <= @val (1, 0, ...
6368 * @ns > @val (0, 1, ...
6369 * @ns >= @val (0, 0, ...
6422 * @ns < @val (1, 1, ...
6423 * @ns <= @val (1, 0, ...
6424 * @ns > @val (0, 1, ...
6425 * @ns >= @val (0, 0, ...
6575 * @val: the value
6578 * @ns < @val (1, 1, ...
6579 * @ns <= @val (1, 0, ...
6580 * @ns > @val (0, 1, ...
6581 * @ns >= @val (0, 0, ...
6592 xmlXPathObjectPtr arg, xmlXPathObjectPtr val) {
6593 if ((val == NULL) || (arg == NULL) ||
6597 switch(val->type) {
6599 return(xmlXPathCompareNodeSetFloat(ctxt, inf, strict, arg, val));
6602 return(xmlXPathCompareNodeSets(inf, strict, arg, val));
6604 return(xmlXPathCompareNodeSetString(ctxt, inf, strict, arg, val));
6608 valuePush(ctxt, val);
6695 xmlXPathObjectPtr val;
6710 val = valuePop(ctxt);
6711 v = val->floatval;
6712 xmlXPathReleaseObject(ctxt->context, val);
7382 double val;
7387 val = xmlXPathCastToNumber(arg);
7391 ctxt->value->floatval += val;
7405 double val;
7410 val = xmlXPathCastToNumber(arg);
7414 ctxt->value->floatval -= val;
7428 double val;
7433 val = xmlXPathCastToNumber(arg);
7437 ctxt->value->floatval *= val;
7451 double val;
7456 val = xmlXPathCastToNumber(arg);
7460 if (xmlXPathIsNaN(val) || xmlXPathIsNaN(ctxt->value->floatval))
7462 else if (val == 0 && xmlXPathGetSign(val) != 0) {
7470 else if (val == 0) {
7478 ctxt->value->floatval /= val;
9435 xmlXPathObjectPtr val = NULL;
9444 val = valuePop(ctxt);
9445 lang = val->stringval;
9458 xmlXPathReleaseObject(ctxt->context, val);
9674 unsigned int val;
9706 val = (cur[0] & 0x7) << 18;
9707 val |= (cur[1] & 0x3f) << 12;
9708 val |= (cur[2] & 0x3f) << 6;
9709 val |= cur[3] & 0x3f;
9713 val = (cur[0] & 0xf) << 12;
9714 val |= (cur[1] & 0x3f) << 6;
9715 val |= cur[2] & 0x3f;
9720 val = (cur[0] & 0x1f) << 6;
9721 val |= cur[1] & 0x3f;
9723 if (!IS_CHAR(val)) {
9726 return(val);
13354 xmlXPathObjectPtr val;
13360 val = xmlXPathVariableLookup(ctxt->context, op->value4);
13361 if (val == NULL) {
13365 valuePush(ctxt, val);
13377 val = xmlXPathVariableLookupNS(ctxt->context,
13379 if (val == NULL) {
13383 valuePush(ctxt, val);
13502 xmlXPathObjectPtr val;
13504 val = comp->steps[op->ch2].value4;
13505 if ((val != NULL) && (val->type == XPATH_NUMBER) &&
13506 (val->floatval == 1.0)) {