16 #if !defined(XPATH_HEADER_GUARD_1357924680)
17 #define XPATH_HEADER_GUARD_1357924680
46 XALAN_DECLARE_XERCES_CLASS(Locator)
50 XALAN_CPP_NAMESPACE_BEGIN
76 static const XalanDOMChar PSEUDONAME_ANY[];
77 static const XalanDOMChar PSEUDONAME_ROOT[];
78 static const XalanDOMChar PSEUDONAME_TEXT[];
79 static const XalanDOMChar PSEUDONAME_COMMENT[];
80 static const XalanDOMChar PSEUDONAME_PI[];
81 static const XalanDOMChar PSEUDONAME_OTHER[];
82 static const XalanDOMChar PSEUDONAME_NODE[];
101 m_priority(eMatchScoreNone),
107 const XalanDOMChar* theString,
111 m_priority(thePriority),
112 m_targetType(theTargetType)
136 const XalanDOMChar* m_string;
140 eTargetType m_targetType;
171 return m_expression.getMemoryManager();
181 m_expression.shrink();
195 const PrefixResolver& prefixResolver,
209 const PrefixResolver& prefixResolver,
224 const PrefixResolver& prefixResolver,
226 double& result)
const;
240 const PrefixResolver& prefixResolver,
258 const PrefixResolver& prefixResolver,
261 MemberFunctionPtr
function)
const;
285 const PrefixResolver& prefixResolver,
301 const PrefixResolver& prefixResolver,
310 return execute(context, prefixResolver, executionContext);
325 const PrefixResolver& prefixResolver,
335 execute(context, prefixResolver, executionContext, result);
350 const PrefixResolver& prefixResolver,
353 double& result)
const
360 execute(context, prefixResolver, executionContext, result);
376 const PrefixResolver& prefixResolver,
386 execute(context, prefixResolver, executionContext, result);
402 const PrefixResolver& prefixResolver,
406 MemberFunctionPtr
function)
const
413 execute(context, prefixResolver, executionContext, formatterListener,
function);
439 const PrefixResolver& prefixResolver,
449 return execute(context, prefixResolver, executionContext, result);
469 getInitialOpCodePosition(),
492 getInitialOpCodePosition(),
509 double& result)
const
516 getInitialOpCodePosition(),
541 getInitialOpCodePosition(),
560 MemberFunctionPtr
function)
const
567 getInitialOpCodePosition(),
603 getInitialOpCodePosition(),
620 const PrefixResolver& prefixResolver,
626 const PrefixResolverSetAndRestore theResolverSetAndRestore(
632 getInitialOpCodePosition(),
648 const PrefixResolver& prefixResolver,
655 const PrefixResolverSetAndRestore theResolverSetAndRestore(
661 getInitialOpCodePosition(),
678 const PrefixResolver& prefixResolver,
680 double& result)
const
685 const PrefixResolverSetAndRestore theResolverSetAndRestore(
691 getInitialOpCodePosition(),
709 const PrefixResolver& prefixResolver,
716 const PrefixResolverSetAndRestore theResolverSetAndRestore(
722 getInitialOpCodePosition(),
737 const PrefixResolver& prefixResolver,
740 MemberFunctionPtr
function)
const
745 const PrefixResolverSetAndRestore theResolverSetAndRestore(
751 getInitialOpCodePosition(),
780 const PrefixResolver& prefixResolver,
787 const PrefixResolverSetAndRestore theResolverSetAndRestore(
793 getInitialOpCodePosition(),
825 case eMatchScoreNone:
829 case eMatchScoreNodeTest:
833 case eMatchScoreNSWild:
837 case eMatchScoreOther:
841 case eMatchScoreQName:
873 const PrefixResolver& resolver,
887 OpCodeMapPositionType opPos,
890 return executeMore(context, opPos + 2, executionContext);
899 getTargetData(TargetDataVectorType& targetData)
const;
912 s_functions.InstallFunction(funcName,
924 const XalanDOMChar* funcName,
927 s_functions.InstallFunction(funcName,
940 return s_functions.UninstallFunction(funcName);
952 return s_functions.UninstallFunction(funcName);
964 return s_functions.isInstalledFunction(theFunctionName);
974 static const FunctionTableType&
980 #if defined(XALAN_NO_MEMBER_TEMPLATES)
981 typedef XPathFunctionTable::InstalledFunctionNameVectorType
982 InstalledFunctionNameVectorType;
990 getInstalledFunctionNames(InstalledFunctionNameVectorType& theVector)
1000 template<
class OutputIteratorType>
1004 s_functions.getInstalledFunctionNames(theIterator);
1011 s_functions.DestroyTable();
1017 return m_inStylesheet;
1023 m_inStylesheet = fValue;
1035 m_locator = theLocator;
1049 OpCodeMapPositionType opPos,
1050 OpCodeMapValueType argLen,
1051 OpCodeMapValueType stepType);
1054 XPathConstructionContext& theContext,
1056 const PrefixResolver& thePrefixResolver,
1057 const LocatorType* theLocator = 0,
1067 const XalanNode& context,
1072 return (this->*m_testFunction)(context, nodeType);
1078 return (this->*m_testFunction2)(context);
1084 m_executionContext = theRHS.m_executionContext;
1085 m_targetNamespace = theRHS.m_targetNamespace;
1086 m_targetLocalName = theRHS.m_targetLocalName;
1087 m_testFunction = theRHS.m_testFunction;
1088 m_testFunction2 = theRHS.m_testFunction2;
1097 XPathConstructionContext& theConstructionContext,
1099 const PrefixResolver& thePrefixResolver,
1100 const LocatorType* theLocator);
1116 const XalanNode& context,
1121 const XalanNode& context,
1126 const XalanNode& context,
1131 const XalanNode& context,
1136 const XalanNode& context,
1141 const XalanNode& context,
1145 testAttributeNCName(
1146 const XalanNode& context,
1151 const XalanNode& context,
1155 testAttributeNamespaceOnly(
1156 const XalanNode& context,
1160 testAttributeTotallyWild(
1161 const XalanNode& context,
1166 const XalanNode& context,
1171 const XalanNode& context,
1175 testElementNamespaceOnly(
1176 const XalanNode& context,
1180 testElementTotallyWild(
1181 const XalanNode& context,
1185 testElementNCName2(
const XalanElement& context)
const;
1188 testElementQName2(
const XalanElement& context)
const;
1191 testElementNamespaceOnly2(
const XalanElement& context)
const;
1194 testElementTotallyWild2(
const XalanElement& context)
const;
1197 testNamespaceNCName(
1198 const XalanNode& context,
1202 testNamespaceTotallyWild(
1203 const XalanNode& context,
1208 const XalanNode& context,
1212 testDefault2(
const XalanElement& context)
const;
1215 matchLocalName(
const XalanNode& context)
const;
1218 matchNamespaceURI(
const XalanNode& context)
const;
1221 matchLocalNameAndNamespaceURI(
const XalanNode& context)
const;
1224 matchNamespace(
const XalanNode& context)
const;
1227 shouldStripSourceNode(
const XalanText& context)
const;
1236 TestFunctionPtr m_testFunction;
1238 TestFunctionPtr2 m_testFunction2;
1256 OpCodeMapPositionType opPos,
1270 OpCodeMapPositionType opPos,
1272 bool& theResult)
const;
1285 OpCodeMapPositionType opPos,
1287 double& theResult)
const;
1300 OpCodeMapPositionType opPos,
1316 OpCodeMapPositionType opPos,
1319 MemberFunctionPtr
function)
const;
1332 OpCodeMapPositionType opPos,
1336 step(executionContext, context, opPos + 2, theResult);
1350 OpCodeMapPositionType opPos,
1364 OpCodeMapPositionType opPos,
1366 bool& theResult)
const;
1379 OpCodeMapPositionType opPos,
1381 double& theResult)
const;
1395 OpCodeMapPositionType opPos,
1411 OpCodeMapPositionType opPos,
1414 MemberFunctionPtr
function)
const;
1428 OpCodeMapPositionType opPos,
1442 eMatchScore& score)
const;
1454 OpCodeMapPositionType opPos,
1467 OpCodeMapPositionType opPos,
1480 OpCodeMapPositionType opPos,
1493 OpCodeMapPositionType opPos,
1506 OpCodeMapPositionType opPos,
1519 OpCodeMapPositionType opPos,
1532 OpCodeMapPositionType opPos,
1545 OpCodeMapPositionType opPos,
1558 OpCodeMapPositionType opPos,
1572 OpCodeMapPositionType opPos,
1575 MemberFunctionPtr
function)
const;
1587 OpCodeMapPositionType opPos,
1601 OpCodeMapPositionType opPos,
1604 MemberFunctionPtr
function)
const;
1616 OpCodeMapPositionType opPos,
1630 OpCodeMapPositionType opPos,
1633 MemberFunctionPtr
function)
const;
1645 OpCodeMapPositionType opPos,
1659 OpCodeMapPositionType opPos,
1662 MemberFunctionPtr
function)
const;
1674 OpCodeMapPositionType opPos,
1688 OpCodeMapPositionType opPos,
1691 MemberFunctionPtr
function)
const;
1703 OpCodeMapPositionType opPos,
1717 OpCodeMapPositionType opPos,
1720 MemberFunctionPtr
function)
const;
1732 OpCodeMapPositionType opPos,
1746 OpCodeMapPositionType opPos,
1748 bool& result)
const;
1761 OpCodeMapPositionType opPos,
1763 double& result)
const;
1776 OpCodeMapPositionType opPos,
1792 OpCodeMapPositionType opPos,
1795 MemberFunctionPtr
function)
const;
1807 OpCodeMapPositionType opPos,
1819 OpCodeMapPositionType opPos,
1830 OpCodeMapPositionType opPos,
1831 bool& theResult)
const;
1841 OpCodeMapPositionType opPos,
1842 double& theResult)
const;
1853 OpCodeMapPositionType opPos,
1864 OpCodeMapPositionType opPos,
1866 MemberFunctionPtr
function)
const;
1876 OpCodeMapPositionType opPos,
1889 OpCodeMapPositionType opPos,
1892 return executeMore(context, opPos + 2, executionContext);
1905 OpCodeMapPositionType opPos,
1907 bool& theResult)
const
1909 executeMore(context, opPos + 2, executionContext, theResult);
1922 OpCodeMapPositionType opPos,
1924 double& theResult)
const
1926 executeMore(context, opPos + 2, executionContext, theResult);
1939 OpCodeMapPositionType opPos,
1943 executeMore(context, opPos + 2, executionContext, theResult);
1958 OpCodeMapPositionType opPos,
1961 MemberFunctionPtr
function)
const
1963 executeMore(context, opPos + 2, executionContext, formatterListener,
function);
1976 OpCodeMapPositionType opPos,
1980 executeMore(context, opPos + 2, executionContext, theResult);
1989 numberlit(OpCodeMapPositionType opPos)
const;
1998 OpCodeMapPositionType opPos,
2009 OpCodeMapPositionType opPos,
2010 bool& theResult)
const;
2021 OpCodeMapPositionType opPos,
2033 OpCodeMapPositionType opPos,
2035 MemberFunctionPtr
function)
const;
2047 OpCodeMapPositionType opPos,
2062 OpCodeMapPositionType ,
2085 OpCodeMapPositionType opPos,
2099 OpCodeMapValueType funcID,
2103 return s_functions[funcID].execute(executionContext, context, argVec, m_locator);
2118 assert(context != 0);
2146 OpCodeMapPositionType opPos,
2160 OpCodeMapPositionType opPos,
2163 assert(context != 0);
2165 return !functionBoolean(context, opPos, executionContext);
2179 OpCodeMapPositionType opPos,
2182 assert(context != 0);
2186 executeMore(context, opPos + 2, executionContext, result);
2200 assert(context != 0);
2216 OpCodeMapPositionType opPos,
2226 functionLocalName(XalanNode* context)
const;
2239 OpCodeMapPositionType opPos,
2254 assert(context != 0);
2270 OpCodeMapPositionType opPos,
2275 executeMore(context, opPos + 2, executionContext, result);
2291 OpCodeMapPositionType opPos,
2308 OpCodeMapPositionType opPos,
2325 OpCodeMapPositionType opPos,
2338 functionStringLength(XalanNode* context)
const;
2349 functionStringLength(
2351 OpCodeMapPositionType opPos,
2365 OpCodeMapPositionType opPos,
2378 OpCodeMapPositionType opPos,
2384 XPath(
const XPath&);
2387 operator=(
const XPath&);
2395 eDefaultTargetDataSize = 5
2398 OpCodeMapPositionType
2399 getInitialOpCodePosition()
const
2401 #if defined(XALAN_XPATH_EXPRESSION_USE_ITERATORS)
2404 assert(m_expression.getOpCodeMapValue(
2407 return m_expression.getInitialOpCodePosition() + 2;
2411 locationPathPattern(
2414 OpCodeMapPositionType opPos)
const;
2422 OpCodeMapPositionType opPos,
2439 OpCodeMapPositionType opPos,
2440 eMatchScore& scoreHolder)
const;
2442 OpCodeMapPositionType
2446 OpCodeMapPositionType opPos,
2447 OpCodeMapValueType stepType,
2450 OpCodeMapPositionType
2454 OpCodeMapPositionType opPos,
2455 OpCodeMapValueType stepType,
2458 OpCodeMapPositionType
2462 OpCodeMapPositionType opPos,
2463 OpCodeMapValueType stepType,
2466 OpCodeMapPositionType
2470 OpCodeMapPositionType opPos,
2471 OpCodeMapValueType stepType,
2474 OpCodeMapPositionType
2478 OpCodeMapPositionType opPos,
2479 OpCodeMapValueType stepType,
2482 OpCodeMapPositionType
2483 findAncestorsOrSelf(
2486 OpCodeMapPositionType opPos,
2487 OpCodeMapValueType stepType,
2490 OpCodeMapPositionType
2494 OpCodeMapPositionType opPos,
2495 OpCodeMapValueType stepType,
2498 OpCodeMapPositionType
2502 OpCodeMapPositionType opPos,
2503 OpCodeMapValueType stepType,
2506 OpCodeMapPositionType
2510 OpCodeMapPositionType opPos,
2511 OpCodeMapValueType stepType,
2514 OpCodeMapPositionType
2518 OpCodeMapPositionType opPos,
2519 OpCodeMapValueType stepType,
2522 OpCodeMapPositionType
2523 findFollowingSiblings(
2526 OpCodeMapPositionType opPos,
2527 OpCodeMapValueType stepType,
2530 OpCodeMapPositionType
2534 OpCodeMapPositionType opPos,
2535 OpCodeMapValueType stepType,
2538 OpCodeMapPositionType
2539 findPreceedingSiblings(
2542 OpCodeMapPositionType opPos,
2543 OpCodeMapValueType stepType,
2546 OpCodeMapPositionType
2550 OpCodeMapPositionType opPos,
2551 OpCodeMapValueType stepType,
2554 OpCodeMapPositionType
2555 findNodesOnUnknownAxis(
2558 OpCodeMapPositionType opPos,
2559 OpCodeMapValueType stepType,
2562 #if !defined(NDEBUG)
2568 OpCodeMapPositionType opPos,
2569 OpCodeMapValueType argLen,
2570 OpCodeMapValueType stepType)
const;
2573 OpCodeMapPositionType
2576 OpCodeMapPositionType opPos,
2582 XalanNode* localContext,
2583 OpCodeMapPositionType startOpPos)
const;
2586 handleFoundIndexPositional(
2588 XalanNode* localContext,
2589 OpCodeMapPositionType startOpPos)
const;
2597 OpCodeMapPositionType opPos)
const;
2616 const LocatorType* m_locator;
2623 bool m_inStylesheet;
2630 static FunctionTableType s_functions;
2637 XALAN_CPP_NAMESPACE_END
2641 #endif // XPATH_HEADER_GUARD_1357924680