18 #if !defined(XPATH_HEADER_GUARD_1357924680)
19 #define XPATH_HEADER_GUARD_1357924680
48 namespace XERCES_CPP_NAMESPACE
63 class XPathConstructionContext;
81 static const XalanDOMChar PSEUDONAME_ANY[];
82 static const XalanDOMChar PSEUDONAME_ROOT[];
83 static const XalanDOMChar PSEUDONAME_TEXT[];
84 static const XalanDOMChar PSEUDONAME_COMMENT[];
85 static const XalanDOMChar PSEUDONAME_PI[];
86 static const XalanDOMChar PSEUDONAME_OTHER[];
87 static const XalanDOMChar PSEUDONAME_NODE[];
106 m_priority(eMatchScoreNone),
112 const XalanDOMChar* theString,
116 m_priority(thePriority),
117 m_targetType(theTargetType)
141 const XalanDOMChar* m_string;
145 eTargetType m_targetType;
154 initialize(MemoryManager& theManager);
169 MemoryManager& theManager,
170 const Locator* theLocator = 0);
174 MemoryManager& theManager,
175 const Locator* theLocator = 0);
180 return m_expression.getMemoryManager();
191 m_expression.shrink();
236 double& result)
const;
271 MemberFunctionPtr
function)
const;
320 return execute(context, prefixResolver, executionContext);
345 execute(context, prefixResolver, executionContext, result);
363 double& result)
const
370 execute(context, prefixResolver, executionContext, result);
396 execute(context, prefixResolver, executionContext, result);
416 MemberFunctionPtr
function)
const
423 execute(context, prefixResolver, executionContext, formatterListener,
function);
459 return execute(context, prefixResolver, executionContext, result);
479 getInitialOpCodePosition(),
502 getInitialOpCodePosition(),
519 double& result)
const
526 getInitialOpCodePosition(),
551 getInitialOpCodePosition(),
570 MemberFunctionPtr
function)
const
577 getInitialOpCodePosition(),
613 getInitialOpCodePosition(),
642 getInitialOpCodePosition(),
671 getInitialOpCodePosition(),
690 double& result)
const
701 getInitialOpCodePosition(),
732 getInitialOpCodePosition(),
750 MemberFunctionPtr
function)
const
761 getInitialOpCodePosition(),
803 getInitialOpCodePosition(),
835 case eMatchScoreNone:
836 return DoubleSupport::getNegativeInfinity();
839 case eMatchScoreNodeTest:
843 case eMatchScoreNSWild:
847 case eMatchScoreOther:
851 case eMatchScoreQName:
900 return executeMore(context, opPos + 2, executionContext);
909 getTargetData(TargetDataVectorType& targetData)
const;
922 s_functions.InstallFunction(funcName,
934 const XalanDOMChar* funcName,
937 s_functions.InstallFunction(funcName,
950 return s_functions.UninstallFunction(funcName);
962 return s_functions.UninstallFunction(funcName);
974 return s_functions.isInstalledFunction(theFunctionName);
995 template<
class OutputIteratorType>
999 s_functions.getInstalledFunctionNames(theIterator);
1005 s_functions.DestroyTable();
1011 return m_inStylesheet;
1017 m_inStylesheet = fValue;
1029 m_locator = theLocator;
1051 const Locator* theLocator = 0,
1066 return (this->*m_testFunction)(context, nodeType);
1072 return (this->*m_testFunction2)(context);
1078 m_executionContext = theRHS.m_executionContext;
1079 m_targetNamespace = theRHS.m_targetNamespace;
1080 m_targetLocalName = theRHS.m_targetLocalName;
1081 m_testFunction = theRHS.m_testFunction;
1082 m_testFunction2 = theRHS.m_testFunction2;
1094 const Locator* theLocator);
1139 testAttributeNCName(
1149 testAttributeNamespaceOnly(
1154 testAttributeTotallyWild(
1169 testElementNamespaceOnly(
1174 testElementTotallyWild(
1185 testElementNamespaceOnly2(
const XalanElement& context)
const;
1188 testElementTotallyWild2(
const XalanElement& context)
const;
1191 testNamespaceNCName(
1196 testNamespaceTotallyWild(
1209 matchLocalName(
const XalanNode& context)
const;
1212 matchNamespaceURI(
const XalanNode& context)
const;
1215 matchLocalNameAndNamespaceURI(
const XalanNode& context)
const;
1218 matchNamespace(
const XalanNode& context)
const;
1221 shouldStripSourceNode(
const XalanText& context)
const;
1230 TestFunctionPtr m_testFunction;
1232 TestFunctionPtr2 m_testFunction2;
1266 bool& theResult)
const;
1281 double& theResult)
const;
1313 MemberFunctionPtr
function)
const;
1330 step(executionContext, context, opPos + 2, theResult);
1344 OpCodeMapPositionType opPos,
1358 OpCodeMapPositionType opPos,
1360 bool& theResult)
const;
1373 OpCodeMapPositionType opPos,
1375 double& theResult)
const;
1389 OpCodeMapPositionType opPos,
1405 OpCodeMapPositionType opPos,
1408 MemberFunctionPtr
function)
const;
1422 OpCodeMapPositionType opPos,
1436 eMatchScore& score)
const;
1448 OpCodeMapPositionType opPos,
1461 OpCodeMapPositionType opPos,
1474 OpCodeMapPositionType opPos,
1487 OpCodeMapPositionType opPos,
1500 OpCodeMapPositionType opPos,
1513 OpCodeMapPositionType opPos,
1526 OpCodeMapPositionType opPos,
1539 OpCodeMapPositionType opPos,
1552 OpCodeMapPositionType opPos,
1566 OpCodeMapPositionType opPos,
1569 MemberFunctionPtr
function)
const;
1581 OpCodeMapPositionType opPos,
1595 OpCodeMapPositionType opPos,
1598 MemberFunctionPtr
function)
const;
1610 OpCodeMapPositionType opPos,
1624 OpCodeMapPositionType opPos,
1627 MemberFunctionPtr
function)
const;
1639 OpCodeMapPositionType opPos,
1653 OpCodeMapPositionType opPos,
1656 MemberFunctionPtr
function)
const;
1668 OpCodeMapPositionType opPos,
1682 OpCodeMapPositionType opPos,
1685 MemberFunctionPtr
function)
const;
1697 OpCodeMapPositionType opPos,
1711 OpCodeMapPositionType opPos,
1714 MemberFunctionPtr
function)
const;
1726 OpCodeMapPositionType opPos,
1740 OpCodeMapPositionType opPos,
1742 bool& result)
const;
1755 OpCodeMapPositionType opPos,
1757 double& result)
const;
1770 OpCodeMapPositionType opPos,
1786 OpCodeMapPositionType opPos,
1789 MemberFunctionPtr
function)
const;
1801 OpCodeMapPositionType opPos,
1813 OpCodeMapPositionType opPos,
1824 OpCodeMapPositionType opPos,
1825 bool& theResult)
const;
1835 OpCodeMapPositionType opPos,
1836 double& theResult)
const;
1847 OpCodeMapPositionType opPos,
1858 OpCodeMapPositionType opPos,
1860 MemberFunctionPtr
function)
const;
1870 OpCodeMapPositionType opPos,
1886 return executeMore(context, opPos + 2, executionContext);
1901 bool& theResult)
const
1903 executeMore(context, opPos + 2, executionContext, theResult);
1918 double& theResult)
const
1920 executeMore(context, opPos + 2, executionContext, theResult);
1937 executeMore(context, opPos + 2, executionContext, theResult);
1955 MemberFunctionPtr
function)
const
1985 if (theValue.
null() ==
false)
2001 numberlit(OpCodeMapPositionType opPos)
const;
2010 OpCodeMapPositionType opPos,
2021 OpCodeMapPositionType opPos,
2022 bool& theResult)
const;
2033 OpCodeMapPositionType opPos,
2045 OpCodeMapPositionType opPos,
2047 MemberFunctionPtr
function)
const;
2059 OpCodeMapPositionType opPos,
2097 OpCodeMapPositionType opPos,
2115 return s_functions[funcID].execute(executionContext, context, argVec, m_locator);
2130 assert(context != 0);
2134 assert(
static_cast<double>(theResult) == theResult);
2136 return static_cast<double>(theResult);
2150 assert(
static_cast<double>(theResult) == theResult);
2152 return static_cast<double>(theResult);
2166 OpCodeMapPositionType opPos,
2183 assert(context != 0);
2185 return !functionBoolean(context, opPos, executionContext);
2202 assert(context != 0);
2206 executeMore(context, opPos + 2, executionContext, result);
2220 assert(context != 0);
2222 return DOMServices::getNameOfNode(*context);
2236 OpCodeMapPositionType opPos,
2246 functionLocalName(
XalanNode* context)
const;
2259 OpCodeMapPositionType opPos,
2274 assert(context != 0);
2276 return XObject::number(executionContext, *context);
2295 executeMore(context, opPos + 2, executionContext, result);
2314 return DoubleSupport::floor(functionNumber(context, opPos, executionContext));
2331 return DoubleSupport::ceiling(functionNumber(context, opPos, executionContext));
2348 return DoubleSupport::round(functionNumber(context, opPos, executionContext));
2359 functionStringLength(
2372 functionStringLength(
2374 OpCodeMapPositionType opPos,
2388 OpCodeMapPositionType opPos,
2401 OpCodeMapPositionType opPos,
2410 operator=(
const XPath&);
2418 eDefaultTargetDataSize = 5
2421 OpCodeMapPositionType
2422 getInitialOpCodePosition()
const
2424 #if defined(XALAN_XPATH_EXPRESSION_USE_ITERATORS)
2425 assert(m_expression.getOpCodeMapValue(0) == XPathExpression::eOP_XPATH);
2427 assert(m_expression.getOpCodeMapValue(
2428 m_expression.getInitialOpCodePosition()) == XPathExpression::eOP_XPATH);
2430 return m_expression.getInitialOpCodePosition() + 2;
2434 locationPathPattern(
2435 XPathExecutionContext& executionContext,
2437 OpCodeMapPositionType opPos)
const;
2451 XPathExecutionContext& executionContext,
2453 OpCodeMapPositionType opPos,
2454 MutableNodeRefList& queryResults)
const;
2468 XPathExecutionContext& executionContext,
2470 OpCodeMapPositionType opPos,
2471 OpCodeMapPositionType startOpPos,
2472 eMatchScore score)
const;
2486 XPathExecutionContext& executionContext,
2488 OpCodeMapPositionType opPos,
2489 eMatchScore& scoreHolder)
const;
2491 OpCodeMapPositionType
2493 XPathExecutionContext& executionContext,
2495 OpCodeMapPositionType opPos,
2496 OpCodeMapValueType stepType,
2497 MutableNodeRefList& subQueryResults)
const;
2499 OpCodeMapPositionType
2501 XPathExecutionContext& executionContext,
2503 OpCodeMapPositionType opPos,
2504 OpCodeMapValueType stepType,
2505 MutableNodeRefList& subQueryResults)
const;
2507 OpCodeMapPositionType
2509 XPathExecutionContext& executionContext,
2511 OpCodeMapPositionType opPos,
2512 OpCodeMapValueType stepType,
2513 MutableNodeRefList& subQueryResults)
const;
2515 OpCodeMapPositionType
2517 XPathExecutionContext& executionContext,
2519 OpCodeMapPositionType opPos,
2520 OpCodeMapValueType stepType,
2521 MutableNodeRefList& subQueryResults)
const;
2523 OpCodeMapPositionType
2525 XPathExecutionContext& executionContext,
2527 OpCodeMapPositionType opPos,
2528 OpCodeMapValueType stepType,
2529 MutableNodeRefList& subQueryResults)
const;
2531 OpCodeMapPositionType
2532 findAncestorsOrSelf(
2533 XPathExecutionContext& executionContext,
2535 OpCodeMapPositionType opPos,
2536 OpCodeMapValueType stepType,
2537 MutableNodeRefList& subQueryResults)
const;
2539 OpCodeMapPositionType
2541 XPathExecutionContext& executionContext,
2543 OpCodeMapPositionType opPos,
2544 OpCodeMapValueType stepType,
2545 MutableNodeRefList& subQueryResults)
const;
2547 OpCodeMapPositionType
2549 XPathExecutionContext& executionContext,
2551 OpCodeMapPositionType opPos,
2552 OpCodeMapValueType stepType,
2553 MutableNodeRefList& subQueryResults)
const;
2555 OpCodeMapPositionType
2557 XPathExecutionContext& executionContext,
2559 OpCodeMapPositionType opPos,
2560 OpCodeMapValueType stepType,
2561 MutableNodeRefList& subQueryResults)
const;
2563 OpCodeMapPositionType
2565 XPathExecutionContext& executionContext,
2567 OpCodeMapPositionType opPos,
2568 OpCodeMapValueType stepType,
2569 MutableNodeRefList& subQueryResults)
const;
2571 OpCodeMapPositionType
2572 findFollowingSiblings(
2573 XPathExecutionContext& executionContext,
2575 OpCodeMapPositionType opPos,
2576 OpCodeMapValueType stepType,
2577 MutableNodeRefList& subQueryResults)
const;
2579 OpCodeMapPositionType
2581 XPathExecutionContext& executionContext,
2583 OpCodeMapPositionType opPos,
2584 OpCodeMapValueType stepType,
2585 MutableNodeRefList& subQueryResults)
const;
2587 OpCodeMapPositionType
2588 findPreceedingSiblings(
2589 XPathExecutionContext& executionContext,
2591 OpCodeMapPositionType opPos,
2592 OpCodeMapValueType stepType,
2593 MutableNodeRefList& subQueryResults)
const;
2595 OpCodeMapPositionType
2597 XPathExecutionContext& executionContext,
2599 OpCodeMapPositionType opPos,
2600 OpCodeMapValueType stepType,
2601 MutableNodeRefList& subQueryResults)
const;
2603 OpCodeMapPositionType
2604 findNodesOnUnknownAxis(
2605 XPathExecutionContext& executionContext,
2607 OpCodeMapPositionType opPos,
2608 OpCodeMapValueType stepType,
2609 MutableNodeRefList& subQueryResults)
const;
2611 OpCodeMapPositionType
2613 XPathExecutionContext& executionContext,
2614 OpCodeMapPositionType opPos,
2615 MutableNodeRefList& subQueryResults)
const;
2619 XPathExecutionContext& executionContext,
2620 XalanNode* localContext,
2621 OpCodeMapPositionType startOpPos)
const;
2624 handleFoundIndexPositional(
2625 XPathExecutionContext& executionContext,
2626 XalanNode* localContext,
2627 OpCodeMapPositionType startOpPos)
const;
2634 XPathExecutionContext& executionContext,
2635 OpCodeMapPositionType opPos)
const;
2640 XPathExecutionContext& executionContext)
const;
2649 XPathExpression m_expression;
2654 const Locator* m_locator;
2661 bool m_inStylesheet;
2668 static FunctionTableType s_functions;
2670 static const XalanDOMString s_emptyString;
2679 #endif // XPATH_HEADER_GUARD_1357924680