templates.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Summary: interface for the template processing
  3. * Description: This set of routine encapsulates XPath calls
  4. * and Attribute Value Templates evaluation.
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. */
  10. #ifndef __XML_XSLT_TEMPLATES_H__
  11. #define __XML_XSLT_TEMPLATES_H__
  12. #include <libxml/xpath.h>
  13. #include <libxml/xpathInternals.h>
  14. #include "xsltexports.h"
  15. #include "xsltInternals.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. XSLTPUBFUN int XSLTCALL
  20. xsltEvalXPathPredicate (xsltTransformContextPtr ctxt,
  21. xmlXPathCompExprPtr comp,
  22. xmlNsPtr *nsList,
  23. int nsNr);
  24. XSLTPUBFUN xmlChar * XSLTCALL
  25. xsltEvalTemplateString (xsltTransformContextPtr ctxt,
  26. xmlNodePtr contextNode,
  27. xmlNodePtr inst);
  28. XSLTPUBFUN xmlChar * XSLTCALL
  29. xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt,
  30. xmlNodePtr node,
  31. const xmlChar *name,
  32. const xmlChar *ns);
  33. XSLTPUBFUN const xmlChar * XSLTCALL
  34. xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style,
  35. xmlNodePtr node,
  36. const xmlChar *name,
  37. const xmlChar *ns,
  38. int *found);
  39. /* TODO: this is obviously broken ... the namespaces should be passed too ! */
  40. XSLTPUBFUN xmlChar * XSLTCALL
  41. xsltEvalXPathString (xsltTransformContextPtr ctxt,
  42. xmlXPathCompExprPtr comp);
  43. XSLTPUBFUN xmlChar * XSLTCALL
  44. xsltEvalXPathStringNs (xsltTransformContextPtr ctxt,
  45. xmlXPathCompExprPtr comp,
  46. int nsNr,
  47. xmlNsPtr *nsList);
  48. XSLTPUBFUN xmlNodePtr * XSLTCALL
  49. xsltTemplateProcess (xsltTransformContextPtr ctxt,
  50. xmlNodePtr node);
  51. XSLTPUBFUN xmlAttrPtr XSLTCALL
  52. xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt,
  53. xmlNodePtr target,
  54. xmlAttrPtr cur);
  55. XSLTPUBFUN xmlAttrPtr XSLTCALL
  56. xsltAttrTemplateProcess (xsltTransformContextPtr ctxt,
  57. xmlNodePtr target,
  58. xmlAttrPtr attr);
  59. XSLTPUBFUN xmlChar * XSLTCALL
  60. xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt,
  61. const xmlChar* attr);
  62. XSLTPUBFUN xmlChar * XSLTCALL
  63. xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt,
  64. const xmlChar* str,
  65. xmlNodePtr node);
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif /* __XML_XSLT_TEMPLATES_H__ */