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