imports.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Summary: interface for the XSLT import support
  3. * Description: macros and fuctions needed to implement and
  4. * access the import tree
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. */
  10. #ifndef __XML_XSLT_IMPORTS_H__
  11. #define __XML_XSLT_IMPORTS_H__
  12. #include <libxml/tree.h>
  13. #include "xsltexports.h"
  14. #include "xsltInternals.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * XSLT_GET_IMPORT_PTR:
  20. *
  21. * A macro to import pointers from the stylesheet cascading order.
  22. */
  23. #define XSLT_GET_IMPORT_PTR(res, style, name) { \
  24. xsltStylesheetPtr st = style; \
  25. res = NULL; \
  26. while (st != NULL) { \
  27. if (st->name != NULL) { res = st->name; break; } \
  28. st = xsltNextImport(st); \
  29. }}
  30. /**
  31. * XSLT_GET_IMPORT_INT:
  32. *
  33. * A macro to import intergers from the stylesheet cascading order.
  34. */
  35. #define XSLT_GET_IMPORT_INT(res, style, name) { \
  36. xsltStylesheetPtr st = style; \
  37. res = -1; \
  38. while (st != NULL) { \
  39. if (st->name != -1) { res = st->name; break; } \
  40. st = xsltNextImport(st); \
  41. }}
  42. /*
  43. * Module interfaces
  44. */
  45. XSLTPUBFUN int XSLTCALL
  46. xsltParseStylesheetImport(xsltStylesheetPtr style,
  47. xmlNodePtr cur);
  48. XSLTPUBFUN int XSLTCALL
  49. xsltParseStylesheetInclude
  50. (xsltStylesheetPtr style,
  51. xmlNodePtr cur);
  52. XSLTPUBFUN xsltStylesheetPtr XSLTCALL
  53. xsltNextImport (xsltStylesheetPtr style);
  54. XSLTPUBFUN int XSLTCALL
  55. xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt);
  56. XSLTPUBFUN int XSLTCALL
  57. xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt,
  58. xmlNodePtr node);
  59. XSLTPUBFUN xsltTemplatePtr XSLTCALL
  60. xsltFindTemplate (xsltTransformContextPtr ctxt,
  61. const xmlChar *name,
  62. const xmlChar *nameURI);
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /* __XML_XSLT_IMPORTS_H__ */