15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Summary: interface for the XSLT functions not from XPath 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Description: a set of extra functions coming from XSLT but not in XPath 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Copy: See Copyright for the status of this software. 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Author: Daniel Veillard and Bjorn Reese <breese@users.sourceforge.net> 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */ 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef __XML_XSLT_FUNCTIONS_H__ 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define __XML_XSLT_FUNCTIONS_H__ 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <libxml/xpath.h> 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <libxml/xpathInternals.h> 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "xsltexports.h" 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "xsltInternals.h" 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef __cplusplus 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)extern "C" { 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/** 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * XSLT_REGISTER_FUNCTION_LOOKUP: 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Registering macro, not general purpose at all but used in different modules. 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */ 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \ 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \ 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) (xmlXPathFuncLookupFunc) xsltXPathFunctionLookup, \ 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) (void *)(ctxt->xpathCtxt)); 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN xmlXPathFunction XSLTCALL 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltXPathFunctionLookup (xmlXPathContextPtr ctxt, 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const xmlChar *name, 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const xmlChar *ns_uri); 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Interfaces for the functions implementations. 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */ 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltDocumentFunction (xmlXPathParserContextPtr ctxt, 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltKeyFunction (xmlXPathParserContextPtr ctxt, 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt, 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt, 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt, 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt, 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt, 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt, 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int nargs); 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * And the registration 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */ 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)XSLTPUBFUN void XSLTCALL 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) xsltRegisterAllFunctions (xmlXPathContextPtr ctxt); 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef __cplusplus 745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif /* __XML_XSLT_FUNCTIONS_H__ */ 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 79