transform.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /*
  2. * Summary: the XSLT engine transformation part.
  3. * Description: This module implements the bulk of the actual
  4. * transformation processing. Most of the xsl: element
  5. * constructs are implemented in this module.
  6. *
  7. * Copy: See Copyright for the status of this software.
  8. *
  9. * Author: Daniel Veillard
  10. */
  11. #ifndef __XML_XSLT_TRANSFORM_H__
  12. #define __XML_XSLT_TRANSFORM_H__
  13. #include <libxml/parser.h>
  14. #include <libxml/xmlIO.h>
  15. #include "xsltexports.h"
  16. #include <libxslt/xsltInternals.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /**
  21. * XInclude default processing.
  22. */
  23. XSLTPUBFUN void XSLTCALL
  24. xsltSetXIncludeDefault (int xinclude);
  25. XSLTPUBFUN int XSLTCALL
  26. xsltGetXIncludeDefault (void);
  27. /**
  28. * Export context to users.
  29. */
  30. XSLTPUBFUN xsltTransformContextPtr XSLTCALL
  31. xsltNewTransformContext (xsltStylesheetPtr style,
  32. xmlDocPtr doc);
  33. XSLTPUBFUN void XSLTCALL
  34. xsltFreeTransformContext(xsltTransformContextPtr ctxt);
  35. XSLTPUBFUN xmlDocPtr XSLTCALL
  36. xsltApplyStylesheetUser (xsltStylesheetPtr style,
  37. xmlDocPtr doc,
  38. const char **params,
  39. const char *output,
  40. FILE * profile,
  41. xsltTransformContextPtr userCtxt);
  42. XSLTPUBFUN void XSLTCALL
  43. xsltProcessOneNode (xsltTransformContextPtr ctxt,
  44. xmlNodePtr node,
  45. xsltStackElemPtr params);
  46. /**
  47. * Private Interfaces.
  48. */
  49. XSLTPUBFUN void XSLTCALL
  50. xsltApplyStripSpaces (xsltTransformContextPtr ctxt,
  51. xmlNodePtr node);
  52. XSLTPUBFUN xmlDocPtr XSLTCALL
  53. xsltApplyStylesheet (xsltStylesheetPtr style,
  54. xmlDocPtr doc,
  55. const char **params);
  56. XSLTPUBFUN xmlDocPtr XSLTCALL
  57. xsltProfileStylesheet (xsltStylesheetPtr style,
  58. xmlDocPtr doc,
  59. const char **params,
  60. FILE * output);
  61. XSLTPUBFUN int XSLTCALL
  62. xsltRunStylesheet (xsltStylesheetPtr style,
  63. xmlDocPtr doc,
  64. const char **params,
  65. const char *output,
  66. xmlSAXHandlerPtr SAX,
  67. xmlOutputBufferPtr IObuf);
  68. XSLTPUBFUN int XSLTCALL
  69. xsltRunStylesheetUser (xsltStylesheetPtr style,
  70. xmlDocPtr doc,
  71. const char **params,
  72. const char *output,
  73. xmlSAXHandlerPtr SAX,
  74. xmlOutputBufferPtr IObuf,
  75. FILE * profile,
  76. xsltTransformContextPtr userCtxt);
  77. XSLTPUBFUN void XSLTCALL
  78. xsltApplyOneTemplate (xsltTransformContextPtr ctxt,
  79. xmlNodePtr node,
  80. xmlNodePtr list,
  81. xsltTemplatePtr templ,
  82. xsltStackElemPtr params);
  83. XSLTPUBFUN void XSLTCALL
  84. xsltDocumentElem (xsltTransformContextPtr ctxt,
  85. xmlNodePtr node,
  86. xmlNodePtr inst,
  87. xsltElemPreCompPtr comp);
  88. XSLTPUBFUN void XSLTCALL
  89. xsltSort (xsltTransformContextPtr ctxt,
  90. xmlNodePtr node,
  91. xmlNodePtr inst,
  92. xsltElemPreCompPtr comp);
  93. XSLTPUBFUN void XSLTCALL
  94. xsltCopy (xsltTransformContextPtr ctxt,
  95. xmlNodePtr node,
  96. xmlNodePtr inst,
  97. xsltElemPreCompPtr comp);
  98. XSLTPUBFUN void XSLTCALL
  99. xsltText (xsltTransformContextPtr ctxt,
  100. xmlNodePtr node,
  101. xmlNodePtr inst,
  102. xsltElemPreCompPtr comp);
  103. XSLTPUBFUN void XSLTCALL
  104. xsltElement (xsltTransformContextPtr ctxt,
  105. xmlNodePtr node,
  106. xmlNodePtr inst,
  107. xsltElemPreCompPtr comp);
  108. XSLTPUBFUN void XSLTCALL
  109. xsltComment (xsltTransformContextPtr ctxt,
  110. xmlNodePtr node,
  111. xmlNodePtr inst,
  112. xsltElemPreCompPtr comp);
  113. XSLTPUBFUN void XSLTCALL
  114. xsltAttribute (xsltTransformContextPtr ctxt,
  115. xmlNodePtr node,
  116. xmlNodePtr inst,
  117. xsltElemPreCompPtr comp);
  118. XSLTPUBFUN void XSLTCALL
  119. xsltProcessingInstruction(xsltTransformContextPtr ctxt,
  120. xmlNodePtr node,
  121. xmlNodePtr inst,
  122. xsltElemPreCompPtr comp);
  123. XSLTPUBFUN void XSLTCALL
  124. xsltCopyOf (xsltTransformContextPtr ctxt,
  125. xmlNodePtr node,
  126. xmlNodePtr inst,
  127. xsltElemPreCompPtr comp);
  128. XSLTPUBFUN void XSLTCALL
  129. xsltValueOf (xsltTransformContextPtr ctxt,
  130. xmlNodePtr node,
  131. xmlNodePtr inst,
  132. xsltElemPreCompPtr comp);
  133. XSLTPUBFUN void XSLTCALL
  134. xsltNumber (xsltTransformContextPtr ctxt,
  135. xmlNodePtr node,
  136. xmlNodePtr inst,
  137. xsltElemPreCompPtr comp);
  138. XSLTPUBFUN void XSLTCALL
  139. xsltApplyImports (xsltTransformContextPtr ctxt,
  140. xmlNodePtr node,
  141. xmlNodePtr inst,
  142. xsltElemPreCompPtr comp);
  143. XSLTPUBFUN void XSLTCALL
  144. xsltCallTemplate (xsltTransformContextPtr ctxt,
  145. xmlNodePtr node,
  146. xmlNodePtr inst,
  147. xsltElemPreCompPtr comp);
  148. XSLTPUBFUN void XSLTCALL
  149. xsltApplyTemplates (xsltTransformContextPtr ctxt,
  150. xmlNodePtr node,
  151. xmlNodePtr inst,
  152. xsltElemPreCompPtr comp);
  153. XSLTPUBFUN void XSLTCALL
  154. xsltChoose (xsltTransformContextPtr ctxt,
  155. xmlNodePtr node,
  156. xmlNodePtr inst,
  157. xsltElemPreCompPtr comp);
  158. XSLTPUBFUN void XSLTCALL
  159. xsltIf (xsltTransformContextPtr ctxt,
  160. xmlNodePtr node,
  161. xmlNodePtr inst,
  162. xsltElemPreCompPtr comp);
  163. XSLTPUBFUN void XSLTCALL
  164. xsltForEach (xsltTransformContextPtr ctxt,
  165. xmlNodePtr node,
  166. xmlNodePtr inst,
  167. xsltElemPreCompPtr comp);
  168. XSLTPUBFUN void XSLTCALL
  169. xsltRegisterAllElement (xsltTransformContextPtr ctxt);
  170. XSLTPUBFUN xmlNodePtr XSLTCALL
  171. xsltCopyTextString (xsltTransformContextPtr ctxt,
  172. xmlNodePtr target,
  173. const xmlChar *string,
  174. int noescape);
  175. /* Following 2 functions needed for libexslt/functions.c */
  176. XSLTPUBFUN void XSLTCALL
  177. xsltLocalVariablePop (xsltTransformContextPtr ctxt,
  178. int limitNr,
  179. int level);
  180. XSLTPUBFUN int XSLTCALL
  181. xsltLocalVariablePush (xsltTransformContextPtr ctxt,
  182. xsltStackElemPtr variable,
  183. int level);
  184. /*
  185. * Hook for the debugger if activated.
  186. */
  187. XSLTPUBFUN void XSLTCALL
  188. xslHandleDebugger (xmlNodePtr cur,
  189. xmlNodePtr node,
  190. xsltTemplatePtr templ,
  191. xsltTransformContextPtr ctxt);
  192. #ifdef __cplusplus
  193. }
  194. #endif
  195. #endif /* __XML_XSLT_TRANSFORM_H__ */