pattern.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Summary: interface for the pattern matching used in template matches.
  3. * Description: the implementation of the lookup of the right template
  4. * for a given node must be really fast in order to keep
  5. * decent performances.
  6. *
  7. * Copy: See Copyright for the status of this software.
  8. *
  9. * Author: Daniel Veillard
  10. */
  11. #ifndef __XML_XSLT_PATTERN_H__
  12. #define __XML_XSLT_PATTERN_H__
  13. #include "xsltInternals.h"
  14. #include "xsltexports.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * xsltCompMatch:
  20. *
  21. * Data structure used for the implementation of patterns.
  22. * It is kept private (in pattern.c).
  23. */
  24. typedef struct _xsltCompMatch xsltCompMatch;
  25. typedef xsltCompMatch *xsltCompMatchPtr;
  26. /*
  27. * Pattern related interfaces.
  28. */
  29. XSLTPUBFUN xsltCompMatchPtr XSLTCALL
  30. xsltCompilePattern (const xmlChar *pattern,
  31. xmlDocPtr doc,
  32. xmlNodePtr node,
  33. xsltStylesheetPtr style,
  34. xsltTransformContextPtr runtime);
  35. XSLTPUBFUN void XSLTCALL
  36. xsltFreeCompMatchList (xsltCompMatchPtr comp);
  37. XSLTPUBFUN int XSLTCALL
  38. xsltTestCompMatchList (xsltTransformContextPtr ctxt,
  39. xmlNodePtr node,
  40. xsltCompMatchPtr comp);
  41. XSLTPUBFUN void XSLTCALL
  42. xsltCompMatchClearCache (xsltTransformContextPtr ctxt,
  43. xsltCompMatchPtr comp);
  44. XSLTPUBFUN void XSLTCALL
  45. xsltNormalizeCompSteps (void *payload,
  46. void *data,
  47. const xmlChar *name);
  48. /*
  49. * Template related interfaces.
  50. */
  51. XSLTPUBFUN int XSLTCALL
  52. xsltAddTemplate (xsltStylesheetPtr style,
  53. xsltTemplatePtr cur,
  54. const xmlChar *mode,
  55. const xmlChar *modeURI);
  56. XSLTPUBFUN xsltTemplatePtr XSLTCALL
  57. xsltGetTemplate (xsltTransformContextPtr ctxt,
  58. xmlNodePtr node,
  59. xsltStylesheetPtr style);
  60. XSLTPUBFUN void XSLTCALL
  61. xsltFreeTemplateHashes (xsltStylesheetPtr style);
  62. XSLTPUBFUN void XSLTCALL
  63. xsltCleanupTemplates (xsltStylesheetPtr style);
  64. #if 0
  65. int xsltMatchPattern (xsltTransformContextPtr ctxt,
  66. xmlNodePtr node,
  67. const xmlChar *pattern,
  68. xmlDocPtr ctxtdoc,
  69. xmlNodePtr ctxtnode);
  70. #endif
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif /* __XML_XSLT_PATTERN_H__ */