ReactOS  0.4.13-dev-982-g9853eab
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
28 extern "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 
93 extern 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 
114 #define XSLT_REFACTORED_XPATHCOMP
115 
116 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
117 
118 extern const xmlChar *xsltConstNamespaceNameXSLT;
119 
125 #define IS_XSLT_ELEM_FAST(n) \
126  (((n) != NULL) && ((n)->ns != NULL) && \
127  ((n)->ns->href == xsltConstNamespaceNameXSLT))
128 
134 #define IS_XSLT_ATTR_FAST(a) \
135  (((a) != NULL) && ((a)->ns != NULL) && \
136  ((a)->ns->href == xsltConstNamespaceNameXSLT))
137 
143 #define XSLT_HAS_INTERNAL_NSMAP(s) \
144  (((s) != NULL) && ((s)->principal) && \
145  ((s)->principal->principalData) && \
146  ((s)->principal->principalData->nsMap))
147 
153 #define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap)
154 
155 #else /* XSLT_REFACTORED_XSLT_NSCOMP */
156 
162 #define IS_XSLT_ELEM_FAST(n) \
163  (((n) != NULL) && ((n)->ns != NULL) && \
164  (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
165 
171 #define IS_XSLT_ATTR_FAST(a) \
172  (((a) != NULL) && ((a)->ns != NULL) && \
173  (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE)))
174 
175 
176 #endif /* XSLT_REFACTORED_XSLT_NSCOMP */
177 
178 
187 /* #define XSLT_REFACTORED_MANDATORY_VERSION */
188 
194 typedef struct _xsltPointerList xsltPointerList;
195 typedef xsltPointerList *xsltPointerListPtr;
196 struct _xsltPointerList {
197  void **items;
198  int number;
199  int size;
200 };
201 
202 #endif
203 
210 /* #define XSLT_REFACTORED_PARSING */
211 
217 #define XSLT_MAX_SORT 15
218 
224 #define XSLT_PAT_NO_PRIORITY -12345789
225 
234  void *info; /* pointer to the extra data */
235  xmlFreeFunc deallocate; /* pointer to the deallocation routine */
236  union { /* dual-purpose field */
237  void *ptr; /* data not needing deallocation */
238  int ival; /* integer value storage */
239  } val;
240 };
241 
249 #define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
250 
257 #define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
258 
265 #define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ
266 
275  struct _xsltTemplate *next;/* chained list sorted by priority */
276  struct _xsltStylesheet *style;/* the containing stylesheet */
277  xmlChar *match; /* the matching string */
278  float priority; /* as given from the stylesheet, not computed */
279  const xmlChar *name; /* the local part of the name QName */
280  const xmlChar *nameURI; /* the URI part of the name QName */
281  const xmlChar *mode;/* the local part of the mode QName */
282  const xmlChar *modeURI;/* the URI part of the mode QName */
283  xmlNodePtr content; /* the template replacement value */
284  xmlNodePtr elem; /* the source element */
285 
286  /*
287  * TODO: @inheritedNsNr and @inheritedNs won't be used in the
288  * refactored code.
289  */
290  int inheritedNsNr; /* number of inherited namespaces */
291  xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */
292 
293  /* Profiling information */
294  int nbCalls; /* the number of time the template was called */
295  unsigned long time; /* the time spent in this template */
296  void *params; /* xsl:param instructions */
297 
298  int templNr; /* Nb of templates in the stack */
299  int templMax; /* Size of the templtes stack */
300  xsltTemplatePtr *templCalledTab; /* templates called */
301  int *templCountTab; /* .. and how often */
302 };
303 
312  struct _xsltDecimalFormat *next; /* chained list */
314  /* Used for interpretation of pattern */
317  /* May appear in result */
320  xmlChar *noNumber; /* Not-a-number */
321  /* Used for interpretation of pattern and may appear in result */
327  const xmlChar *nsUri;
328 };
329 
338  struct _xsltDocument *next; /* documents are kept in a chained list */
339  int main; /* is this the main document */
340  xmlDocPtr doc; /* the parsed document */
341  void *keys; /* key tables storage */
342  struct _xsltDocument *includes; /* subsidiary includes */
343  int preproc; /* pre-processing already done */
345 };
346 
352 typedef struct _xsltKeyDef xsltKeyDef;
354 struct _xsltKeyDef {
355  struct _xsltKeyDef *next;
361  xmlXPathCompExprPtr comp;
362  xmlXPathCompExprPtr usecomp;
363  xmlNsPtr *nsList; /* the namespaces in scope */
364  int nsNr; /* the number of namespaces in scope */
365 };
366 
380 };
381 
382 /*
383  * The in-memory structure corresponding to an XSLT Stylesheet.
384  * NOTE: most of the content is simply linked from the doc tree
385  * structure, no specific allocation is made.
386  */
389 
392 
401 
415  xsltElemPreCompPtr comp);
416 
426  int nbsorts);
427 
428 typedef enum {
451 #ifdef XSLT_REFACTORED
452  ,
453  XSLT_FUNC_OTHERWISE,
454  XSLT_FUNC_FALLBACK,
455  XSLT_FUNC_MESSAGE,
456  XSLT_FUNC_INCLUDE,
457  XSLT_FUNC_ATTRSET,
458  XSLT_FUNC_LITERAL_RESULT_ELEMENT,
459  XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
460 #endif
461 } xsltStyleType;
462 
470 
480  xsltElemPreCompPtr next; /* next item in the global chained
481  list hold by xsltStylesheet. */
482  xsltStyleType type; /* type of the element */
483  xsltTransformFunction func; /* handling function */
484  xmlNodePtr inst; /* the node in the stylesheet's tree
485  corresponding to this item */
486 
487  /* end of common part */
488  xsltElemPreCompDeallocator free; /* the deallocator */
489 };
490 
502 
503 #ifdef XSLT_REFACTORED
504 
505 /*
506 * Some pointer-list utility functions.
507 */
508 XSLTPUBFUN xsltPointerListPtr XSLTCALL
509  xsltPointerListCreate (int initialSize);
510 XSLTPUBFUN void XSLTCALL
511  xsltPointerListFree (xsltPointerListPtr list);
512 XSLTPUBFUN void XSLTCALL
513  xsltPointerListClear (xsltPointerListPtr list);
515  xsltPointerListAddSize (xsltPointerListPtr list,
516  void *item,
517  int initialSize);
518 
519 /************************************************************************
520  * *
521  * Refactored structures *
522  * *
523  ************************************************************************/
524 
525 typedef struct _xsltNsListContainer xsltNsListContainer;
526 typedef xsltNsListContainer *xsltNsListContainerPtr;
527 struct _xsltNsListContainer {
528  xmlNsPtr *list;
529  int totalNumber;
530  int xpathNumber;
531 };
532 
542 #define XSLT_ITEM_COMPATIBILITY_FIELDS \
543  xsltElemPreCompPtr next;\
544  xsltStyleType type;\
545  xsltTransformFunction func;\
546  xmlNodePtr inst;
547 
554 #define XSLT_ITEM_NAVIGATION_FIELDS
555 /*
556  xsltStylePreCompPtr parent;\
557  xsltStylePreCompPtr children;\
558  xsltStylePreCompPtr nextItem;
559 */
560 
566 #define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs;
567 
573 #define XSLT_ITEM_COMMON_FIELDS \
574  XSLT_ITEM_COMPATIBILITY_FIELDS \
575  XSLT_ITEM_NAVIGATION_FIELDS \
576  XSLT_ITEM_NSINSCOPE_FIELDS
577 
591 struct _xsltStylePreComp {
592  xsltElemPreCompPtr next; /* next item in the global chained
593  list hold by xsltStylesheet */
594  xsltStyleType type; /* type of the item */
595  xsltTransformFunction func; /* handling function */
596  xmlNodePtr inst; /* the node in the stylesheet's tree
597  corresponding to this item. */
598  /* Currently no navigational fields. */
599  xsltNsListContainerPtr inScopeNs;
600 };
601 
610 typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem;
611 typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr;
612 
613 struct _xsltStyleBasicEmptyItem {
614  XSLT_ITEM_COMMON_FIELDS
615 };
616 
623 typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem;
624 typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr;
625 
626 struct _xsltStyleBasicExpressionItem {
627  XSLT_ITEM_COMMON_FIELDS
628 
629  const xmlChar *select; /* TODO: Change this to "expression". */
630  xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */
631 };
632 
633 /************************************************************************
634  * *
635  * XSLT-instructions/declarations *
636  * *
637  ************************************************************************/
638 
650 typedef struct _xsltStyleItemElement xsltStyleItemElement;
651 typedef xsltStyleItemElement *xsltStyleItemElementPtr;
652 
653 struct _xsltStyleItemElement {
654  XSLT_ITEM_COMMON_FIELDS
655 
656  const xmlChar *use;
657  int has_use;
658  const xmlChar *name;
659  int has_name;
660  const xmlChar *ns;
661  const xmlChar *nsPrefix;
662  int has_ns;
663 };
664 
675 typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute;
676 typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr;
677 
678 struct _xsltStyleItemAttribute {
679  XSLT_ITEM_COMMON_FIELDS
680  const xmlChar *name;
681  int has_name;
682  const xmlChar *ns;
683  const xmlChar *nsPrefix;
684  int has_ns;
685 };
686 
696 typedef struct _xsltStyleItemText xsltStyleItemText;
697 typedef xsltStyleItemText *xsltStyleItemTextPtr;
698 
699 struct _xsltStyleItemText {
700  XSLT_ITEM_COMMON_FIELDS
701  int noescape; /* text */
702 };
703 
712 typedef xsltStyleBasicEmptyItem xsltStyleItemComment;
713 typedef xsltStyleItemComment *xsltStyleItemCommentPtr;
714 
724 typedef struct _xsltStyleItemPI xsltStyleItemPI;
725 typedef xsltStyleItemPI *xsltStyleItemPIPtr;
726 
727 struct _xsltStyleItemPI {
728  XSLT_ITEM_COMMON_FIELDS
729  const xmlChar *name;
730  int has_name;
731 };
732 
739 typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports;
740 typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr;
741 
752 typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates;
753 typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr;
754 
755 struct _xsltStyleItemApplyTemplates {
756  XSLT_ITEM_COMMON_FIELDS
757 
758  const xmlChar *mode; /* apply-templates */
759  const xmlChar *modeURI; /* apply-templates */
760  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
761  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
762  /* TODO: with-params */
763 };
764 
774 typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate;
775 typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr;
776 
777 struct _xsltStyleItemCallTemplate {
778  XSLT_ITEM_COMMON_FIELDS
779 
780  xsltTemplatePtr templ; /* call-template */
781  const xmlChar *name; /* element, attribute, pi */
782  int has_name; /* element, attribute, pi */
783  const xmlChar *ns; /* element */
784  int has_ns; /* element */
785  /* TODO: with-params */
786 };
787 
797 typedef struct _xsltStyleItemCopy xsltStyleItemCopy;
798 typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
799 
800 struct _xsltStyleItemCopy {
801  XSLT_ITEM_COMMON_FIELDS
802  const xmlChar *use; /* copy, element */
803  int has_use; /* copy, element */
804 };
805 
815 typedef struct _xsltStyleItemIf xsltStyleItemIf;
816 typedef xsltStyleItemIf *xsltStyleItemIfPtr;
817 
818 struct _xsltStyleItemIf {
819  XSLT_ITEM_COMMON_FIELDS
820 
821  const xmlChar *test; /* if */
822  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
823 };
824 
825 
833 typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf;
834 typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr;
835 
844 typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf;
845 typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr;
846 
847 struct _xsltStyleItemValueOf {
848  XSLT_ITEM_COMMON_FIELDS
849 
850  const xmlChar *select;
851  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
852  int noescape;
853 };
854 
870 typedef struct _xsltStyleItemNumber xsltStyleItemNumber;
871 typedef xsltStyleItemNumber *xsltStyleItemNumberPtr;
872 
873 struct _xsltStyleItemNumber {
874  XSLT_ITEM_COMMON_FIELDS
875  xsltNumberData numdata; /* number */
876 };
877 
886 typedef xsltStyleBasicEmptyItem xsltStyleItemChoose;
887 typedef xsltStyleItemChoose *xsltStyleItemChoosePtr;
888 
897 typedef xsltStyleBasicEmptyItem xsltStyleItemFallback;
898 typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr;
899 
909 typedef xsltStyleBasicExpressionItem xsltStyleItemForEach;
910 typedef xsltStyleItemForEach *xsltStyleItemForEachPtr;
911 
921 typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
922 typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
923 
924 struct _xsltStyleItemMessage {
925  XSLT_ITEM_COMMON_FIELDS
926  int terminate;
927 };
928 
934 typedef struct _xsltStyleItemDocument xsltStyleItemDocument;
935 typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr;
936 
937 struct _xsltStyleItemDocument {
938  XSLT_ITEM_COMMON_FIELDS
939  int ver11; /* assigned: in xsltDocumentComp;
940  read: nowhere;
941  TODO: Check if we need. */
942  const xmlChar *filename; /* document URL */
943  int has_filename;
944 };
945 
946 /************************************************************************
947  * *
948  * Non-instructions (actually properties of instructions/declarations) *
949  * *
950  ************************************************************************/
951 
964 typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable;
965 typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr;
966 
967 struct _xsltStyleBasicItemVariable {
968  XSLT_ITEM_COMMON_FIELDS
969 
970  const xmlChar *select;
971  xmlXPathCompExprPtr comp;
972 
973  const xmlChar *name;
974  int has_name;
975  const xmlChar *ns;
976  int has_ns;
977 };
978 
989 typedef xsltStyleBasicItemVariable xsltStyleItemVariable;
990 typedef xsltStyleItemVariable *xsltStyleItemVariablePtr;
991 
1002 typedef struct _xsltStyleItemParam xsltStyleItemParam;
1003 typedef xsltStyleItemParam *xsltStyleItemParamPtr;
1004 
1005 struct _xsltStyleItemParam {
1006  XSLT_ITEM_COMMON_FIELDS
1007 
1008  const xmlChar *select;
1009  xmlXPathCompExprPtr comp;
1010 
1011  const xmlChar *name;
1012  int has_name;
1013  const xmlChar *ns;
1014  int has_ns;
1015 };
1016 
1026 typedef xsltStyleBasicItemVariable xsltStyleItemWithParam;
1027 typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr;
1028 
1041 typedef struct _xsltStyleItemSort xsltStyleItemSort;
1042 typedef xsltStyleItemSort *xsltStyleItemSortPtr;
1043 
1044 struct _xsltStyleItemSort {
1045  XSLT_ITEM_COMMON_FIELDS
1046 
1047  const xmlChar *stype; /* sort */
1048  int has_stype; /* sort */
1049  int number; /* sort */
1050  const xmlChar *order; /* sort */
1051  int has_order; /* sort */
1052  int descending; /* sort */
1053  const xmlChar *lang; /* sort */
1054  int has_lang; /* sort */
1055  xsltLocale locale; /* sort */
1056  const xmlChar *case_order; /* sort */
1057  int lower_first; /* sort */
1058 
1059  const xmlChar *use;
1060  int has_use;
1061 
1062  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1063 
1064  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1065 };
1066 
1067 
1077 typedef struct _xsltStyleItemWhen xsltStyleItemWhen;
1078 typedef xsltStyleItemWhen *xsltStyleItemWhenPtr;
1079 
1080 struct _xsltStyleItemWhen {
1081  XSLT_ITEM_COMMON_FIELDS
1082 
1083  const xmlChar *test;
1084  xmlXPathCompExprPtr comp;
1085 };
1086 
1095 typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise;
1096 typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr;
1097 
1098 struct _xsltStyleItemOtherwise {
1099  XSLT_ITEM_COMMON_FIELDS
1100 };
1101 
1102 typedef struct _xsltStyleItemInclude xsltStyleItemInclude;
1103 typedef xsltStyleItemInclude *xsltStyleItemIncludePtr;
1104 
1105 struct _xsltStyleItemInclude {
1106  XSLT_ITEM_COMMON_FIELDS
1107  xsltDocumentPtr include;
1108 };
1109 
1110 /************************************************************************
1111  * *
1112  * XSLT elements in forwards-compatible mode *
1113  * *
1114  ************************************************************************/
1115 
1116 typedef struct _xsltStyleItemUknown xsltStyleItemUknown;
1117 typedef xsltStyleItemUknown *xsltStyleItemUknownPtr;
1118 struct _xsltStyleItemUknown {
1119  XSLT_ITEM_COMMON_FIELDS
1120 };
1121 
1122 
1123 /************************************************************************
1124  * *
1125  * Extension elements *
1126  * *
1127  ************************************************************************/
1128 
1129 /*
1130  * xsltStyleItemExtElement:
1131  *
1132  * Reflects extension elements.
1133  *
1134  * NOTE: Due to the fact that the structure xsltElemPreComp is most
1135  * probably already heavily in use out there by users, so we cannot
1136  * easily change it, we'll create an intermediate structure which will
1137  * hold an xsltElemPreCompPtr.
1138  * BIG NOTE: The only problem I see here is that the user processes the
1139  * content of the stylesheet tree, possibly he'll lookup the node->psvi
1140  * fields in order to find subsequent extension functions.
1141  * In this case, the user's code will break, since the node->psvi
1142  * field will hold now the xsltStyleItemExtElementPtr and not
1143  * the xsltElemPreCompPtr.
1144  * However the place where the structure is anchored in the node-tree,
1145  * namely node->psvi, has beed already once been moved from node->_private
1146  * to node->psvi, so we have a precedent here, which, I think, should allow
1147  * us to change such semantics without headaches.
1148  */
1149 typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
1150 typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
1151 struct _xsltStyleItemExtElement {
1152  XSLT_ITEM_COMMON_FIELDS
1154 };
1155 
1156 /************************************************************************
1157  * *
1158  * Literal result elements *
1159  * *
1160  ************************************************************************/
1161 
1162 typedef struct _xsltEffectiveNs xsltEffectiveNs;
1163 typedef xsltEffectiveNs *xsltEffectiveNsPtr;
1164 struct _xsltEffectiveNs {
1165  xsltEffectiveNsPtr nextInStore; /* storage next */
1166  xsltEffectiveNsPtr next; /* next item in the list */
1167  const xmlChar *prefix;
1168  const xmlChar *nsName;
1169  /*
1170  * Indicates if eclared on the literal result element; dunno if really
1171  * needed.
1172  */
1173  int holdByElem;
1174 };
1175 
1176 /*
1177  * Info for literal result elements.
1178  * This will be set on the elem->psvi field and will be
1179  * shared by literal result elements, which have the same
1180  * excluded result namespaces; i.e., this *won't* be created uniquely
1181  * for every literal result element.
1182  */
1183 typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo;
1184 typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr;
1185 struct _xsltStyleItemLRElementInfo {
1186  XSLT_ITEM_COMMON_FIELDS
1187  /*
1188  * @effectiveNs is the set of effective ns-nodes
1189  * on the literal result element, which will be added to the result
1190  * element if not already existing in the result tree.
1191  * This means that excluded namespaces (via exclude-result-prefixes,
1192  * extension-element-prefixes and the XSLT namespace) not added
1193  * to the set.
1194  * Namespace-aliasing was applied on the @effectiveNs.
1195  */
1196  xsltEffectiveNsPtr effectiveNs;
1197 
1198 };
1199 
1200 #ifdef XSLT_REFACTORED
1201 
1202 typedef struct _xsltNsAlias xsltNsAlias;
1203 typedef xsltNsAlias *xsltNsAliasPtr;
1204 struct _xsltNsAlias {
1205  xsltNsAliasPtr next; /* next in the list */
1206  xmlNsPtr literalNs;
1207  xmlNsPtr targetNs;
1208  xmlDocPtr docOfTargetNs;
1209 };
1210 #endif
1211 
1212 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1213 
1214 typedef struct _xsltNsMap xsltNsMap;
1215 typedef xsltNsMap *xsltNsMapPtr;
1216 struct _xsltNsMap {
1217  xsltNsMapPtr next; /* next in the list */
1218  xmlDocPtr doc;
1219  xmlNodePtr elem; /* the element holding the ns-decl */
1220  xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */
1221  const xmlChar *origNsName; /* the original XML namespace name */
1222  const xmlChar *newNsName; /* the mapped XML namespace name */
1223 };
1224 #endif
1225 
1226 /************************************************************************
1227  * *
1228  * Compile-time structures for *internal* use only *
1229  * *
1230  ************************************************************************/
1231 
1232 typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData;
1233 typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr;
1234 
1235 typedef struct _xsltNsList xsltNsList;
1236 typedef xsltNsList *xsltNsListPtr;
1237 struct _xsltNsList {
1238  xsltNsListPtr next; /* next in the list */
1239  xmlNsPtr ns;
1240 };
1241 
1242 /*
1243 * xsltVarInfo:
1244 *
1245 * Used at compilation time for parameters and variables.
1246 */
1247 typedef struct _xsltVarInfo xsltVarInfo;
1248 typedef xsltVarInfo *xsltVarInfoPtr;
1249 struct _xsltVarInfo {
1250  xsltVarInfoPtr next; /* next in the list */
1251  xsltVarInfoPtr prev;
1252  int depth; /* the depth in the tree */
1253  const xmlChar *name;
1254  const xmlChar *nsName;
1255 };
1256 
1262 typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo;
1263 typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr;
1264 struct _xsltCompilerNodeInfo {
1265  xsltCompilerNodeInfoPtr next;
1266  xsltCompilerNodeInfoPtr prev;
1267  xmlNodePtr node;
1268  int depth;
1269  xsltTemplatePtr templ; /* The owning template */
1270  int category; /* XSLT element, LR-element or
1271  extension element */
1273  xsltElemPreCompPtr item; /* The compiled information */
1274  /* The current in-scope namespaces */
1275  xsltNsListContainerPtr inScopeNs;
1276  /* The current excluded result namespaces */
1277  xsltPointerListPtr exclResultNs;
1278  /* The current extension instruction namespaces */
1279  xsltPointerListPtr extElemNs;
1280 
1281  /* The current info for literal result elements. */
1282  xsltStyleItemLRElementInfoPtr litResElemInfo;
1283  /*
1284  * Set to 1 if in-scope namespaces changed,
1285  * or excluded result namespaces changed,
1286  * or extension element namespaces changed.
1287  * This will trigger creation of new infos
1288  * for literal result elements.
1289  */
1290  int nsChanged;
1291  int preserveWhitespace;
1292  int stripWhitespace;
1293  int isRoot; /* whether this is the stylesheet's root node */
1294  int forwardsCompat; /* whether forwards-compatible mode is enabled */
1295  /* whether the content of an extension element was processed */
1296  int extContentHandled;
1297  /* the type of the current child */
1298  xsltStyleType curChildType;
1299 };
1300 
1306 #define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
1307 
1308 typedef enum {
1309  XSLT_ERROR_SEVERITY_ERROR = 0,
1310  XSLT_ERROR_SEVERITY_WARNING
1311 } xsltErrorSeverityType;
1312 
1313 typedef struct _xsltCompilerCtxt xsltCompilerCtxt;
1314 typedef xsltCompilerCtxt *xsltCompilerCtxtPtr;
1315 struct _xsltCompilerCtxt {
1316  void *errorCtxt; /* user specific error context */
1317  /*
1318  * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */
1319  xsltErrorSeverityType errSeverity;
1320  int warnings; /* TODO: number of warnings found at
1321  compilation */
1322  int errors; /* TODO: number of errors found at
1323  compilation */
1324  xmlDictPtr dict;
1326  int simplified; /* whether this is a simplified stylesheet */
1327  /* TODO: structured/unstructured error contexts. */
1328  int depth; /* Current depth of processing */
1329 
1330  xsltCompilerNodeInfoPtr inode;
1331  xsltCompilerNodeInfoPtr inodeList;
1332  xsltCompilerNodeInfoPtr inodeLast;
1333  xsltPointerListPtr tmpList; /* Used for various purposes */
1334  /*
1335  * The XSLT version as specified by the stylesheet's root element.
1336  */
1337  int isInclude;
1338  int hasForwardsCompat; /* whether forwards-compatible mode was used
1339  in a parsing episode */
1340  int maxNodeInfos; /* TEMP TODO: just for the interest */
1341  int maxLREs; /* TEMP TODO: just for the interest */
1342  /*
1343  * In order to keep the old behaviour, applying strict rules of
1344  * the spec can be turned off. This has effect only on special
1345  * mechanisms like whitespace-stripping in the stylesheet.
1346  */
1347  int strict;
1348  xsltPrincipalStylesheetDataPtr psData;
1349 #ifdef XSLT_REFACTORED_XPATHCOMP
1350  xmlXPathContextPtr xpathCtxt;
1351 #endif
1352  xsltStyleItemUknownPtr unknownItem;
1353  int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */
1354  xsltNsAliasPtr nsAliases;
1355  xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */
1356  xsltVarInfoPtr ivar; /* topmost local variable/param. */
1357 };
1358 
1359 #else /* XSLT_REFACTORED */
1360 /*
1361 * The old structures before refactoring.
1362 */
1363 
1371  xsltElemPreCompPtr next; /* chained list */
1372  xsltStyleType type; /* type of the element */
1373  xsltTransformFunction func; /* handling function */
1374  xmlNodePtr inst; /* the instruction */
1375 
1376  /*
1377  * Pre computed values.
1378  */
1379 
1380  const xmlChar *stype; /* sort */
1381  int has_stype; /* sort */
1382  int number; /* sort */
1383  const xmlChar *order; /* sort */
1384  int has_order; /* sort */
1385  int descending; /* sort */
1386  const xmlChar *lang; /* sort */
1387  int has_lang; /* sort */
1388  xsltLocale locale; /* sort */
1389  const xmlChar *case_order; /* sort */
1390  int lower_first; /* sort */
1391 
1392  const xmlChar *use; /* copy, element */
1393  int has_use; /* copy, element */
1394 
1395  int noescape; /* text */
1396 
1397  const xmlChar *name; /* element, attribute, pi */
1398  int has_name; /* element, attribute, pi */
1399  const xmlChar *ns; /* element */
1400  int has_ns; /* element */
1401 
1402  const xmlChar *mode; /* apply-templates */
1403  const xmlChar *modeURI; /* apply-templates */
1404 
1405  const xmlChar *test; /* if */
1406 
1407  xsltTemplatePtr templ; /* call-template */
1408 
1409  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1410 
1411  int ver11; /* document */
1412  const xmlChar *filename; /* document URL */
1413  int has_filename; /* document */
1414 
1415  xsltNumberData numdata; /* number */
1416 
1417  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1418  xmlNsPtr *nsList; /* the namespaces in scope */
1419  int nsNr; /* the number of namespaces in scope */
1420 };
1421 
1422 #endif /* XSLT_REFACTORED */
1423 
1424 
1425 /*
1426  * The in-memory structure corresponding to an XSLT Variable
1427  * or Param.
1428  */
1432  struct _xsltStackElem *next;/* chained list */
1433  xsltStylePreCompPtr comp; /* the compiled form */
1434  int computed; /* was the evaluation done */
1435  const xmlChar *name; /* the local part of the name QName */
1436  const xmlChar *nameURI; /* the URI part of the name QName */
1437  const xmlChar *select; /* the eval string */
1438  xmlNodePtr tree; /* the sequence constructor if no eval
1439  string or the location */
1440  xmlXPathObjectPtr value; /* The value if computed */
1441  xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0)
1442  which are bound to the variable's lifetime. */
1443  int level; /* the depth in the tree;
1444  -1 if persistent (e.g. a given xsl:with-param) */
1445  xsltTransformContextPtr context; /* The transformation context; needed to cache
1446  the variables */
1447  int flags;
1448 };
1449 
1450 #ifdef XSLT_REFACTORED
1451 
1452 struct _xsltPrincipalStylesheetData {
1453  /*
1454  * Namespace dictionary for ns-prefixes and ns-names:
1455  * TODO: Shared between stylesheets, and XPath mechanisms.
1456  * Not used yet.
1457  */
1458  xmlDictPtr namespaceDict;
1459  /*
1460  * Global list of in-scope namespaces.
1461  */
1462  xsltPointerListPtr inScopeNamespaces;
1463  /*
1464  * Global list of information for [xsl:]excluded-result-prefixes.
1465  */
1466  xsltPointerListPtr exclResultNamespaces;
1467  /*
1468  * Global list of information for [xsl:]extension-element-prefixes.
1469  */
1470  xsltPointerListPtr extElemNamespaces;
1471  xsltEffectiveNsPtr effectiveNs;
1472 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1473  /*
1474  * Namespace name map to get rid of string comparison of namespace names.
1475  */
1476  xsltNsMapPtr nsMap;
1477 #endif
1478 };
1479 
1480 
1481 #endif
1482 /*
1483  * Note that we added a @compCtxt field to anchor an stylesheet compilation
1484  * context, since, due to historical reasons, various compile-time function
1485  * take only the stylesheet as argument and not a compilation context.
1486  */
1488  /*
1489  * The stylesheet import relation is kept as a tree.
1490  */
1494 
1495  xsltDocumentPtr docList; /* the include document list */
1496 
1497  /*
1498  * General data on the style sheet document.
1499  */
1500  xmlDocPtr doc; /* the parsed XML stylesheet */
1501  xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and
1502  preserve space elements */
1503  int stripAll; /* strip-space * (1) preserve-space * (-1) */
1504  xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */
1505 
1506  /*
1507  * Global variable or parameters.
1508  */
1509  xsltStackElemPtr variables; /* linked list of param and variables */
1510 
1511  /*
1512  * Template descriptions.
1513  */
1514  xsltTemplatePtr templates; /* the ordered list of templates */
1515  void *templatesHash; /* hash table or wherever compiled templates
1516  information is stored */
1517  void *rootMatch; /* template based on / */
1518  void *keyMatch; /* template based on key() */
1519  void *elemMatch; /* template based on * */
1520  void *attrMatch; /* template based on @* */
1521  void *parentMatch; /* template based on .. */
1522  void *textMatch; /* template based on text() */
1523  void *piMatch; /* template based on processing-instruction() */
1524  void *commentMatch; /* template based on comment() */
1525 
1526  /*
1527  * Namespace aliases.
1528  * NOTE: Not used in the refactored code.
1529  */
1530  xmlHashTablePtr nsAliases; /* the namespace alias hash tables */
1531 
1532  /*
1533  * Attribute sets.
1534  */
1535  xmlHashTablePtr attributeSets;/* the attribute sets hash tables */
1536 
1537  /*
1538  * Namespaces.
1539  * TODO: Eliminate this.
1540  */
1541  xmlHashTablePtr nsHash; /* the set of namespaces in use:
1542  ATTENTION: This is used for
1543  execution of XPath expressions; unfortunately
1544  it restricts the stylesheet to have distinct
1545  prefixes.
1546  TODO: We need to get rid of this.
1547  */
1548  void *nsDefs; /* ATTENTION TODO: This is currently used to store
1549  xsltExtDefPtr (in extensions.c) and
1550  *not* xmlNsPtr.
1551  */
1552 
1553  /*
1554  * Key definitions.
1555  */
1556  void *keys; /* key definitions */
1557 
1558  /*
1559  * Output related stuff.
1560  */
1561  xmlChar *method; /* the output method */
1562  xmlChar *methodURI; /* associated namespace if any */
1563  xmlChar *version; /* version string */
1564  xmlChar *encoding; /* encoding string */
1565  int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
1566 
1567  /*
1568  * Number formatting.
1569  */
1571  int standalone; /* standalone = "yes" | "no" */
1572  xmlChar *doctypePublic; /* doctype-public string */
1573  xmlChar *doctypeSystem; /* doctype-system string */
1574  int indent; /* should output being indented */
1575  xmlChar *mediaType; /* media-type string */
1576 
1577  /*
1578  * Precomputed blocks.
1579  */
1580  xsltElemPreCompPtr preComps;/* list of precomputed blocks */
1581  int warnings; /* number of warnings found at compilation */
1582  int errors; /* number of errors found at compilation */
1583 
1584  xmlChar *exclPrefix; /* last excluded prefixes */
1585  xmlChar **exclPrefixTab; /* array of excluded prefixes */
1586  int exclPrefixNr; /* number of excluded prefixes in scope */
1587  int exclPrefixMax; /* size of the array */
1588 
1589  void *_private; /* user defined data */
1590 
1591  /*
1592  * Extensions.
1593  */
1594  xmlHashTablePtr extInfos; /* the extension data */
1595  int extrasNr; /* the number of extras required */
1596 
1597  /*
1598  * For keeping track of nested includes
1599  */
1600  xsltDocumentPtr includes; /* points to last nested include */
1601 
1602  /*
1603  * dictionary: shared between stylesheet, context and documents.
1604  */
1606  /*
1607  * precompiled attribute value templates.
1608  */
1609  void *attVTs;
1610  /*
1611  * if namespace-alias has an alias for the default stylesheet prefix
1612  * NOTE: Not used in the refactored code.
1613  */
1615  /*
1616  * bypass pre-processing (already done) (used in imports)
1617  */
1619  /*
1620  * all document text strings were internalized
1621  */
1623  /*
1624  * Literal Result Element as Stylesheet c.f. section 2.3
1625  */
1627  /*
1628  * The principal stylesheet
1629  */
1631 #ifdef XSLT_REFACTORED
1632  /*
1633  * Compilation context used during compile-time.
1634  */
1635  xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */
1636 
1637  xsltPrincipalStylesheetDataPtr principalData;
1638 #endif
1639  /*
1640  * Forwards-compatible processing
1641  */
1643 
1644  xmlHashTablePtr namedTemplates; /* hash table of named templates */
1645 };
1646 
1651  int nbRVT;
1654 #ifdef XSLT_DEBUG_PROFILE_CACHE
1655  int dbgCachedRVTs;
1656  int dbgReusedRVTs;
1657  int dbgCachedVars;
1658  int dbgReusedVars;
1659 #endif
1660 };
1661 
1662 /*
1663  * The in-memory structure corresponding to an XSLT Transformation.
1664  */
1665 typedef enum {
1669 } xsltOutputType;
1670 
1671 typedef enum {
1676 
1678  xsltStylesheetPtr style; /* the stylesheet used */
1679  xsltOutputType type; /* the type of output */
1680 
1681  xsltTemplatePtr templ; /* the current template */
1682  int templNr; /* Nb of templates in the stack */
1683  int templMax; /* Size of the templtes stack */
1684  xsltTemplatePtr *templTab; /* the template stack */
1685 
1686  xsltStackElemPtr vars; /* the current variable list */
1687  int varsNr; /* Nb of variable list in the stack */
1688  int varsMax; /* Size of the variable list stack */
1689  xsltStackElemPtr *varsTab; /* the variable list stack */
1690  int varsBase; /* the var base for current templ */
1691 
1692  /*
1693  * Extensions
1694  */
1695  xmlHashTablePtr extFunctions; /* the extension functions */
1696  xmlHashTablePtr extElements; /* the extension elements */
1697  xmlHashTablePtr extInfos; /* the extension data */
1698 
1699  const xmlChar *mode; /* the current mode */
1700  const xmlChar *modeURI; /* the current mode URI */
1701 
1702  xsltDocumentPtr docList; /* the document list */
1703 
1704  xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */
1705  xmlNodePtr node; /* the current node being processed */
1706  xmlNodeSetPtr nodeList; /* the current node list */
1707  /* xmlNodePtr current; the node */
1708 
1709  xmlDocPtr output; /* the resulting document */
1710  xmlNodePtr insert; /* the insertion node */
1711 
1712  xmlXPathContextPtr xpathCtxt; /* the XPath context */
1713  xsltTransformState state; /* the current state */
1714 
1715  /*
1716  * Global variables
1717  */
1718  xmlHashTablePtr globalVars; /* the global variables and params */
1719 
1720  xmlNodePtr inst; /* the instruction in the stylesheet */
1721 
1722  int xinclude; /* should XInclude be processed */
1723 
1724  const char * outputFile; /* the output URI if known */
1725 
1726  int profile; /* is this run profiled */
1727  long prof; /* the current profiled value */
1728  int profNr; /* Nb of templates in the stack */
1729  int profMax; /* Size of the templtaes stack */
1730  long *profTab; /* the profile template stack */
1731 
1732  void *_private; /* user defined data */
1733 
1734  int extrasNr; /* the number of extras used */
1735  int extrasMax; /* the number of extras allocated */
1736  xsltRuntimeExtraPtr extras; /* extra per runtime information */
1737 
1738  xsltDocumentPtr styleList; /* the stylesheet docs list */
1739  void * sec; /* the security preferences if any */
1740 
1741  xmlGenericErrorFunc error; /* a specific error handler */
1742  void * errctx; /* context for the error handler */
1743 
1744  xsltSortFunc sortfunc; /* a ctxt specific sort routine */
1745 
1746  /*
1747  * handling of temporary Result Value Tree
1748  * (XSLT 1.0 term: "Result Tree Fragment")
1749  */
1750  xmlDocPtr tmpRVT; /* list of RVT without persistance */
1751  xmlDocPtr persistRVT; /* list of persistant RVTs */
1752  int ctxtflags; /* context processing flags */
1753 
1754  /*
1755  * Speed optimization when coalescing text nodes
1756  */
1757  const xmlChar *lasttext; /* last text node content */
1758  int lasttsize; /* last text node size */
1759  int lasttuse; /* last text node use */
1760  /*
1761  * Per Context Debugging
1762  */
1763  int debugStatus; /* the context level debug status */
1764  unsigned long* traceCode; /* pointer to the variable holding the mask */
1765 
1766  int parserOptions; /* parser options xmlParserOption */
1767 
1768  /*
1769  * dictionary: shared between stylesheet, context and documents.
1770  */
1772  xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */
1773  /*
1774  * all document text strings are internalized
1775  */
1777  int nbKeys;
1779  xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */
1783  void *contextVariable; /* the current variable item */
1784  xmlDocPtr localRVT; /* list of local tree fragments; will be freed when
1785  the instruction which created the fragment
1786  exits */
1787  xmlDocPtr localRVTBase; /* Obsolete */
1788  int keyInitLevel; /* Needed to catch recursive keys issues */
1789  int depth; /* Needed to catch recursions */
1792 };
1793 
1800 #define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
1801 
1808 #define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
1809 
1816 #define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
1817 
1818 /*
1819  * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about
1820  * possible incompatibilities between function pointers and object
1821  * pointers. It is defined in libxml/hash.h within recent versions
1822  * of libxml2, but is put here for compatibility.
1823  */
1824 #ifndef XML_CAST_FPTR
1825 
1838 #define XML_CAST_FPTR(fptr) fptr
1839 #endif
1840 /*
1841  * Functions associated to the internal types
1842 xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
1843  xmlChar *name);
1844  */
1846  xsltNewStylesheet (void);
1849 XSLTPUBFUN void XSLTCALL
1851 XSLTPUBFUN int XSLTCALL
1852  xsltIsBlank (xmlChar *str);
1853 XSLTPUBFUN void XSLTCALL
1857  xmlChar *name);
1860  const xmlChar *nsUri,
1861  const xmlChar *name);
1862 
1865  xmlDocPtr doc);
1866 XSLTPUBFUN void XSLTCALL
1868  xmlNodePtr cur);
1876 XSLTPUBFUN void XSLTCALL
1879  xmlNodePtr node);
1880 XSLTPUBFUN xmlXPathError XSLTCALL
1882  xmlChar *format,
1883  double number,
1884  xmlChar **result);
1885 
1886 XSLTPUBFUN void XSLTCALL
1888  xmlNodePtr templ);
1889 XSLTPUBFUN int XSLTCALL
1891 XSLTPUBFUN int XSLTCALL
1893 /*
1894  * Extra functions for Result Value Trees
1895  */
1898 XSLTPUBFUN int XSLTCALL
1900  xmlDocPtr RVT);
1901 XSLTPUBFUN int XSLTCALL
1903  xmlDocPtr RVT);
1904 XSLTPUBFUN int XSLTCALL
1906  xmlDocPtr RVT);
1907 XSLTPUBFUN int XSLTCALL
1910  xmlXPathObjectPtr obj);
1911 XSLTPUBFUN int XSLTCALL
1914 XSLTPUBFUN int XSLTCALL
1915  xsltFlagRVTs(
1917  xmlXPathObjectPtr obj,
1918  void *val);
1919 XSLTPUBFUN void XSLTCALL
1921 XSLTPUBFUN void XSLTCALL
1923  xmlDocPtr RVT);
1924 /*
1925  * Extra functions for Attribute Value Templates
1926  */
1927 XSLTPUBFUN void XSLTCALL
1929  xmlAttrPtr attr);
1932  void *avt,
1933  xmlNodePtr node);
1934 XSLTPUBFUN void XSLTCALL
1935  xsltFreeAVTList (void *avt);
1936 
1937 /*
1938  * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
1939  */
1940 
1941 XSLTPUBFUN void XSLTCALL
1942  xsltUninit (void);
1943 
1944 /************************************************************************
1945  * *
1946  * Compile-time functions for *internal* use only *
1947  * *
1948  ************************************************************************/
1949 
1950 #ifdef XSLT_REFACTORED
1951 XSLTPUBFUN void XSLTCALL
1952  xsltParseSequenceConstructor(
1953  xsltCompilerCtxtPtr cctxt,
1954  xmlNodePtr start);
1955 XSLTPUBFUN int XSLTCALL
1956  xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt,
1957  xmlNodePtr elem);
1958 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1959 XSLTPUBFUN int XSLTCALL
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  ************************************************************************/
1971 XSLTPUBFUN int XSLTCALL
1973  xsltDocumentPtr doc,
1974  xsltKeyDefPtr keyd);
1975 XSLTPUBFUN int XSLTCALL
1977 #ifdef __cplusplus
1978 }
1979 #endif
1980 
1981 #endif /* __XML_XSLT_H__ */
1982 
xmlNodeSetPtr nodeList
xsltStyleType type
xsltElemPreCompPtr next
XSLTPUBFUN void XSLTCALL xsltFreeStackElemList(xsltStackElemPtr elem)
Definition: variables.c:606
xsltDocumentPtr docList
struct _xsltDocument * next
xsltTransformCachePtr cache
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
const xmlChar * mode
const xmlChar * modeURI
const xmlChar * name
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
xsltRuntimeExtraPtr extras
xsltTransformCache * xsltTransformCachePtr
XSLTPUBFUN int XSLTCALL xsltAllocateExtraCtxt(xsltTransformContextPtr ctxt)
Definition: xslt.c:809
xmlNodePtr initialContextNode
xsltStyleType
const xmlChar * use
xmlNsPtr * nsList
struct _xsltDecimalFormat * next
const xmlChar * test
xsltKeyTable * xsltKeyTablePtr
void(XMLCALL * xmlFreeFunc)(void *mem)
Definition: xmlmemory.h:57
xsltDecimalFormat * xsltDecimalFormatPtr
xsltStackElemPtr variables
xmlXPathCompExprPtr usecomp
void(* xsltTransformFunction)(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr comp)
Definition: tree.h:389
xsltKeyDef * xsltKeyDefPtr
xmlNsPtr * inheritedNs
XSLTPUBFUN void XSLTCALL xsltUninit(void)
Definition: xslt.c:217
const xmlChar * ns
xmlChar * decimalPoint
XSLTPUBFUN int XSLTCALL xsltAllocateExtra(xsltStylesheetPtr style)
Definition: xslt.c:793
xmlChar * methodURI
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetImportedDoc(xmlDocPtr doc, xsltStylesheetPtr style)
Definition: xslt.c:6499
xsltTemplatePtr * templCalledTab
xsltOutputType
struct _xsltStylesheet * imports
xmlNodePtr content
xmlNodePtr elem
xmlHashTablePtr namedTemplates
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
xsltStackElemPtr vars
xsltTransformState
XSLTPUBFUN int XSLTCALL xsltRegisterLocalRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:138
xsltDocumentPtr docList
xsltTransformContextPtr context
#define test
Definition: rosglue.h:37
struct _xsltStackElem * next
unsigned long * traceCode
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultRegister(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj)
Definition: variables.c:212
xsltDocument * xsltDocumentPtr
const char * filename
Definition: ioapi.h:135
const xmlChar * order
union _xsltRuntimeExtra::@3306 val
xmlNodePtr tree
xmlHashTablePtr extInfos
xmlChar * use
xmlDocPtr doc
xmlChar ** exclPrefixTab
XSLTPUBFUN int XSLTCALL xsltRegisterPersistRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:397
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
const xmlChar * nameURI
xsltTemplate * xsltTemplatePtr
struct _xsltDocument * includes
struct _xsltTemplate * next
struct _xsltStylesheet * parent
xsltDocumentPtr includes
const xmlChar * filename
Definition: fs.h:78
const xmlChar * lang
XSLTPUBFUN void XSLTCALL xsltFreeStylesheet(xsltStylesheetPtr style)
Definition: xslt.c:934
XSLTPUBFUN int XSLTCALL xsltIsBlank(xmlChar *str)
Definition: xslt.c:234
struct node node
XSLTPUBFUN int XSLTCALL xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocumentPtr doc, xsltKeyDefPtr keyd)
Definition: keys.c:602
const xmlChar * modeURI
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
XSLTPUBFUN void XSLTCALL xsltNumberFormat(xsltTransformContextPtr ctxt, xsltNumberDataPtr data, xmlNodePtr node)
Definition: numbers.c:708
static size_t double number
Definition: printf.c:64
xsltTransformState state
const xmlChar * stype
static size_t elem
Definition: string.c:68
struct _xsltKeyTable * next
xsltTransformContext * xsltTransformContextPtr
xmlHashTablePtr keys
const WCHAR * str
xmlHashTablePtr extFunctions
xsltTemplatePtr * templTab
xmlChar * mediaType
xsltTemplatePtr templates
xmlChar * encoding
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc)
Definition: xslt.c:6391
xsltDocumentPtr document
xsltStyleType type
xmlDocPtr fragment
xmlXPathContextPtr xpathCtxt
GLuint GLfloat * val
Definition: glext.h:7180
xsltTemplatePtr templ
static const WCHAR lang[]
Definition: wbemdisp.c:287
XSLTPUBFUN int XSLTCALL xsltInitAllDocKeys(xsltTransformContextPtr ctxt)
Definition: keys.c:533
const xmlChar * modeURI
const char * stype[]
Definition: cmds.c:192
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetFile(const xmlChar *filename)
Definition: xslt.c:6714
XSLTPUBFUN int XSLTCALL xsltFlagRVTs(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj, void *val)
Definition: variables.c:235
void MSVCRT() terminate()
const xmlChar * defaultAlias
GLsizeiptr size
Definition: glext.h:5919
XSLTPUBFUN xmlDocPtr XSLTCALL xsltCreateRVT(xsltTransformContextPtr ctxt)
Definition: variables.c:44
xmlHashTablePtr nsAliases
xsltTemplatePtr templ
static int strict
Definition: error.c:51
XSLTPUBFUN void XSLTCALL xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr)
Definition: attrvt.c:159
xsltTransformFunction func
xsltTemplatePtr currentTemplateRule
Definition: cookie.c:170
xmlChar * match
xsltTransformFunction func
XSLTPUBFUN void XSLTCALL xsltFreeAVTList(void *avt)
Definition: attrvt.c:113
void(* xsltSortFunc)(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
const xmlChar * nameURI
xsltNumberData numdata
Definition: tree.h:489
struct _xsltStylesheet * next
xsltDecimalFormatPtr decimalFormat
xmlHashTablePtr cdataSection
xsltElemPreCompPtr preComps
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultFinalize(xsltTransformContextPtr ctxt)
Definition: variables.c:187
xmlHashTablePtr extElements
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
int ret
XSLTPUBFUN void XSLTCALL xsltReleaseRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:326
Definition: mxnamespace.c:44
xsltDocumentPtr styleList
const xmlChar * case_order
const xmlChar * lasttext
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetDoc(xmlDocPtr doc)
Definition: xslt.c:6680
xsltElemPreCompDeallocator free
xsltStylePreCompPtr comp
unsigned char xmlChar
Definition: xmlstring.h:28
unsigned long time
xmlChar * name
Definition: _list.h:228
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByName(xsltStylesheetPtr style, xmlChar *name)
Definition: xslt.c:334
XSLTPUBFUN int XSLTCALL xsltRegisterTmpRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:99
xsltStackElemPtr * varsTab
void(* xsltElemPreCompDeallocator)(xsltElemPreCompPtr comp)
GLenum mode
Definition: glext.h:6217
xmlChar * nameURI
xmlChar * patternSeparator
struct _xsltStylesheet * style
xsltElemPreComp * xsltElemPreCompPtr
xsltStylePreComp * xsltStylePreCompPtr
xmlChar * doctypePublic
static const wchar_t void * locale
Definition: printf.c:73
const xmlChar * nsUri
xsltStylesheetPtr style
static unsigned __int64 next
Definition: rand_nt.c:6
__XML_EXTERNC typedef xmlDict * xmlDictPtr
Definition: dict.h:24
static ATOM item
Definition: dde.c:856
xmlChar * name
const xmlChar * mode
xmlChar * exclPrefix
#define XSLTPUBFUN
Definition: xsltexports.h:31
GLuint start
Definition: gl.h:1545
XSLTPUBFUN void XSLTCALL xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ)
Definition: xslt.c:4863
xmlXPathCompExprPtr comp
xmlFreeFunc deallocate
struct _xsltKeyDef * next
#define list
Definition: rosglue.h:35
xmlHashTablePtr nsHash
xmlGenericErrorFunc error
XSLTPUBFUN xmlChar *XSLTCALL xsltEvalAVT(xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node)
Definition: attrvt.c:347
#define XSLTCALL
Definition: xsltexports.h:43
Definition: tree.h:551
const xmlChar * name
const xmlChar * select
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByQName(xsltStylesheetPtr style, const xmlChar *nsUri, const xmlChar *name)
Definition: xslt.c:364
xmlHashTablePtr attributeSets
const xmlChar * select
Definition: tree.h:434
Definition: name.c:36
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: xmlerror.h:845
xmlXPathObjectPtr value
XSLTPUBFUN void XSLTCALL xsltFreeRVTs(xsltTransformContextPtr ctxt)
Definition: variables.c:419
xsltStackElem * xsltStackElemPtr
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltLoadStylesheetPI(xmlDocPtr doc)
Definition: xslt.c:6875
XSLTPUBFUN void XSLTCALL xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
Definition: xslt.c:1162
xmlHashTablePtr stripSpaces
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNewStylesheet(void)
Definition: xslt.c:742
xmlChar * match
xsltRuntimeExtra * xsltRuntimeExtraPtr
static TCHAR * items[]
Definition: page1.c:45
Arabic default style
Definition: afstyles.h:93
xmlHashTablePtr extInfos
GLuint64EXT * result
Definition: glext.h:11304
xsltStackElemPtr stackItems
const xmlChar * name
xmlXPathCompExprPtr comp
xsltElemPreCompPtr next
xmlChar * doctypeSystem
xmlChar * nameURI
XSLTPUBFUN xmlXPathError XSLTCALL xsltFormatNumberConversion(xsltDecimalFormatPtr self, xmlChar *format, double number, xmlChar **result)
Definition: numbers.c:910
xmlHashTablePtr globalVars
xsltStylesheetPtr principal
const xmlChar * mode
xmlNodePtr inst
Definition: dlist.c:348
xsltStylesheet * xsltStylesheetPtr
GLuint const GLchar * name
Definition: glext.h:6031