1*2d785d7eSAndrew Rist /************************************************************** 2*2d785d7eSAndrew Rist * 3*2d785d7eSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2d785d7eSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2d785d7eSAndrew Rist * distributed with this work for additional information 6*2d785d7eSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2d785d7eSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2d785d7eSAndrew Rist * "License"); you may not use this file except in compliance 9*2d785d7eSAndrew Rist * with the License. You may obtain a copy of the License at 10*2d785d7eSAndrew Rist * 11*2d785d7eSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*2d785d7eSAndrew Rist * 13*2d785d7eSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2d785d7eSAndrew Rist * software distributed under the License is distributed on an 15*2d785d7eSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2d785d7eSAndrew Rist * KIND, either express or implied. See the License for the 17*2d785d7eSAndrew Rist * specific language governing permissions and limitations 18*2d785d7eSAndrew Rist * under the License. 19*2d785d7eSAndrew Rist * 20*2d785d7eSAndrew Rist *************************************************************/ 21*2d785d7eSAndrew Rist 22cdf0e10cSrcweir 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <libxml/tree.h> 25cdf0e10cSrcweir #include <libxml/xpath.h> 26cdf0e10cSrcweir #include <libxml/xpathInternals.h> 27cdf0e10cSrcweir 28cdf0e10cSrcweir /* 29cdf0e10cSrcweir entry functions for libxml xpath engine 30cdf0e10cSrcweir 31cdf0e10cSrcweir */ 32cdf0e10cSrcweir 33cdf0e10cSrcweir /** 34cdf0e10cSrcweir * xmlXPathParserContext: 35cdf0e10cSrcweir * 36cdf0e10cSrcweir * An XPath parser context. It contains pure parsing informations, 37cdf0e10cSrcweir * an xmlXPathContext, and the stack of objects. 38cdf0e10cSrcweir */ 39cdf0e10cSrcweir #if 0 40cdf0e10cSrcweir // for reference from xpath.h 41cdf0e10cSrcweir struct _xmlXPathParserContext { 42cdf0e10cSrcweir const xmlChar *cur; /* the current char being parsed */ 43cdf0e10cSrcweir const xmlChar *base; /* the full expression */ 44cdf0e10cSrcweir 45cdf0e10cSrcweir int error; /* error code */ 46cdf0e10cSrcweir 47cdf0e10cSrcweir xmlXPathContextPtr context; /* the evaluation context */ 48cdf0e10cSrcweir xmlXPathObjectPtr value; /* the current value */ 49cdf0e10cSrcweir int valueNr; /* number of values stacked */ 50cdf0e10cSrcweir int valueMax; /* max number of values stacked */ 51cdf0e10cSrcweir xmlXPathObjectPtr *valueTab; /* stack of values */ 52cdf0e10cSrcweir 53cdf0e10cSrcweir xmlXPathCompExprPtr comp; /* the precompiled expression */ 54cdf0e10cSrcweir int xptr; /* it this an XPointer expression */ 55cdf0e10cSrcweir xmlNodePtr ancestor; /* used for walking preceding axis */ 56cdf0e10cSrcweir }; 57cdf0e10cSrcweir 58cdf0e10cSrcweir #endif 59cdf0e10cSrcweir 60cdf0e10cSrcweir extern "C" 61cdf0e10cSrcweir { 62cdf0e10cSrcweir 63cdf0e10cSrcweir // XForms 64cdf0e10cSrcweir /* 65cdf0e10cSrcweir void xforms_getInstanceDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs); 66cdf0e10cSrcweir void xforms_rebuildFunction(xmlXPathParserContextPtr ctxt, int nargs); 67cdf0e10cSrcweir void xforms_recalculateFunction(xmlXPathParserContextPtr ctxt, int nargs); 68cdf0e10cSrcweir void xforms_revalidateFunction(xmlXPathParserContextPtr ctxt, int nargs); 69cdf0e10cSrcweir void xforms_refreshFunction(xmlXPathParserContextPtr ctxt, int nargs); 70cdf0e10cSrcweir */ 71cdf0e10cSrcweir 72cdf0e10cSrcweir // XForms Core Functions 73cdf0e10cSrcweir // boolean functions 74cdf0e10cSrcweir void xforms_booleanFromStringFunction(xmlXPathParserContextPtr ctxt, int nargs); 75cdf0e10cSrcweir void xforms_ifFunction(xmlXPathParserContextPtr ctxt, int nargs); 76cdf0e10cSrcweir 77cdf0e10cSrcweir // Number Functions 78cdf0e10cSrcweir void xforms_avgFunction(xmlXPathParserContextPtr ctxt, int nargs); 79cdf0e10cSrcweir void xforms_minFunction(xmlXPathParserContextPtr ctxt, int nargs); 80cdf0e10cSrcweir void xforms_maxFunction(xmlXPathParserContextPtr ctxt, int nargs); 81cdf0e10cSrcweir void xforms_countNonEmptyFunction(xmlXPathParserContextPtr ctxt, int nargs); 82cdf0e10cSrcweir void xforms_indexFunction(xmlXPathParserContextPtr ctxt, int nargs); 83cdf0e10cSrcweir 84cdf0e10cSrcweir // String Functions 85cdf0e10cSrcweir void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs); 86cdf0e10cSrcweir void xforms_versionFunction(xmlXPathParserContextPtr ctxt, int nargs); 87cdf0e10cSrcweir 88cdf0e10cSrcweir // Date and Time Functions 89cdf0e10cSrcweir void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int nargs); 90cdf0e10cSrcweir void xforms_daysFromDateFunction(xmlXPathParserContextPtr ctxt, int nargs); 91cdf0e10cSrcweir void xforms_secondsFromDateTimeFunction(xmlXPathParserContextPtr ctxt, int nargs); 92cdf0e10cSrcweir void xforms_secondsFuction(xmlXPathParserContextPtr ctxt, int nargs); 93cdf0e10cSrcweir void xforms_monthsFuction(xmlXPathParserContextPtr ctxt, int nargs); 94cdf0e10cSrcweir 95cdf0e10cSrcweir // Node-set Functions 96cdf0e10cSrcweir void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // Node-set Functions; XForms 1.1 99cdf0e10cSrcweir void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs); 100cdf0e10cSrcweir 101cdf0e10cSrcweir // --- lookup --- 102cdf0e10cSrcweir xmlXPathFunction xforms_lookupFunc(void *ctxt, const xmlChar *name, const xmlChar *ns_uri); 103cdf0e10cSrcweir 104cdf0e10cSrcweir } 105