ReactOS 0.4.16-dev-306-g647d351
xsltInternals.h
Go to the documentation of this file.
1/*
2 * Summary: internal data structures, constants and functions
3 * Description: Internal data structures, constants and functions used
4 * by the XSLT engine.
5 * They are not part of the API or ABI, i.e. they can change
6 * without prior notice, use carefully.
7 *
8 * Copy: See Copyright for the status of this software.
9 *
10 * Author: Daniel Veillard
11 */
12
13#ifndef __XML_XSLT_INTERNALS_H__
14#define __XML_XSLT_INTERNALS_H__
15
16#include <libxml/tree.h>
17#include <libxml/hash.h>
18#include <libxml/xpath.h>
19#include <libxml/xmlerror.h>
20#include <libxml/dict.h>
21#include <libxml/xmlstring.h>
22#include <libxslt/xslt.h>
23#include "xsltexports.h"
24#include "xsltlocale.h"
25#include "numbersInternals.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/* #define XSLT_DEBUG_PROFILE_CACHE */
32
38#define XSLT_IS_TEXT_NODE(n) ((n != NULL) && \
39 (((n)->type == XML_TEXT_NODE) || \
40 ((n)->type == XML_CDATA_SECTION_NODE)))
41
42
48#define XSLT_MARK_RES_TREE_FRAG(n) \
49 (n)->name = (char *) xmlStrdup(BAD_CAST " fake node libxslt");
50
56#define XSLT_IS_RES_TREE_FRAG(n) \
57 ((n != NULL) && ((n)->type == XML_DOCUMENT_NODE) && \
58 ((n)->name != NULL) && ((n)->name[0] == ' '))
59
66#define XSLT_REFACTORED_KEYCOMP
67
74#define XSLT_FAST_IF
75
81/* #define XSLT_REFACTORED */
82/* ==================================================================== */
83
89#define XSLT_REFACTORED_VARS
90
91#ifdef XSLT_REFACTORED
92
93extern const xmlChar *xsltXSLTAttrMarker;
94
95
96/* TODO: REMOVE: #define XSLT_REFACTORED_EXCLRESNS */
97
98/* TODO: REMOVE: #define XSLT_REFACTORED_NSALIAS */
99
106/* #define XSLT_REFACTORED_XSLT_NSCOMP */
107
108#ifdef XSLT_REFACTORED_XSLT_NSCOMP
109
110extern const xmlChar *xsltConstNamespaceNameXSLT;
111
117#define IS_XSLT_ELEM_FAST(n) \
118 (((n) != NULL) && ((n)->ns != NULL) && \
119 ((n)->ns->href == xsltConstNamespaceNameXSLT))
120
126#define IS_XSLT_ATTR_FAST(a) \
127 (((a) != NULL) && ((a)->ns != NULL) && \
128 ((a)->ns->href == xsltConstNamespaceNameXSLT))
129
135#define XSLT_HAS_INTERNAL_NSMAP(s) \
136 (((s) != NULL) && ((s)->principal) && \
137 ((s)->principal->principalData) && \
138 ((s)->principal->principalData->nsMap))
139
145#define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap)
146
147#else /* XSLT_REFACTORED_XSLT_NSCOMP */
148
154#define IS_XSLT_ELEM_FAST(n) \
155 (((n) != NULL) && ((n)->ns != NULL) && \
156 (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
157
163#define IS_XSLT_ATTR_FAST(a) \
164 (((a) != NULL) && ((a)->ns != NULL) && \
165 (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE)))
166
167
168#endif /* XSLT_REFACTORED_XSLT_NSCOMP */
169
170
179/* #define XSLT_REFACTORED_MANDATORY_VERSION */
180
186typedef struct _xsltPointerList xsltPointerList;
187typedef xsltPointerList *xsltPointerListPtr;
188struct _xsltPointerList {
189 void **items;
190 int number;
191 int size;
192};
193
194#endif
195
202/* #define XSLT_REFACTORED_PARSING */
203
209#define XSLT_MAX_SORT 15
210
216#define XSLT_PAT_NO_PRIORITY -12345789
217
226 void *info; /* pointer to the extra data */
227 xmlFreeFunc deallocate; /* pointer to the deallocation routine */
228 union { /* dual-purpose field */
229 void *ptr; /* data not needing deallocation */
230 int ival; /* integer value storage */
232};
233
241#define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
249#define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
257#define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ
258
267 struct _xsltTemplate *next;/* chained list sorted by priority */
268 struct _xsltStylesheet *style;/* the containing stylesheet */
269 xmlChar *match; /* the matching string */
270 float priority; /* as given from the stylesheet, not computed */
271 const xmlChar *name; /* the local part of the name QName */
272 const xmlChar *nameURI; /* the URI part of the name QName */
273 const xmlChar *mode;/* the local part of the mode QName */
274 const xmlChar *modeURI;/* the URI part of the mode QName */
275 xmlNodePtr content; /* the template replacement value */
276 xmlNodePtr elem; /* the source element */
277
278 /*
279 * TODO: @inheritedNsNr and @inheritedNs won't be used in the
280 * refactored code.
281 */
282 int inheritedNsNr; /* number of inherited namespaces */
283 xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */
284
285 /* Profiling information */
286 int nbCalls; /* the number of time the template was called */
287 unsigned long time; /* the time spent in this template */
288 void *params; /* xsl:param instructions */
289
290 int templNr; /* Nb of templates in the stack */
291 int templMax; /* Size of the templtes stack */
292 xsltTemplatePtr *templCalledTab; /* templates called */
293 int *templCountTab; /* .. and how often */
294
295 /* Conflict resolution */
297};
298
307 struct _xsltDecimalFormat *next; /* chained list */
309 /* Used for interpretation of pattern */
312 /* May appear in result */
315 xmlChar *noNumber; /* Not-a-number */
316 /* Used for interpretation of pattern and may appear in result */
323};
324
333 struct _xsltDocument *next; /* documents are kept in a chained list */
334 int main; /* is this the main document */
335 xmlDocPtr doc; /* the parsed document */
336 void *keys; /* key tables storage */
337 struct _xsltDocument *includes; /* subsidiary includes */
338 int preproc; /* pre-processing already done */
340};
341
347typedef struct _xsltKeyDef xsltKeyDef;
356 xmlXPathCompExprPtr comp;
357 xmlXPathCompExprPtr usecomp;
358 xmlNsPtr *nsList; /* the namespaces in scope */
359 int nsNr; /* the number of namespaces in scope */
360};
361
375};
376
377/*
378 * The in-memory structure corresponding to an XSLT Stylesheet.
379 * NOTE: most of the content is simply linked from the doc tree
380 * structure, no specific allocation is made.
381 */
384
387
396
410 xsltElemPreCompPtr comp);
411
421 int nbsorts);
422
423typedef enum {
446#ifdef XSLT_REFACTORED
447 ,
448 XSLT_FUNC_OTHERWISE,
449 XSLT_FUNC_FALLBACK,
450 XSLT_FUNC_MESSAGE,
451 XSLT_FUNC_INCLUDE,
452 XSLT_FUNC_ATTRSET,
453 XSLT_FUNC_LITERAL_RESULT_ELEMENT,
454 XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
455#endif
457
465
475 xsltElemPreCompPtr next; /* next item in the global chained
476 list held by xsltStylesheet. */
477 xsltStyleType type; /* type of the element */
478 xsltTransformFunction func; /* handling function */
479 xmlNodePtr inst; /* the node in the stylesheet's tree
480 corresponding to this item */
481
482 /* end of common part */
483 xsltElemPreCompDeallocator free; /* the deallocator */
484};
485
497
498#ifdef XSLT_REFACTORED
499
500/*
501* Some pointer-list utility functions.
502*/
503XSLTPUBFUN xsltPointerListPtr XSLTCALL
504 xsltPointerListCreate (int initialSize);
506 xsltPointerListFree (xsltPointerListPtr list);
508 xsltPointerListClear (xsltPointerListPtr list);
510 xsltPointerListAddSize (xsltPointerListPtr list,
511 void *item,
512 int initialSize);
513
514/************************************************************************
515 * *
516 * Refactored structures *
517 * *
518 ************************************************************************/
519
520typedef struct _xsltNsListContainer xsltNsListContainer;
521typedef xsltNsListContainer *xsltNsListContainerPtr;
522struct _xsltNsListContainer {
523 xmlNsPtr *list;
524 int totalNumber;
525 int xpathNumber;
526};
527
537#define XSLT_ITEM_COMPATIBILITY_FIELDS \
538 xsltElemPreCompPtr next;\
539 xsltStyleType type;\
540 xsltTransformFunction func;\
541 xmlNodePtr inst;
542
549#define XSLT_ITEM_NAVIGATION_FIELDS
550/*
551 xsltStylePreCompPtr parent;\
552 xsltStylePreCompPtr children;\
553 xsltStylePreCompPtr nextItem;
554*/
555
561#define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs;
562
568#define XSLT_ITEM_COMMON_FIELDS \
569 XSLT_ITEM_COMPATIBILITY_FIELDS \
570 XSLT_ITEM_NAVIGATION_FIELDS \
571 XSLT_ITEM_NSINSCOPE_FIELDS
572
586struct _xsltStylePreComp {
587 xsltElemPreCompPtr next; /* next item in the global chained
588 list held by xsltStylesheet */
589 xsltStyleType type; /* type of the item */
590 xsltTransformFunction func; /* handling function */
591 xmlNodePtr inst; /* the node in the stylesheet's tree
592 corresponding to this item. */
593 /* Currently no navigational fields. */
594 xsltNsListContainerPtr inScopeNs;
595};
596
605typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem;
606typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr;
607
608struct _xsltStyleBasicEmptyItem {
609 XSLT_ITEM_COMMON_FIELDS
610};
611
618typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem;
619typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr;
620
621struct _xsltStyleBasicExpressionItem {
622 XSLT_ITEM_COMMON_FIELDS
623
624 const xmlChar *select; /* TODO: Change this to "expression". */
625 xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */
626};
627
628/************************************************************************
629 * *
630 * XSLT-instructions/declarations *
631 * *
632 ************************************************************************/
633
645typedef struct _xsltStyleItemElement xsltStyleItemElement;
646typedef xsltStyleItemElement *xsltStyleItemElementPtr;
647
648struct _xsltStyleItemElement {
649 XSLT_ITEM_COMMON_FIELDS
650
651 const xmlChar *use;
652 int has_use;
653 const xmlChar *name;
654 int has_name;
655 const xmlChar *ns;
656 const xmlChar *nsPrefix;
657 int has_ns;
658};
659
670typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute;
671typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr;
672
673struct _xsltStyleItemAttribute {
674 XSLT_ITEM_COMMON_FIELDS
675 const xmlChar *name;
676 int has_name;
677 const xmlChar *ns;
678 const xmlChar *nsPrefix;
679 int has_ns;
680};
681
691typedef struct _xsltStyleItemText xsltStyleItemText;
692typedef xsltStyleItemText *xsltStyleItemTextPtr;
693
694struct _xsltStyleItemText {
695 XSLT_ITEM_COMMON_FIELDS
696 int noescape; /* text */
697};
698
707typedef xsltStyleBasicEmptyItem xsltStyleItemComment;
708typedef xsltStyleItemComment *xsltStyleItemCommentPtr;
709
719typedef struct _xsltStyleItemPI xsltStyleItemPI;
720typedef xsltStyleItemPI *xsltStyleItemPIPtr;
721
722struct _xsltStyleItemPI {
723 XSLT_ITEM_COMMON_FIELDS
724 const xmlChar *name;
725 int has_name;
726};
727
734typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports;
735typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr;
736
747typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates;
748typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr;
749
750struct _xsltStyleItemApplyTemplates {
751 XSLT_ITEM_COMMON_FIELDS
752
753 const xmlChar *mode; /* apply-templates */
754 const xmlChar *modeURI; /* apply-templates */
755 const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
756 xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
757 /* TODO: with-params */
758};
759
769typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate;
770typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr;
771
772struct _xsltStyleItemCallTemplate {
773 XSLT_ITEM_COMMON_FIELDS
774
775 xsltTemplatePtr templ; /* call-template */
776 const xmlChar *name; /* element, attribute, pi */
777 int has_name; /* element, attribute, pi */
778 const xmlChar *ns; /* element */
779 int has_ns; /* element */
780 /* TODO: with-params */
781};
782
792typedef struct _xsltStyleItemCopy xsltStyleItemCopy;
793typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
794
795struct _xsltStyleItemCopy {
796 XSLT_ITEM_COMMON_FIELDS
797 const xmlChar *use; /* copy, element */
798 int has_use; /* copy, element */
799};
800
810typedef struct _xsltStyleItemIf xsltStyleItemIf;
811typedef xsltStyleItemIf *xsltStyleItemIfPtr;
812
813struct _xsltStyleItemIf {
814 XSLT_ITEM_COMMON_FIELDS
815
816 const xmlChar *test; /* if */
817 xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
818};
819
820
828typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf;
829typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr;
830
839typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf;
840typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr;
841
842struct _xsltStyleItemValueOf {
843 XSLT_ITEM_COMMON_FIELDS
844
845 const xmlChar *select;
846 xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
847 int noescape;
848};
849
865typedef struct _xsltStyleItemNumber xsltStyleItemNumber;
866typedef xsltStyleItemNumber *xsltStyleItemNumberPtr;
867
868struct _xsltStyleItemNumber {
869 XSLT_ITEM_COMMON_FIELDS
870 xsltNumberData numdata; /* number */
871};
872
881typedef xsltStyleBasicEmptyItem xsltStyleItemChoose;
882typedef xsltStyleItemChoose *xsltStyleItemChoosePtr;
883
892typedef xsltStyleBasicEmptyItem xsltStyleItemFallback;
893typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr;
894
904typedef xsltStyleBasicExpressionItem xsltStyleItemForEach;
905typedef xsltStyleItemForEach *xsltStyleItemForEachPtr;
906
916typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
917typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
918
919struct _xsltStyleItemMessage {
920 XSLT_ITEM_COMMON_FIELDS
921 int terminate;
922};
923
929typedef struct _xsltStyleItemDocument xsltStyleItemDocument;
930typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr;
931
932struct _xsltStyleItemDocument {
933 XSLT_ITEM_COMMON_FIELDS
934 int ver11; /* assigned: in xsltDocumentComp;
935 read: nowhere;
936 TODO: Check if we need. */
937 const xmlChar *filename; /* document URL */
938 int has_filename;
939};
940
941/************************************************************************
942 * *
943 * Non-instructions (actually properties of instructions/declarations) *
944 * *
945 ************************************************************************/
946
959typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable;
960typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr;
961
962struct _xsltStyleBasicItemVariable {
963 XSLT_ITEM_COMMON_FIELDS
964
965 const xmlChar *select;
966 xmlXPathCompExprPtr comp;
967
968 const xmlChar *name;
969 int has_name;
970 const xmlChar *ns;
971 int has_ns;
972};
973
984typedef xsltStyleBasicItemVariable xsltStyleItemVariable;
985typedef xsltStyleItemVariable *xsltStyleItemVariablePtr;
986
997typedef struct _xsltStyleItemParam xsltStyleItemParam;
998typedef xsltStyleItemParam *xsltStyleItemParamPtr;
999
1000struct _xsltStyleItemParam {
1001 XSLT_ITEM_COMMON_FIELDS
1002
1003 const xmlChar *select;
1004 xmlXPathCompExprPtr comp;
1005
1006 const xmlChar *name;
1007 int has_name;
1008 const xmlChar *ns;
1009 int has_ns;
1010};
1011
1021typedef xsltStyleBasicItemVariable xsltStyleItemWithParam;
1022typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr;
1023
1036typedef struct _xsltStyleItemSort xsltStyleItemSort;
1037typedef xsltStyleItemSort *xsltStyleItemSortPtr;
1038
1039struct _xsltStyleItemSort {
1040 XSLT_ITEM_COMMON_FIELDS
1041
1042 const xmlChar *stype; /* sort */
1043 int has_stype; /* sort */
1044 int number; /* sort */
1045 const xmlChar *order; /* sort */
1046 int has_order; /* sort */
1047 int descending; /* sort */
1048 const xmlChar *lang; /* sort */
1049 int has_lang; /* sort */
1050 xsltLocale locale; /* sort */
1051 const xmlChar *case_order; /* sort */
1052 int lower_first; /* sort */
1053
1054 const xmlChar *use;
1055 int has_use;
1056
1057 const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1058
1059 xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1060};
1061
1062
1072typedef struct _xsltStyleItemWhen xsltStyleItemWhen;
1073typedef xsltStyleItemWhen *xsltStyleItemWhenPtr;
1074
1075struct _xsltStyleItemWhen {
1076 XSLT_ITEM_COMMON_FIELDS
1077
1078 const xmlChar *test;
1079 xmlXPathCompExprPtr comp;
1080};
1081
1090typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise;
1091typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr;
1092
1093struct _xsltStyleItemOtherwise {
1094 XSLT_ITEM_COMMON_FIELDS
1095};
1096
1097typedef struct _xsltStyleItemInclude xsltStyleItemInclude;
1098typedef xsltStyleItemInclude *xsltStyleItemIncludePtr;
1099
1100struct _xsltStyleItemInclude {
1101 XSLT_ITEM_COMMON_FIELDS
1103};
1104
1105/************************************************************************
1106 * *
1107 * XSLT elements in forwards-compatible mode *
1108 * *
1109 ************************************************************************/
1110
1111typedef struct _xsltStyleItemUknown xsltStyleItemUknown;
1112typedef xsltStyleItemUknown *xsltStyleItemUknownPtr;
1113struct _xsltStyleItemUknown {
1114 XSLT_ITEM_COMMON_FIELDS
1115};
1116
1117
1118/************************************************************************
1119 * *
1120 * Extension elements *
1121 * *
1122 ************************************************************************/
1123
1124/*
1125 * xsltStyleItemExtElement:
1126 *
1127 * Reflects extension elements.
1128 *
1129 * NOTE: Due to the fact that the structure xsltElemPreComp is most
1130 * probably already heavily in use out there by users, so we cannot
1131 * easily change it, we'll create an intermediate structure which will
1132 * hold an xsltElemPreCompPtr.
1133 * BIG NOTE: The only problem I see here is that the user processes the
1134 * content of the stylesheet tree, possibly he'll lookup the node->psvi
1135 * fields in order to find subsequent extension functions.
1136 * In this case, the user's code will break, since the node->psvi
1137 * field will hold now the xsltStyleItemExtElementPtr and not
1138 * the xsltElemPreCompPtr.
1139 * However the place where the structure is anchored in the node-tree,
1140 * namely node->psvi, has beed already once been moved from node->_private
1141 * to node->psvi, so we have a precedent here, which, I think, should allow
1142 * us to change such semantics without headaches.
1143 */
1144typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
1145typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
1146struct _xsltStyleItemExtElement {
1147 XSLT_ITEM_COMMON_FIELDS
1149};
1150
1151/************************************************************************
1152 * *
1153 * Literal result elements *
1154 * *
1155 ************************************************************************/
1156
1157typedef struct _xsltEffectiveNs xsltEffectiveNs;
1158typedef xsltEffectiveNs *xsltEffectiveNsPtr;
1159struct _xsltEffectiveNs {
1160 xsltEffectiveNsPtr nextInStore; /* storage next */
1161 xsltEffectiveNsPtr next; /* next item in the list */
1162 const xmlChar *prefix;
1163 const xmlChar *nsName;
1164 /*
1165 * Indicates if eclared on the literal result element; dunno if really
1166 * needed.
1167 */
1168 int holdByElem;
1169};
1170
1171/*
1172 * Info for literal result elements.
1173 * This will be set on the elem->psvi field and will be
1174 * shared by literal result elements, which have the same
1175 * excluded result namespaces; i.e., this *won't* be created uniquely
1176 * for every literal result element.
1177 */
1178typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo;
1179typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr;
1180struct _xsltStyleItemLRElementInfo {
1181 XSLT_ITEM_COMMON_FIELDS
1182 /*
1183 * @effectiveNs is the set of effective ns-nodes
1184 * on the literal result element, which will be added to the result
1185 * element if not already existing in the result tree.
1186 * This means that excluded namespaces (via exclude-result-prefixes,
1187 * extension-element-prefixes and the XSLT namespace) not added
1188 * to the set.
1189 * Namespace-aliasing was applied on the @effectiveNs.
1190 */
1191 xsltEffectiveNsPtr effectiveNs;
1192
1193};
1194
1195#ifdef XSLT_REFACTORED
1196
1197typedef struct _xsltNsAlias xsltNsAlias;
1198typedef xsltNsAlias *xsltNsAliasPtr;
1199struct _xsltNsAlias {
1200 xsltNsAliasPtr next; /* next in the list */
1201 xmlNsPtr literalNs;
1202 xmlNsPtr targetNs;
1203 xmlDocPtr docOfTargetNs;
1204};
1205#endif
1206
1207#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1208
1209typedef struct _xsltNsMap xsltNsMap;
1210typedef xsltNsMap *xsltNsMapPtr;
1211struct _xsltNsMap {
1212 xsltNsMapPtr next; /* next in the list */
1213 xmlDocPtr doc;
1214 xmlNodePtr elem; /* the element holding the ns-decl */
1215 xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */
1216 const xmlChar *origNsName; /* the original XML namespace name */
1217 const xmlChar *newNsName; /* the mapped XML namespace name */
1218};
1219#endif
1220
1221/************************************************************************
1222 * *
1223 * Compile-time structures for *internal* use only *
1224 * *
1225 ************************************************************************/
1226
1227typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData;
1228typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr;
1229
1230typedef struct _xsltNsList xsltNsList;
1231typedef xsltNsList *xsltNsListPtr;
1232struct _xsltNsList {
1233 xsltNsListPtr next; /* next in the list */
1234 xmlNsPtr ns;
1235};
1236
1237/*
1238* xsltVarInfo:
1239*
1240* Used at compilation time for parameters and variables.
1241*/
1242typedef struct _xsltVarInfo xsltVarInfo;
1243typedef xsltVarInfo *xsltVarInfoPtr;
1244struct _xsltVarInfo {
1245 xsltVarInfoPtr next; /* next in the list */
1246 xsltVarInfoPtr prev;
1247 int depth; /* the depth in the tree */
1248 const xmlChar *name;
1249 const xmlChar *nsName;
1250};
1251
1257typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo;
1258typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr;
1259struct _xsltCompilerNodeInfo {
1260 xsltCompilerNodeInfoPtr next;
1261 xsltCompilerNodeInfoPtr prev;
1263 int depth;
1264 xsltTemplatePtr templ; /* The owning template */
1265 int category; /* XSLT element, LR-element or
1266 extension element */
1268 xsltElemPreCompPtr item; /* The compiled information */
1269 /* The current in-scope namespaces */
1270 xsltNsListContainerPtr inScopeNs;
1271 /* The current excluded result namespaces */
1272 xsltPointerListPtr exclResultNs;
1273 /* The current extension instruction namespaces */
1274 xsltPointerListPtr extElemNs;
1275
1276 /* The current info for literal result elements. */
1277 xsltStyleItemLRElementInfoPtr litResElemInfo;
1278 /*
1279 * Set to 1 if in-scope namespaces changed,
1280 * or excluded result namespaces changed,
1281 * or extension element namespaces changed.
1282 * This will trigger creation of new infos
1283 * for literal result elements.
1284 */
1285 int nsChanged;
1286 int preserveWhitespace;
1287 int stripWhitespace;
1288 int isRoot; /* whether this is the stylesheet's root node */
1289 int forwardsCompat; /* whether forwards-compatible mode is enabled */
1290 /* whether the content of an extension element was processed */
1291 int extContentHandled;
1292 /* the type of the current child */
1293 xsltStyleType curChildType;
1294};
1295
1301#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
1302
1303typedef enum {
1304 XSLT_ERROR_SEVERITY_ERROR = 0,
1305 XSLT_ERROR_SEVERITY_WARNING
1306} xsltErrorSeverityType;
1307
1308typedef struct _xsltCompilerCtxt xsltCompilerCtxt;
1309typedef xsltCompilerCtxt *xsltCompilerCtxtPtr;
1310struct _xsltCompilerCtxt {
1311 void *errorCtxt; /* user specific error context */
1312 /*
1313 * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */
1314 xsltErrorSeverityType errSeverity;
1315 int warnings; /* TODO: number of warnings found at
1316 compilation */
1317 int errors; /* TODO: number of errors found at
1318 compilation */
1319 xmlDictPtr dict;
1321 int simplified; /* whether this is a simplified stylesheet */
1322 /* TODO: structured/unstructured error contexts. */
1323 int depth; /* Current depth of processing */
1324
1325 xsltCompilerNodeInfoPtr inode;
1326 xsltCompilerNodeInfoPtr inodeList;
1327 xsltCompilerNodeInfoPtr inodeLast;
1328 xsltPointerListPtr tmpList; /* Used for various purposes */
1329 /*
1330 * The XSLT version as specified by the stylesheet's root element.
1331 */
1332 int isInclude;
1333 int hasForwardsCompat; /* whether forwards-compatible mode was used
1334 in a parsing episode */
1335 int maxNodeInfos; /* TEMP TODO: just for the interest */
1336 int maxLREs; /* TEMP TODO: just for the interest */
1337 /*
1338 * In order to keep the old behaviour, applying strict rules of
1339 * the spec can be turned off. This has effect only on special
1340 * mechanisms like whitespace-stripping in the stylesheet.
1341 */
1342 int strict;
1343 xsltPrincipalStylesheetDataPtr psData;
1344 xsltStyleItemUknownPtr unknownItem;
1345 int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */
1346 xsltNsAliasPtr nsAliases;
1347 xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */
1348 xsltVarInfoPtr ivar; /* topmost local variable/param. */
1349};
1350
1351#else /* XSLT_REFACTORED */
1352/*
1353* The old structures before refactoring.
1354*/
1355
1363 xsltElemPreCompPtr next; /* chained list */
1364 xsltStyleType type; /* type of the element */
1365 xsltTransformFunction func; /* handling function */
1366 xmlNodePtr inst; /* the instruction */
1367
1368 /*
1369 * Pre computed values.
1370 */
1371
1372 const xmlChar *stype; /* sort */
1373 int has_stype; /* sort */
1374 int number; /* sort */
1375 const xmlChar *order; /* sort */
1376 int has_order; /* sort */
1377 int descending; /* sort */
1378 const xmlChar *lang; /* sort */
1379 int has_lang; /* sort */
1380 xsltLocale locale; /* sort */
1381 const xmlChar *case_order; /* sort */
1382 int lower_first; /* sort */
1383
1384 const xmlChar *use; /* copy, element */
1385 int has_use; /* copy, element */
1386
1387 int noescape; /* text */
1388
1389 const xmlChar *name; /* element, attribute, pi */
1390 int has_name; /* element, attribute, pi */
1391 const xmlChar *ns; /* element */
1392 int has_ns; /* element */
1393
1394 const xmlChar *mode; /* apply-templates */
1395 const xmlChar *modeURI; /* apply-templates */
1396
1397 const xmlChar *test; /* if */
1398
1399 xsltTemplatePtr templ; /* call-template */
1400
1401 const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1402
1403 int ver11; /* document */
1404 const xmlChar *filename; /* document URL */
1405 int has_filename; /* document */
1406
1408
1409 xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1410 xmlNsPtr *nsList; /* the namespaces in scope */
1411 int nsNr; /* the number of namespaces in scope */
1412};
1413
1414#endif /* XSLT_REFACTORED */
1415
1416
1417/*
1418 * The in-memory structure corresponding to an XSLT Variable
1419 * or Param.
1420 */
1424 struct _xsltStackElem *next;/* chained list */
1425 xsltStylePreCompPtr comp; /* the compiled form */
1426 int computed; /* was the evaluation done */
1427 const xmlChar *name; /* the local part of the name QName */
1428 const xmlChar *nameURI; /* the URI part of the name QName */
1429 const xmlChar *select; /* the eval string */
1430 xmlNodePtr tree; /* the sequence constructor if no eval
1431 string or the location */
1432 xmlXPathObjectPtr value; /* The value if computed */
1433 xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0)
1434 which are bound to the variable's lifetime. */
1435 int level; /* the depth in the tree;
1436 -1 if persistent (e.g. a given xsl:with-param) */
1437 xsltTransformContextPtr context; /* The transformation context; needed to cache
1438 the variables */
1440};
1441
1442#ifdef XSLT_REFACTORED
1443
1444struct _xsltPrincipalStylesheetData {
1445 /*
1446 * Namespace dictionary for ns-prefixes and ns-names:
1447 * TODO: Shared between stylesheets, and XPath mechanisms.
1448 * Not used yet.
1449 */
1450 xmlDictPtr namespaceDict;
1451 /*
1452 * Global list of in-scope namespaces.
1453 */
1454 xsltPointerListPtr inScopeNamespaces;
1455 /*
1456 * Global list of information for [xsl:]excluded-result-prefixes.
1457 */
1458 xsltPointerListPtr exclResultNamespaces;
1459 /*
1460 * Global list of information for [xsl:]extension-element-prefixes.
1461 */
1462 xsltPointerListPtr extElemNamespaces;
1463 xsltEffectiveNsPtr effectiveNs;
1464#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1465 /*
1466 * Namespace name map to get rid of string comparison of namespace names.
1467 */
1468 xsltNsMapPtr nsMap;
1469#endif
1470};
1471
1472
1473#endif
1474/*
1475 * Note that we added a @compCtxt field to anchor an stylesheet compilation
1476 * context, since, due to historical reasons, various compile-time function
1477 * take only the stylesheet as argument and not a compilation context.
1478 */
1480 /*
1481 * The stylesheet import relation is kept as a tree.
1482 */
1486
1487 xsltDocumentPtr docList; /* the include document list */
1488
1489 /*
1490 * General data on the style sheet document.
1491 */
1492 xmlDocPtr doc; /* the parsed XML stylesheet */
1493 xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and
1494 preserve space elements */
1495 int stripAll; /* strip-space * (1) preserve-space * (-1) */
1496 xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */
1497
1498 /*
1499 * Global variable or parameters.
1500 */
1501 xsltStackElemPtr variables; /* linked list of param and variables */
1502
1503 /*
1504 * Template descriptions.
1505 */
1506 xsltTemplatePtr templates; /* the ordered list of templates */
1507 xmlHashTablePtr templatesHash; /* hash table or wherever compiled
1508 templates information is stored */
1509 struct _xsltCompMatch *rootMatch; /* template based on / */
1510 struct _xsltCompMatch *keyMatch; /* template based on key() */
1511 struct _xsltCompMatch *elemMatch; /* template based on * */
1512 struct _xsltCompMatch *attrMatch; /* template based on @* */
1513 struct _xsltCompMatch *parentMatch; /* template based on .. */
1514 struct _xsltCompMatch *textMatch; /* template based on text() */
1515 struct _xsltCompMatch *piMatch; /* template based on
1516 processing-instruction() */
1517 struct _xsltCompMatch *commentMatch; /* template based on comment() */
1518
1519 /*
1520 * Namespace aliases.
1521 * NOTE: Not used in the refactored code.
1522 */
1523 xmlHashTablePtr nsAliases; /* the namespace alias hash tables */
1524
1525 /*
1526 * Attribute sets.
1527 */
1528 xmlHashTablePtr attributeSets;/* the attribute sets hash tables */
1529
1530 /*
1531 * Namespaces.
1532 * TODO: Eliminate this.
1533 */
1534 xmlHashTablePtr nsHash; /* the set of namespaces in use:
1535 ATTENTION: This is used for
1536 execution of XPath expressions; unfortunately
1537 it restricts the stylesheet to have distinct
1538 prefixes.
1539 TODO: We need to get rid of this.
1540 */
1541 void *nsDefs; /* ATTENTION TODO: This is currently used to store
1542 xsltExtDefPtr (in extensions.c) and
1543 *not* xmlNsPtr.
1544 */
1545
1546 /*
1547 * Key definitions.
1548 */
1549 void *keys; /* key definitions */
1550
1551 /*
1552 * Output related stuff.
1553 */
1554 xmlChar *method; /* the output method */
1555 xmlChar *methodURI; /* associated namespace if any */
1556 xmlChar *version; /* version string */
1557 xmlChar *encoding; /* encoding string */
1558 int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
1559
1560 /*
1561 * Number formatting.
1562 */
1564 int standalone; /* standalone = "yes" | "no" */
1565 xmlChar *doctypePublic; /* doctype-public string */
1566 xmlChar *doctypeSystem; /* doctype-system string */
1567 int indent; /* should output being indented */
1568 xmlChar *mediaType; /* media-type string */
1569
1570 /*
1571 * Precomputed blocks.
1572 */
1573 xsltElemPreCompPtr preComps;/* list of precomputed blocks */
1574 int warnings; /* number of warnings found at compilation */
1575 int errors; /* number of errors found at compilation */
1576
1577 xmlChar *exclPrefix; /* last excluded prefixes */
1578 xmlChar **exclPrefixTab; /* array of excluded prefixes */
1579 int exclPrefixNr; /* number of excluded prefixes in scope */
1580 int exclPrefixMax; /* size of the array */
1581
1582 void *_private; /* user defined data */
1583
1584 /*
1585 * Extensions.
1586 */
1587 xmlHashTablePtr extInfos; /* the extension data */
1588 int extrasNr; /* the number of extras required */
1589
1590 /*
1591 * For keeping track of nested includes
1592 */
1593 xsltDocumentPtr includes; /* points to last nested include */
1594
1595 /*
1596 * dictionary: shared between stylesheet, context and documents.
1597 */
1599 /*
1600 * precompiled attribute value templates.
1601 */
1602 void *attVTs;
1603 /*
1604 * if namespace-alias has an alias for the default stylesheet prefix
1605 * NOTE: Not used in the refactored code.
1606 */
1608 /*
1609 * bypass pre-processing (already done) (used in imports)
1610 */
1612 /*
1613 * all document text strings were internalized
1614 */
1616 /*
1617 * Literal Result Element as Stylesheet c.f. section 2.3
1618 */
1620 /*
1621 * The principal stylesheet
1622 */
1624#ifdef XSLT_REFACTORED
1625 /*
1626 * Compilation context used during compile-time.
1627 */
1628 xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */
1629
1630 xsltPrincipalStylesheetDataPtr principalData;
1631#endif
1632 /*
1633 * Forwards-compatible processing
1634 */
1636
1637 xmlHashTablePtr namedTemplates; /* hash table of named templates */
1638
1639 xmlXPathContextPtr xpathCtxt;
1640};
1641
1649#ifdef XSLT_DEBUG_PROFILE_CACHE
1650 int dbgCachedRVTs;
1651 int dbgReusedRVTs;
1652 int dbgCachedVars;
1653 int dbgReusedVars;
1654#endif
1655};
1656
1657/*
1658 * The in-memory structure corresponding to an XSLT Transformation.
1659 */
1660typedef enum {
1665
1666typedef enum {
1671
1673 xsltStylesheetPtr style; /* the stylesheet used */
1674 xsltOutputType type; /* the type of output */
1675
1676 xsltTemplatePtr templ; /* the current template */
1677 int templNr; /* Nb of templates in the stack */
1678 int templMax; /* Size of the templtes stack */
1679 xsltTemplatePtr *templTab; /* the template stack */
1680
1681 xsltStackElemPtr vars; /* the current variable list */
1682 int varsNr; /* Nb of variable list in the stack */
1683 int varsMax; /* Size of the variable list stack */
1684 xsltStackElemPtr *varsTab; /* the variable list stack */
1685 int varsBase; /* the var base for current templ */
1686
1687 /*
1688 * Extensions
1689 */
1690 xmlHashTablePtr extFunctions; /* the extension functions */
1691 xmlHashTablePtr extElements; /* the extension elements */
1692 xmlHashTablePtr extInfos; /* the extension data */
1693
1694 const xmlChar *mode; /* the current mode */
1695 const xmlChar *modeURI; /* the current mode URI */
1696
1697 xsltDocumentPtr docList; /* the document list */
1698
1699 xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */
1700 xmlNodePtr node; /* the current node being processed */
1701 xmlNodeSetPtr nodeList; /* the current node list */
1702 /* xmlNodePtr current; the node */
1703
1704 xmlDocPtr output; /* the resulting document */
1705 xmlNodePtr insert; /* the insertion node */
1706
1707 xmlXPathContextPtr xpathCtxt; /* the XPath context */
1708 xsltTransformState state; /* the current state */
1709
1710 /*
1711 * Global variables
1712 */
1713 xmlHashTablePtr globalVars; /* the global variables and params */
1714
1715 xmlNodePtr inst; /* the instruction in the stylesheet */
1716
1717 int xinclude; /* should XInclude be processed */
1718
1719 const char * outputFile; /* the output URI if known */
1720
1721 int profile; /* is this run profiled */
1722 long prof; /* the current profiled value */
1723 int profNr; /* Nb of templates in the stack */
1724 int profMax; /* Size of the templtaes stack */
1725 long *profTab; /* the profile template stack */
1726
1727 void *_private; /* user defined data */
1728
1729 int extrasNr; /* the number of extras used */
1730 int extrasMax; /* the number of extras allocated */
1731 xsltRuntimeExtraPtr extras; /* extra per runtime information */
1732
1733 xsltDocumentPtr styleList; /* the stylesheet docs list */
1734 void * sec; /* the security preferences if any */
1735
1736 xmlGenericErrorFunc error; /* a specific error handler */
1737 void * errctx; /* context for the error handler */
1738
1739 xsltSortFunc sortfunc; /* a ctxt specific sort routine */
1740
1741 /*
1742 * handling of temporary Result Value Tree
1743 * (XSLT 1.0 term: "Result Tree Fragment")
1744 */
1745 xmlDocPtr tmpRVT; /* list of RVT without persistance */
1746 xmlDocPtr persistRVT; /* list of persistant RVTs */
1747 int ctxtflags; /* context processing flags */
1748
1749 /*
1750 * Speed optimization when coalescing text nodes
1751 */
1752 const xmlChar *lasttext; /* last text node content */
1753 int lasttsize; /* last text node size */
1754 int lasttuse; /* last text node use */
1755 /*
1756 * Per Context Debugging
1757 */
1758 int debugStatus; /* the context level debug status */
1759 unsigned long* traceCode; /* pointer to the variable holding the mask */
1760
1761 int parserOptions; /* parser options xmlParserOption */
1762
1763 /*
1764 * dictionary: shared between stylesheet, context and documents.
1765 */
1767 xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */
1768 /*
1769 * all document text strings are internalized
1770 */
1774 xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */
1778 void *contextVariable; /* the current variable item */
1779 xmlDocPtr localRVT; /* list of local tree fragments; will be freed when
1780 the instruction which created the fragment
1781 exits */
1782 xmlDocPtr localRVTBase; /* Obsolete */
1783 int keyInitLevel; /* Needed to catch recursive keys issues */
1784 int depth; /* Needed to catch recursions */
1787 unsigned long opLimit;
1788 unsigned long opCount;
1789};
1790
1797#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
1798
1805#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
1806
1813#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
1814
1815/*
1816 * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about
1817 * possible incompatibilities between function pointers and object
1818 * pointers. It is defined in libxml/hash.h within recent versions
1819 * of libxml2, but is put here for compatibility.
1820 */
1821#ifndef XML_CAST_FPTR
1835#define XML_CAST_FPTR(fptr) fptr
1836#endif
1837/*
1838 * Functions associated to the internal types
1839xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
1840 xmlChar *name);
1841 */
1843 xsltNewStylesheet (void);
1854 xmlChar *name);
1857 const xmlChar *nsUri,
1858 const xmlChar *name);
1859
1862 xmlDocPtr doc);
1865 xmlNodePtr cur);
1873 xmlDocPtr doc);
1880XSLTPUBFUN xmlXPathError XSLTCALL
1882 xmlChar *format,
1883 double number,
1884 xmlChar **result);
1885
1888 xmlNodePtr templ);
1893/*
1894 * Extra functions for Result Value Trees
1895 */
1900 xmlDocPtr RVT);
1903 xmlDocPtr RVT);
1906 xmlDocPtr RVT);
1910 xmlXPathObjectPtr obj);
1917 xmlXPathObjectPtr obj,
1918 void *val);
1923 xmlDocPtr RVT);
1924/*
1925 * Extra functions for Attribute Value Templates
1926 */
1932 void *avt,
1935 xsltFreeAVTList (void *avt);
1936
1937/*
1938 * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
1939 */
1940
1942 xsltUninit (void);
1943
1944/************************************************************************
1945 * *
1946 * Compile-time functions for *internal* use only *
1947 * *
1948 ************************************************************************/
1949
1950#ifdef XSLT_REFACTORED
1952 xsltParseSequenceConstructor(
1953 xsltCompilerCtxtPtr cctxt,
1956 xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt,
1958#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1960 xsltRestoreDocumentNamespaces(
1961 xsltNsMapPtr ns,
1962 xmlDocPtr doc);
1963#endif
1964#endif /* XSLT_REFACTORED */
1965
1966/************************************************************************
1967 * *
1968 * Transformation-time functions for *internal* use only *
1969 * *
1970 ************************************************************************/
1973 xsltDocumentPtr doc,
1974 xsltKeyDefPtr keyd);
1977#ifdef __cplusplus
1978}
1979#endif
1980
1981#endif /* __XML_XSLT_H__ */
1982
Arabic default style
Definition: afstyles.h:94
const char * stype[]
Definition: cmds.c:192
Definition: list.h:37
Definition: _locale.h:75
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:31
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
Definition: select.c:41
FxCollectionEntry * cur
GLuint start
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLenum mode
Definition: glext.h:6217
GLuint GLfloat * val
Definition: glext.h:7180
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLuint64EXT * result
Definition: glext.h:11304
const char * filename
Definition: ioapi.h:137
void MSVCRT() terminate()
Definition: cpp.c:716
static unsigned int number
Definition: dsound.c:1479
static size_t elem
Definition: string.c:68
static int strict
Definition: error.c:51
static ATOM item
Definition: dde.c:856
static TCHAR * items[]
Definition: page1.c:45
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
#define test
Definition: rosglue.h:37
const WCHAR * str
Definition: tree.h:434
Definition: dict.c:111
Definition: tree.h:551
Definition: tree.h:489
Definition: tree.h:389
xmlChar * decimalPoint
const xmlChar * nsUri
xmlChar * patternSeparator
struct _xsltDecimalFormat * next
xmlDocPtr doc
struct _xsltDocument * includes
struct _xsltDocument * next
xsltElemPreCompDeallocator free
xsltElemPreCompPtr next
xsltStyleType type
xsltTransformFunction func
xmlNsPtr * nsList
xmlChar * use
xmlChar * match
struct _xsltKeyDef * next
xmlXPathCompExprPtr comp
xmlChar * nameURI
xmlXPathCompExprPtr usecomp
xmlChar * name
xmlNodePtr inst
xmlChar * nameURI
xmlHashTablePtr keys
xmlChar * name
struct _xsltKeyTable * next
xmlFreeFunc deallocate
union _xsltRuntimeExtra::@3468 val
xsltStylePreCompPtr comp
struct _xsltStackElem * next
xmlNodePtr tree
xsltTransformContextPtr context
xmlXPathObjectPtr value
const xmlChar * nameURI
xmlDocPtr fragment
const xmlChar * select
const xmlChar * name
xsltTemplatePtr templ
const xmlChar * lang
xsltStyleType type
const xmlChar * order
const xmlChar * stype
const xmlChar * name
const xmlChar * test
xsltElemPreCompPtr next
xsltTransformFunction func
const xmlChar * select
const xmlChar * use
const xmlChar * case_order
const xmlChar * modeURI
xmlXPathCompExprPtr comp
const xmlChar * ns
xsltNumberData numdata
const xmlChar * mode
const xmlChar * filename
xmlChar * methodURI
xmlChar ** exclPrefixTab
xsltDocumentPtr includes
struct _xsltCompMatch * rootMatch
xmlHashTablePtr nsAliases
struct _xsltStylesheet * next
xmlChar * mediaType
xmlHashTablePtr namedTemplates
xsltTemplatePtr templates
struct _xsltCompMatch * textMatch
xmlXPathContextPtr xpathCtxt
struct _xsltStylesheet * imports
xsltDecimalFormatPtr decimalFormat
xsltStackElemPtr variables
struct _xsltCompMatch * elemMatch
struct _xsltCompMatch * piMatch
xmlHashTablePtr templatesHash
xsltElemPreCompPtr preComps
struct _xsltStylesheet * parent
struct _xsltCompMatch * parentMatch
xmlChar * doctypePublic
xsltDocumentPtr docList
xmlHashTablePtr cdataSection
struct _xsltCompMatch * attrMatch
const xmlChar * defaultAlias
xmlChar * encoding
struct _xsltCompMatch * commentMatch
xmlHashTablePtr stripSpaces
xsltStylesheetPtr principal
xmlChar * doctypeSystem
xmlChar * exclPrefix
xmlHashTablePtr attributeSets
struct _xsltCompMatch * keyMatch
xmlHashTablePtr extInfos
xmlHashTablePtr nsHash
xmlNodePtr elem
struct _xsltTemplate * next
xmlNodePtr content
const xmlChar * modeURI
const xmlChar * name
xmlNsPtr * inheritedNs
const xmlChar * mode
unsigned long time
struct _xsltStylesheet * style
xsltTemplatePtr * templCalledTab
xmlChar * match
const xmlChar * nameURI
xsltStackElemPtr stackItems
xsltTemplatePtr * templTab
xsltTransformState state
const xmlChar * modeURI
xsltStackElemPtr vars
xmlHashTablePtr extElements
xsltDocumentPtr document
xsltTemplatePtr templ
unsigned long * traceCode
xmlHashTablePtr extFunctions
xmlHashTablePtr globalVars
xmlHashTablePtr extInfos
xmlNodeSetPtr nodeList
xsltTransformCachePtr cache
xmlNodePtr initialContextNode
xsltRuntimeExtraPtr extras
xsltTemplatePtr currentTemplateRule
xsltStylesheetPtr style
xsltStackElemPtr * varsTab
xmlGenericErrorFunc error
xmlXPathContextPtr xpathCtxt
xsltDocumentPtr docList
const xmlChar * lasttext
xsltDocumentPtr styleList
const xmlChar * mode
Definition: cookie.c:202
Definition: format.c:58
Definition: fs.h:78
Definition: name.c:39
Definition: mxnamespace.c:45
Definition: dlist.c:348
static const WCHAR lang[]
Definition: wbemdisp.c:287
int ret
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: xmlerror.h:847
void(XMLCALL * xmlFreeFunc)(void *mem)
Definition: xmlmemory.h:57
unsigned char xmlChar
Definition: xmlstring.h:28
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltLoadStylesheetPI(xmlDocPtr doc)
Definition: xslt.c:6873
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultRegister(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj)
Definition: variables.c:213
xsltTransformContext * xsltTransformContextPtr
xsltKeyDef * xsltKeyDefPtr
xsltStyleType
@ XSLT_FUNC_WHEN
@ XSLT_FUNC_CALLTEMPLATE
@ XSLT_FUNC_ELEMENT
@ XSLT_FUNC_APPLYIMPORTS
@ XSLT_FUNC_DOCUMENT
@ XSLT_FUNC_CHOOSE
@ XSLT_FUNC_VARIABLE
@ XSLT_FUNC_WITHPARAM
@ XSLT_FUNC_APPLYTEMPLATES
@ XSLT_FUNC_TEXT
@ XSLT_FUNC_ATTRIBUTE
@ XSLT_FUNC_COPYOF
@ XSLT_FUNC_FOREACH
@ XSLT_FUNC_PI
@ XSLT_FUNC_VALUEOF
@ XSLT_FUNC_NUMBER
@ XSLT_FUNC_SORT
@ XSLT_FUNC_COMMENT
@ XSLT_FUNC_EXTENSION
@ XSLT_FUNC_IF
@ XSLT_FUNC_COPY
@ XSLT_FUNC_PARAM
void(* xsltSortFunc)(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
XSLTPUBFUN void XSLTCALL xsltNumberFormat(xsltTransformContextPtr ctxt, xsltNumberDataPtr data, xmlNodePtr node)
Definition: numbers.c:728
XSLTPUBFUN void XSLTCALL xsltUninit(void)
Definition: xslt.c:217
XSLTPUBFUN void XSLTCALL xsltReleaseRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:328
XSLTPUBFUN void XSLTCALL xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
Definition: xslt.c:1181
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetFile(const xmlChar *filename)
Definition: xslt.c:6711
XSLTPUBFUN int XSLTCALL xsltRegisterPersistRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:394
XSLTPUBFUN void XSLTCALL xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ)
Definition: xslt.c:4878
xsltTransformCache * xsltTransformCachePtr
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc)
Definition: xslt.c:6406
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByName(xsltStylesheetPtr style, xmlChar *name)
Definition: xslt.c:334
xsltElemPreComp * xsltElemPreCompPtr
XSLTPUBFUN void XSLTCALL xsltFreeStylesheet(xsltStylesheetPtr style)
Definition: xslt.c:950
xsltOutputType
@ XSLT_OUTPUT_XML
@ XSLT_OUTPUT_HTML
@ XSLT_OUTPUT_TEXT
XSLTPUBFUN void XSLTCALL xsltFreeAVTList(void *avt)
Definition: attrvt.c:119
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNewStylesheet(void)
Definition: xslt.c:795
XSLTPUBFUN int XSLTCALL xsltIsBlank(xmlChar *str)
Definition: xslt.c:234
xsltStylesheet * xsltStylesheetPtr
xsltKeyTable * xsltKeyTablePtr
XSLTPUBFUN int XSLTCALL xsltAllocateExtraCtxt(xsltTransformContextPtr ctxt)
Definition: xslt.c:825
xsltRuntimeExtra * xsltRuntimeExtraPtr
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByQName(xsltStylesheetPtr style, const xmlChar *nsUri, const xmlChar *name)
Definition: xslt.c:364
xsltTemplate * xsltTemplatePtr
xsltTransformState
@ XSLT_STATE_ERROR
@ XSLT_STATE_STOPPED
@ XSLT_STATE_OK
XSLTPUBFUN void XSLTCALL xsltFreeStackElemList(xsltStackElemPtr elem)
Definition: variables.c:603
XSLTPUBFUN int XSLTCALL xsltRegisterLocalRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:138
XSLTPUBFUN int XSLTCALL xsltRegisterTmpRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:99
xsltDecimalFormat * xsltDecimalFormatPtr
XSLTPUBFUN xmlXPathError XSLTCALL xsltFormatNumberConversion(xsltDecimalFormatPtr self, xmlChar *format, double number, xmlChar **result)
Definition: numbers.c:941
XSLTPUBFUN void XSLTCALL xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr)
Definition: attrvt.c:168
void(* xsltElemPreCompDeallocator)(xsltElemPreCompPtr comp)
XSLTPUBFUN int XSLTCALL xsltParseStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc)
Definition: xslt.c:6543
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetImportedDoc(xmlDocPtr doc, xsltStylesheetPtr style)
Definition: xslt.c:6514
XSLTPUBFUN xmlChar *XSLTCALL xsltEvalAVT(xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node)
Definition: attrvt.c:356
xsltStackElem * xsltStackElemPtr
XSLTPUBFUN xmlDocPtr XSLTCALL xsltCreateRVT(xsltTransformContextPtr ctxt)
Definition: variables.c:44
XSLTPUBFUN int XSLTCALL xsltFlagRVTs(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj, void *val)
Definition: variables.c:237
XSLTPUBFUN int XSLTCALL xsltAllocateExtra(xsltStylesheetPtr style)
Definition: xslt.c:809
xsltStylePreComp * xsltStylePreCompPtr
XSLTPUBFUN void XSLTCALL xsltFreeRVTs(xsltTransformContextPtr ctxt)
Definition: variables.c:416
XSLTPUBFUN int XSLTCALL xsltInitAllDocKeys(xsltTransformContextPtr ctxt)
Definition: keys.c:535
void(* xsltTransformFunction)(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr comp)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetDoc(xmlDocPtr doc)
Definition: xslt.c:6695
xsltDocument * xsltDocumentPtr
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultFinalize(xsltTransformContextPtr ctxt)
Definition: variables.c:187
XSLTPUBFUN int XSLTCALL xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocumentPtr doc, xsltKeyDefPtr keyd)
Definition: keys.c:604
#define XSLTCALL
Definition: xsltexports.h:39
#define XSLTPUBFUN
Definition: xsltexports.h:48