pattern.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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__ */