functions.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Summary: interface for the XSLT functions not from XPath
  3. * Description: a set of extra functions coming from XSLT but not in XPath
  4. *
  5. * Copy: See Copyright for the status of this software.
  6. *
  7. * Author: Daniel Veillard and Bjorn Reese <breese@users.sourceforge.net>
  8. */
  9. #ifndef __XML_XSLT_FUNCTIONS_H__
  10. #define __XML_XSLT_FUNCTIONS_H__
  11. #include <libxml/xpath.h>
  12. #include <libxml/xpathInternals.h>
  13. #include "xsltexports.h"
  14. #include "xsltInternals.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * XSLT_REGISTER_FUNCTION_LOOKUP:
  20. *
  21. * Registering macro, not general purpose at all but used in different modules.
  22. */
  23. #define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \
  24. xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \
  25. xsltXPathFunctionLookup, \
  26. (void *)(ctxt->xpathCtxt));
  27. XSLTPUBFUN xmlXPathFunction XSLTCALL
  28. xsltXPathFunctionLookup (void *vctxt,
  29. const xmlChar *name,
  30. const xmlChar *ns_uri);
  31. /*
  32. * Interfaces for the functions implementations.
  33. */
  34. XSLTPUBFUN void XSLTCALL
  35. xsltDocumentFunction (xmlXPathParserContextPtr ctxt,
  36. int nargs);
  37. XSLTPUBFUN void XSLTCALL
  38. xsltKeyFunction (xmlXPathParserContextPtr ctxt,
  39. int nargs);
  40. XSLTPUBFUN void XSLTCALL
  41. xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt,
  42. int nargs);
  43. XSLTPUBFUN void XSLTCALL
  44. xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt,
  45. int nargs);
  46. XSLTPUBFUN void XSLTCALL
  47. xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt,
  48. int nargs);
  49. XSLTPUBFUN void XSLTCALL
  50. xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt,
  51. int nargs);
  52. XSLTPUBFUN void XSLTCALL
  53. xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt,
  54. int nargs);
  55. XSLTPUBFUN void XSLTCALL
  56. xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt,
  57. int nargs);
  58. /*
  59. * And the registration
  60. */
  61. XSLTPUBFUN void XSLTCALL
  62. xsltRegisterAllFunctions (xmlXPathContextPtr ctxt);
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /* __XML_XSLT_FUNCTIONS_H__ */