ReactOS  0.4.15-dev-1367-g07cc0b5
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 
108 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
109 
110 extern 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 
186 typedef struct _xsltPointerList xsltPointerList;
187 typedef xsltPointerList *xsltPointerListPtr;
188 struct _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 */
231  } val;
232 };
233 
241 #define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
242 
249 #define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
250 
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 
304  struct _xsltDecimalFormat *next; /* chained list */
306  /* Used for interpretation of pattern */
309  /* May appear in result */
312  xmlChar *noNumber; /* Not-a-number */
313  /* Used for interpretation of pattern and may appear in result */
319  const xmlChar *nsUri;
320 };
321 
330  struct _xsltDocument *next; /* documents are kept in a chained list */
331  int main; /* is this the main document */
332  xmlDocPtr doc; /* the parsed document */
333  void *keys; /* key tables storage */
334  struct _xsltDocument *includes; /* subsidiary includes */
335  int preproc; /* pre-processing already done */
337 };
338 
344 typedef struct _xsltKeyDef xsltKeyDef;
346 struct _xsltKeyDef {
347  struct _xsltKeyDef *next;
353  xmlXPathCompExprPtr comp;
354  xmlXPathCompExprPtr usecomp;
355  xmlNsPtr *nsList; /* the namespaces in scope */
356  int nsNr; /* the number of namespaces in scope */
357 };
358 
372 };
373 
374 /*
375  * The in-memory structure corresponding to an XSLT Stylesheet.
376  * NOTE: most of the content is simply linked from the doc tree
377  * structure, no specific allocation is made.
378  */
381 
384 
393 
407  xsltElemPreCompPtr comp);
408 
418  int nbsorts);
419 
420 typedef enum {
443 #ifdef XSLT_REFACTORED
444  ,
445  XSLT_FUNC_OTHERWISE,
446  XSLT_FUNC_FALLBACK,
447  XSLT_FUNC_MESSAGE,
448  XSLT_FUNC_INCLUDE,
449  XSLT_FUNC_ATTRSET,
450  XSLT_FUNC_LITERAL_RESULT_ELEMENT,
451  XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
452 #endif
453 } xsltStyleType;
454 
462 
472  xsltElemPreCompPtr next; /* next item in the global chained
473  list held by xsltStylesheet. */
474  xsltStyleType type; /* type of the element */
475  xsltTransformFunction func; /* handling function */
476  xmlNodePtr inst; /* the node in the stylesheet's tree
477  corresponding to this item */
478 
479  /* end of common part */
480  xsltElemPreCompDeallocator free; /* the deallocator */
481 };
482 
494 
495 #ifdef XSLT_REFACTORED
496 
497 /*
498 * Some pointer-list utility functions.
499 */
500 XSLTPUBFUN xsltPointerListPtr XSLTCALL
501  xsltPointerListCreate (int initialSize);
502 XSLTPUBFUN void XSLTCALL
503  xsltPointerListFree (xsltPointerListPtr list);
504 XSLTPUBFUN void XSLTCALL
505  xsltPointerListClear (xsltPointerListPtr list);
507  xsltPointerListAddSize (xsltPointerListPtr list,
508  void *item,
509  int initialSize);
510 
511 /************************************************************************
512  * *
513  * Refactored structures *
514  * *
515  ************************************************************************/
516 
517 typedef struct _xsltNsListContainer xsltNsListContainer;
518 typedef xsltNsListContainer *xsltNsListContainerPtr;
519 struct _xsltNsListContainer {
520  xmlNsPtr *list;
521  int totalNumber;
522  int xpathNumber;
523 };
524 
534 #define XSLT_ITEM_COMPATIBILITY_FIELDS \
535  xsltElemPreCompPtr next;\
536  xsltStyleType type;\
537  xsltTransformFunction func;\
538  xmlNodePtr inst;
539 
546 #define XSLT_ITEM_NAVIGATION_FIELDS
547 /*
548  xsltStylePreCompPtr parent;\
549  xsltStylePreCompPtr children;\
550  xsltStylePreCompPtr nextItem;
551 */
552 
558 #define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs;
559 
565 #define XSLT_ITEM_COMMON_FIELDS \
566  XSLT_ITEM_COMPATIBILITY_FIELDS \
567  XSLT_ITEM_NAVIGATION_FIELDS \
568  XSLT_ITEM_NSINSCOPE_FIELDS
569 
583 struct _xsltStylePreComp {
584  xsltElemPreCompPtr next; /* next item in the global chained
585  list held by xsltStylesheet */
586  xsltStyleType type; /* type of the item */
587  xsltTransformFunction func; /* handling function */
588  xmlNodePtr inst; /* the node in the stylesheet's tree
589  corresponding to this item. */
590  /* Currently no navigational fields. */
591  xsltNsListContainerPtr inScopeNs;
592 };
593 
602 typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem;
603 typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr;
604 
605 struct _xsltStyleBasicEmptyItem {
606  XSLT_ITEM_COMMON_FIELDS
607 };
608 
615 typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem;
616 typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr;
617 
618 struct _xsltStyleBasicExpressionItem {
619  XSLT_ITEM_COMMON_FIELDS
620 
621  const xmlChar *select; /* TODO: Change this to "expression". */
622  xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */
623 };
624 
625 /************************************************************************
626  * *
627  * XSLT-instructions/declarations *
628  * *
629  ************************************************************************/
630 
642 typedef struct _xsltStyleItemElement xsltStyleItemElement;
643 typedef xsltStyleItemElement *xsltStyleItemElementPtr;
644 
645 struct _xsltStyleItemElement {
646  XSLT_ITEM_COMMON_FIELDS
647 
648  const xmlChar *use;
649  int has_use;
650  const xmlChar *name;
651  int has_name;
652  const xmlChar *ns;
653  const xmlChar *nsPrefix;
654  int has_ns;
655 };
656 
667 typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute;
668 typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr;
669 
670 struct _xsltStyleItemAttribute {
671  XSLT_ITEM_COMMON_FIELDS
672  const xmlChar *name;
673  int has_name;
674  const xmlChar *ns;
675  const xmlChar *nsPrefix;
676  int has_ns;
677 };
678 
688 typedef struct _xsltStyleItemText xsltStyleItemText;
689 typedef xsltStyleItemText *xsltStyleItemTextPtr;
690 
691 struct _xsltStyleItemText {
692  XSLT_ITEM_COMMON_FIELDS
693  int noescape; /* text */
694 };
695 
704 typedef xsltStyleBasicEmptyItem xsltStyleItemComment;
705 typedef xsltStyleItemComment *xsltStyleItemCommentPtr;
706 
716 typedef struct _xsltStyleItemPI xsltStyleItemPI;
717 typedef xsltStyleItemPI *xsltStyleItemPIPtr;
718 
719 struct _xsltStyleItemPI {
720  XSLT_ITEM_COMMON_FIELDS
721  const xmlChar *name;
722  int has_name;
723 };
724 
731 typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports;
732 typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr;
733 
744 typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates;
745 typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr;
746 
747 struct _xsltStyleItemApplyTemplates {
748  XSLT_ITEM_COMMON_FIELDS
749 
750  const xmlChar *mode; /* apply-templates */
751  const xmlChar *modeURI; /* apply-templates */
752  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
753  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
754  /* TODO: with-params */
755 };
756 
766 typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate;
767 typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr;
768 
769 struct _xsltStyleItemCallTemplate {
770  XSLT_ITEM_COMMON_FIELDS
771 
772  xsltTemplatePtr templ; /* call-template */
773  const xmlChar *name; /* element, attribute, pi */
774  int has_name; /* element, attribute, pi */
775  const xmlChar *ns; /* element */
776  int has_ns; /* element */
777  /* TODO: with-params */
778 };
779 
789 typedef struct _xsltStyleItemCopy xsltStyleItemCopy;
790 typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
791 
792 struct _xsltStyleItemCopy {
793  XSLT_ITEM_COMMON_FIELDS
794  const xmlChar *use; /* copy, element */
795  int has_use; /* copy, element */
796 };
797 
807 typedef struct _xsltStyleItemIf xsltStyleItemIf;
808 typedef xsltStyleItemIf *xsltStyleItemIfPtr;
809 
810 struct _xsltStyleItemIf {
811  XSLT_ITEM_COMMON_FIELDS
812 
813  const xmlChar *test; /* if */
814  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
815 };
816 
817 
825 typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf;
826 typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr;
827 
836 typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf;
837 typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr;
838 
839 struct _xsltStyleItemValueOf {
840  XSLT_ITEM_COMMON_FIELDS
841 
842  const xmlChar *select;
843  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
844  int noescape;
845 };
846 
862 typedef struct _xsltStyleItemNumber xsltStyleItemNumber;
863 typedef xsltStyleItemNumber *xsltStyleItemNumberPtr;
864 
865 struct _xsltStyleItemNumber {
866  XSLT_ITEM_COMMON_FIELDS
867  xsltNumberData numdata; /* number */
868 };
869 
878 typedef xsltStyleBasicEmptyItem xsltStyleItemChoose;
879 typedef xsltStyleItemChoose *xsltStyleItemChoosePtr;
880 
889 typedef xsltStyleBasicEmptyItem xsltStyleItemFallback;
890 typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr;
891 
901 typedef xsltStyleBasicExpressionItem xsltStyleItemForEach;
902 typedef xsltStyleItemForEach *xsltStyleItemForEachPtr;
903 
913 typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
914 typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
915 
916 struct _xsltStyleItemMessage {
917  XSLT_ITEM_COMMON_FIELDS
918  int terminate;
919 };
920 
926 typedef struct _xsltStyleItemDocument xsltStyleItemDocument;
927 typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr;
928 
929 struct _xsltStyleItemDocument {
930  XSLT_ITEM_COMMON_FIELDS
931  int ver11; /* assigned: in xsltDocumentComp;
932  read: nowhere;
933  TODO: Check if we need. */
934  const xmlChar *filename; /* document URL */
935  int has_filename;
936 };
937 
938 /************************************************************************
939  * *
940  * Non-instructions (actually properties of instructions/declarations) *
941  * *
942  ************************************************************************/
943 
956 typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable;
957 typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr;
958 
959 struct _xsltStyleBasicItemVariable {
960  XSLT_ITEM_COMMON_FIELDS
961 
962  const xmlChar *select;
963  xmlXPathCompExprPtr comp;
964 
965  const xmlChar *name;
966  int has_name;
967  const xmlChar *ns;
968  int has_ns;
969 };
970 
981 typedef xsltStyleBasicItemVariable xsltStyleItemVariable;
982 typedef xsltStyleItemVariable *xsltStyleItemVariablePtr;
983 
994 typedef struct _xsltStyleItemParam xsltStyleItemParam;
995 typedef xsltStyleItemParam *xsltStyleItemParamPtr;
996 
997 struct _xsltStyleItemParam {
998  XSLT_ITEM_COMMON_FIELDS
999 
1000  const xmlChar *select;
1001  xmlXPathCompExprPtr comp;
1002 
1003  const xmlChar *name;
1004  int has_name;
1005  const xmlChar *ns;
1006  int has_ns;
1007 };
1008 
1018 typedef xsltStyleBasicItemVariable xsltStyleItemWithParam;
1019 typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr;
1020 
1033 typedef struct _xsltStyleItemSort xsltStyleItemSort;
1034 typedef xsltStyleItemSort *xsltStyleItemSortPtr;
1035 
1036 struct _xsltStyleItemSort {
1037  XSLT_ITEM_COMMON_FIELDS
1038 
1039  const xmlChar *stype; /* sort */
1040  int has_stype; /* sort */
1041  int number; /* sort */
1042  const xmlChar *order; /* sort */
1043  int has_order; /* sort */
1044  int descending; /* sort */
1045  const xmlChar *lang; /* sort */
1046  int has_lang; /* sort */
1047  xsltLocale locale; /* sort */
1048  const xmlChar *case_order; /* sort */
1049  int lower_first; /* sort */
1050 
1051  const xmlChar *use;
1052  int has_use;
1053 
1054  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1055 
1056  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1057 };
1058 
1059 
1069 typedef struct _xsltStyleItemWhen xsltStyleItemWhen;
1070 typedef xsltStyleItemWhen *xsltStyleItemWhenPtr;
1071 
1072 struct _xsltStyleItemWhen {
1073  XSLT_ITEM_COMMON_FIELDS
1074 
1075  const xmlChar *test;
1076  xmlXPathCompExprPtr comp;
1077 };
1078 
1087 typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise;
1088 typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr;
1089 
1090 struct _xsltStyleItemOtherwise {
1091  XSLT_ITEM_COMMON_FIELDS
1092 };
1093 
1094 typedef struct _xsltStyleItemInclude xsltStyleItemInclude;
1095 typedef xsltStyleItemInclude *xsltStyleItemIncludePtr;
1096 
1097 struct _xsltStyleItemInclude {
1098  XSLT_ITEM_COMMON_FIELDS
1100 };
1101 
1102 /************************************************************************
1103  * *
1104  * XSLT elements in forwards-compatible mode *
1105  * *
1106  ************************************************************************/
1107 
1108 typedef struct _xsltStyleItemUknown xsltStyleItemUknown;
1109 typedef xsltStyleItemUknown *xsltStyleItemUknownPtr;
1110 struct _xsltStyleItemUknown {
1111  XSLT_ITEM_COMMON_FIELDS
1112 };
1113 
1114 
1115 /************************************************************************
1116  * *
1117  * Extension elements *
1118  * *
1119  ************************************************************************/
1120 
1121 /*
1122  * xsltStyleItemExtElement:
1123  *
1124  * Reflects extension elements.
1125  *
1126  * NOTE: Due to the fact that the structure xsltElemPreComp is most
1127  * probably already heavily in use out there by users, so we cannot
1128  * easily change it, we'll create an intermediate structure which will
1129  * hold an xsltElemPreCompPtr.
1130  * BIG NOTE: The only problem I see here is that the user processes the
1131  * content of the stylesheet tree, possibly he'll lookup the node->psvi
1132  * fields in order to find subsequent extension functions.
1133  * In this case, the user's code will break, since the node->psvi
1134  * field will hold now the xsltStyleItemExtElementPtr and not
1135  * the xsltElemPreCompPtr.
1136  * However the place where the structure is anchored in the node-tree,
1137  * namely node->psvi, has beed already once been moved from node->_private
1138  * to node->psvi, so we have a precedent here, which, I think, should allow
1139  * us to change such semantics without headaches.
1140  */
1141 typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
1142 typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
1143 struct _xsltStyleItemExtElement {
1144  XSLT_ITEM_COMMON_FIELDS
1146 };
1147 
1148 /************************************************************************
1149  * *
1150  * Literal result elements *
1151  * *
1152  ************************************************************************/
1153 
1154 typedef struct _xsltEffectiveNs xsltEffectiveNs;
1155 typedef xsltEffectiveNs *xsltEffectiveNsPtr;
1156 struct _xsltEffectiveNs {
1157  xsltEffectiveNsPtr nextInStore; /* storage next */
1158  xsltEffectiveNsPtr next; /* next item in the list */
1159  const xmlChar *prefix;
1160  const xmlChar *nsName;
1161  /*
1162  * Indicates if eclared on the literal result element; dunno if really
1163  * needed.
1164  */
1165  int holdByElem;
1166 };
1167 
1168 /*
1169  * Info for literal result elements.
1170  * This will be set on the elem->psvi field and will be
1171  * shared by literal result elements, which have the same
1172  * excluded result namespaces; i.e., this *won't* be created uniquely
1173  * for every literal result element.
1174  */
1175 typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo;
1176 typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr;
1177 struct _xsltStyleItemLRElementInfo {
1178  XSLT_ITEM_COMMON_FIELDS
1179  /*
1180  * @effectiveNs is the set of effective ns-nodes
1181  * on the literal result element, which will be added to the result
1182  * element if not already existing in the result tree.
1183  * This means that excluded namespaces (via exclude-result-prefixes,
1184  * extension-element-prefixes and the XSLT namespace) not added
1185  * to the set.
1186  * Namespace-aliasing was applied on the @effectiveNs.
1187  */
1188  xsltEffectiveNsPtr effectiveNs;
1189 
1190 };
1191 
1192 #ifdef XSLT_REFACTORED
1193 
1194 typedef struct _xsltNsAlias xsltNsAlias;
1195 typedef xsltNsAlias *xsltNsAliasPtr;
1196 struct _xsltNsAlias {
1197  xsltNsAliasPtr next; /* next in the list */
1198  xmlNsPtr literalNs;
1199  xmlNsPtr targetNs;
1200  xmlDocPtr docOfTargetNs;
1201 };
1202 #endif
1203 
1204 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1205 
1206 typedef struct _xsltNsMap xsltNsMap;
1207 typedef xsltNsMap *xsltNsMapPtr;
1208 struct _xsltNsMap {
1209  xsltNsMapPtr next; /* next in the list */
1210  xmlDocPtr doc;
1211  xmlNodePtr elem; /* the element holding the ns-decl */
1212  xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */
1213  const xmlChar *origNsName; /* the original XML namespace name */
1214  const xmlChar *newNsName; /* the mapped XML namespace name */
1215 };
1216 #endif
1217 
1218 /************************************************************************
1219  * *
1220  * Compile-time structures for *internal* use only *
1221  * *
1222  ************************************************************************/
1223 
1224 typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData;
1225 typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr;
1226 
1227 typedef struct _xsltNsList xsltNsList;
1228 typedef xsltNsList *xsltNsListPtr;
1229 struct _xsltNsList {
1230  xsltNsListPtr next; /* next in the list */
1231  xmlNsPtr ns;
1232 };
1233 
1234 /*
1235 * xsltVarInfo:
1236 *
1237 * Used at compilation time for parameters and variables.
1238 */
1239 typedef struct _xsltVarInfo xsltVarInfo;
1240 typedef xsltVarInfo *xsltVarInfoPtr;
1241 struct _xsltVarInfo {
1242  xsltVarInfoPtr next; /* next in the list */
1243  xsltVarInfoPtr prev;
1244  int depth; /* the depth in the tree */
1245  const xmlChar *name;
1246  const xmlChar *nsName;
1247 };
1248 
1254 typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo;
1255 typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr;
1256 struct _xsltCompilerNodeInfo {
1257  xsltCompilerNodeInfoPtr next;
1258  xsltCompilerNodeInfoPtr prev;
1259  xmlNodePtr node;
1260  int depth;
1261  xsltTemplatePtr templ; /* The owning template */
1262  int category; /* XSLT element, LR-element or
1263  extension element */
1265  xsltElemPreCompPtr item; /* The compiled information */
1266  /* The current in-scope namespaces */
1267  xsltNsListContainerPtr inScopeNs;
1268  /* The current excluded result namespaces */
1269  xsltPointerListPtr exclResultNs;
1270  /* The current extension instruction namespaces */
1271  xsltPointerListPtr extElemNs;
1272 
1273  /* The current info for literal result elements. */
1274  xsltStyleItemLRElementInfoPtr litResElemInfo;
1275  /*
1276  * Set to 1 if in-scope namespaces changed,
1277  * or excluded result namespaces changed,
1278  * or extension element namespaces changed.
1279  * This will trigger creation of new infos
1280  * for literal result elements.
1281  */
1282  int nsChanged;
1283  int preserveWhitespace;
1284  int stripWhitespace;
1285  int isRoot; /* whether this is the stylesheet's root node */
1286  int forwardsCompat; /* whether forwards-compatible mode is enabled */
1287  /* whether the content of an extension element was processed */
1288  int extContentHandled;
1289  /* the type of the current child */
1290  xsltStyleType curChildType;
1291 };
1292 
1298 #define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
1299 
1300 typedef enum {
1301  XSLT_ERROR_SEVERITY_ERROR = 0,
1302  XSLT_ERROR_SEVERITY_WARNING
1303 } xsltErrorSeverityType;
1304 
1305 typedef struct _xsltCompilerCtxt xsltCompilerCtxt;
1306 typedef xsltCompilerCtxt *xsltCompilerCtxtPtr;
1307 struct _xsltCompilerCtxt {
1308  void *errorCtxt; /* user specific error context */
1309  /*
1310  * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */
1311  xsltErrorSeverityType errSeverity;
1312  int warnings; /* TODO: number of warnings found at
1313  compilation */
1314  int errors; /* TODO: number of errors found at
1315  compilation */
1316  xmlDictPtr dict;
1318  int simplified; /* whether this is a simplified stylesheet */
1319  /* TODO: structured/unstructured error contexts. */
1320  int depth; /* Current depth of processing */
1321 
1322  xsltCompilerNodeInfoPtr inode;
1323  xsltCompilerNodeInfoPtr inodeList;
1324  xsltCompilerNodeInfoPtr inodeLast;
1325  xsltPointerListPtr tmpList; /* Used for various purposes */
1326  /*
1327  * The XSLT version as specified by the stylesheet's root element.
1328  */
1329  int isInclude;
1330  int hasForwardsCompat; /* whether forwards-compatible mode was used
1331  in a parsing episode */
1332  int maxNodeInfos; /* TEMP TODO: just for the interest */
1333  int maxLREs; /* TEMP TODO: just for the interest */
1334  /*
1335  * In order to keep the old behaviour, applying strict rules of
1336  * the spec can be turned off. This has effect only on special
1337  * mechanisms like whitespace-stripping in the stylesheet.
1338  */
1339  int strict;
1340  xsltPrincipalStylesheetDataPtr psData;
1341  xsltStyleItemUknownPtr unknownItem;
1342  int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */
1343  xsltNsAliasPtr nsAliases;
1344  xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */
1345  xsltVarInfoPtr ivar; /* topmost local variable/param. */
1346 };
1347 
1348 #else /* XSLT_REFACTORED */
1349 /*
1350 * The old structures before refactoring.
1351 */
1352 
1360  xsltElemPreCompPtr next; /* chained list */
1361  xsltStyleType type; /* type of the element */
1362  xsltTransformFunction func; /* handling function */
1363  xmlNodePtr inst; /* the instruction */
1364 
1365  /*
1366  * Pre computed values.
1367  */
1368 
1369  const xmlChar *stype; /* sort */
1370  int has_stype; /* sort */
1371  int number; /* sort */
1372  const xmlChar *order; /* sort */
1373  int has_order; /* sort */
1374  int descending; /* sort */
1375  const xmlChar *lang; /* sort */
1376  int has_lang; /* sort */
1377  xsltLocale locale; /* sort */
1378  const xmlChar *case_order; /* sort */
1379  int lower_first; /* sort */
1380 
1381  const xmlChar *use; /* copy, element */
1382  int has_use; /* copy, element */
1383 
1384  int noescape; /* text */
1385 
1386  const xmlChar *name; /* element, attribute, pi */
1387  int has_name; /* element, attribute, pi */
1388  const xmlChar *ns; /* element */
1389  int has_ns; /* element */
1390 
1391  const xmlChar *mode; /* apply-templates */
1392  const xmlChar *modeURI; /* apply-templates */
1393 
1394  const xmlChar *test; /* if */
1395 
1396  xsltTemplatePtr templ; /* call-template */
1397 
1398  const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
1399 
1400  int ver11; /* document */
1401  const xmlChar *filename; /* document URL */
1402  int has_filename; /* document */
1403 
1404  xsltNumberData numdata; /* number */
1405 
1406  xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
1407  xmlNsPtr *nsList; /* the namespaces in scope */
1408  int nsNr; /* the number of namespaces in scope */
1409 };
1410 
1411 #endif /* XSLT_REFACTORED */
1412 
1413 
1414 /*
1415  * The in-memory structure corresponding to an XSLT Variable
1416  * or Param.
1417  */
1421  struct _xsltStackElem *next;/* chained list */
1422  xsltStylePreCompPtr comp; /* the compiled form */
1423  int computed; /* was the evaluation done */
1424  const xmlChar *name; /* the local part of the name QName */
1425  const xmlChar *nameURI; /* the URI part of the name QName */
1426  const xmlChar *select; /* the eval string */
1427  xmlNodePtr tree; /* the sequence constructor if no eval
1428  string or the location */
1429  xmlXPathObjectPtr value; /* The value if computed */
1430  xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0)
1431  which are bound to the variable's lifetime. */
1432  int level; /* the depth in the tree;
1433  -1 if persistent (e.g. a given xsl:with-param) */
1434  xsltTransformContextPtr context; /* The transformation context; needed to cache
1435  the variables */
1436  int flags;
1437 };
1438 
1439 #ifdef XSLT_REFACTORED
1440 
1441 struct _xsltPrincipalStylesheetData {
1442  /*
1443  * Namespace dictionary for ns-prefixes and ns-names:
1444  * TODO: Shared between stylesheets, and XPath mechanisms.
1445  * Not used yet.
1446  */
1447  xmlDictPtr namespaceDict;
1448  /*
1449  * Global list of in-scope namespaces.
1450  */
1451  xsltPointerListPtr inScopeNamespaces;
1452  /*
1453  * Global list of information for [xsl:]excluded-result-prefixes.
1454  */
1455  xsltPointerListPtr exclResultNamespaces;
1456  /*
1457  * Global list of information for [xsl:]extension-element-prefixes.
1458  */
1459  xsltPointerListPtr extElemNamespaces;
1460  xsltEffectiveNsPtr effectiveNs;
1461 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1462  /*
1463  * Namespace name map to get rid of string comparison of namespace names.
1464  */
1465  xsltNsMapPtr nsMap;
1466 #endif
1467 };
1468 
1469 
1470 #endif
1471 /*
1472  * Note that we added a @compCtxt field to anchor an stylesheet compilation
1473  * context, since, due to historical reasons, various compile-time function
1474  * take only the stylesheet as argument and not a compilation context.
1475  */
1477  /*
1478  * The stylesheet import relation is kept as a tree.
1479  */
1483 
1484  xsltDocumentPtr docList; /* the include document list */
1485 
1486  /*
1487  * General data on the style sheet document.
1488  */
1489  xmlDocPtr doc; /* the parsed XML stylesheet */
1490  xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and
1491  preserve space elements */
1492  int stripAll; /* strip-space * (1) preserve-space * (-1) */
1493  xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */
1494 
1495  /*
1496  * Global variable or parameters.
1497  */
1498  xsltStackElemPtr variables; /* linked list of param and variables */
1499 
1500  /*
1501  * Template descriptions.
1502  */
1503  xsltTemplatePtr templates; /* the ordered list of templates */
1504  void *templatesHash; /* hash table or wherever compiled templates
1505  information is stored */
1506  void *rootMatch; /* template based on / */
1507  void *keyMatch; /* template based on key() */
1508  void *elemMatch; /* template based on * */
1509  void *attrMatch; /* template based on @* */
1510  void *parentMatch; /* template based on .. */
1511  void *textMatch; /* template based on text() */
1512  void *piMatch; /* template based on processing-instruction() */
1513  void *commentMatch; /* template based on comment() */
1514 
1515  /*
1516  * Namespace aliases.
1517  * NOTE: Not used in the refactored code.
1518  */
1519  xmlHashTablePtr nsAliases; /* the namespace alias hash tables */
1520 
1521  /*
1522  * Attribute sets.
1523  */
1524  xmlHashTablePtr attributeSets;/* the attribute sets hash tables */
1525 
1526  /*
1527  * Namespaces.
1528  * TODO: Eliminate this.
1529  */
1530  xmlHashTablePtr nsHash; /* the set of namespaces in use:
1531  ATTENTION: This is used for
1532  execution of XPath expressions; unfortunately
1533  it restricts the stylesheet to have distinct
1534  prefixes.
1535  TODO: We need to get rid of this.
1536  */
1537  void *nsDefs; /* ATTENTION TODO: This is currently used to store
1538  xsltExtDefPtr (in extensions.c) and
1539  *not* xmlNsPtr.
1540  */
1541 
1542  /*
1543  * Key definitions.
1544  */
1545  void *keys; /* key definitions */
1546 
1547  /*
1548  * Output related stuff.
1549  */
1550  xmlChar *method; /* the output method */
1551  xmlChar *methodURI; /* associated namespace if any */
1552  xmlChar *version; /* version string */
1553  xmlChar *encoding; /* encoding string */
1554  int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
1555 
1556  /*
1557  * Number formatting.
1558  */
1560  int standalone; /* standalone = "yes" | "no" */
1561  xmlChar *doctypePublic; /* doctype-public string */
1562  xmlChar *doctypeSystem; /* doctype-system string */
1563  int indent; /* should output being indented */
1564  xmlChar *mediaType; /* media-type string */
1565 
1566  /*
1567  * Precomputed blocks.
1568  */
1569  xsltElemPreCompPtr preComps;/* list of precomputed blocks */
1570  int warnings; /* number of warnings found at compilation */
1571  int errors; /* number of errors found at compilation */
1572 
1573  xmlChar *exclPrefix; /* last excluded prefixes */
1574  xmlChar **exclPrefixTab; /* array of excluded prefixes */
1575  int exclPrefixNr; /* number of excluded prefixes in scope */
1576  int exclPrefixMax; /* size of the array */
1577 
1578  void *_private; /* user defined data */
1579 
1580  /*
1581  * Extensions.
1582  */
1583  xmlHashTablePtr extInfos; /* the extension data */
1584  int extrasNr; /* the number of extras required */
1585 
1586  /*
1587  * For keeping track of nested includes
1588  */
1589  xsltDocumentPtr includes; /* points to last nested include */
1590 
1591  /*
1592  * dictionary: shared between stylesheet, context and documents.
1593  */
1595  /*
1596  * precompiled attribute value templates.
1597  */
1598  void *attVTs;
1599  /*
1600  * if namespace-alias has an alias for the default stylesheet prefix
1601  * NOTE: Not used in the refactored code.
1602  */
1604  /*
1605  * bypass pre-processing (already done) (used in imports)
1606  */
1608  /*
1609  * all document text strings were internalized
1610  */
1612  /*
1613  * Literal Result Element as Stylesheet c.f. section 2.3
1614  */
1616  /*
1617  * The principal stylesheet
1618  */
1620 #ifdef XSLT_REFACTORED
1621  /*
1622  * Compilation context used during compile-time.
1623  */
1624  xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */
1625 
1626  xsltPrincipalStylesheetDataPtr principalData;
1627 #endif
1628  /*
1629  * Forwards-compatible processing
1630  */
1632 
1633  xmlHashTablePtr namedTemplates; /* hash table of named templates */
1634 
1635  xmlXPathContextPtr xpathCtxt;
1636 };
1637 
1642  int nbRVT;
1645 #ifdef XSLT_DEBUG_PROFILE_CACHE
1646  int dbgCachedRVTs;
1647  int dbgReusedRVTs;
1648  int dbgCachedVars;
1649  int dbgReusedVars;
1650 #endif
1651 };
1652 
1653 /*
1654  * The in-memory structure corresponding to an XSLT Transformation.
1655  */
1656 typedef enum {
1660 } xsltOutputType;
1661 
1662 typedef enum {
1667 
1669  xsltStylesheetPtr style; /* the stylesheet used */
1670  xsltOutputType type; /* the type of output */
1671 
1672  xsltTemplatePtr templ; /* the current template */
1673  int templNr; /* Nb of templates in the stack */
1674  int templMax; /* Size of the templtes stack */
1675  xsltTemplatePtr *templTab; /* the template stack */
1676 
1677  xsltStackElemPtr vars; /* the current variable list */
1678  int varsNr; /* Nb of variable list in the stack */
1679  int varsMax; /* Size of the variable list stack */
1680  xsltStackElemPtr *varsTab; /* the variable list stack */
1681  int varsBase; /* the var base for current templ */
1682 
1683  /*
1684  * Extensions
1685  */
1686  xmlHashTablePtr extFunctions; /* the extension functions */
1687  xmlHashTablePtr extElements; /* the extension elements */
1688  xmlHashTablePtr extInfos; /* the extension data */
1689 
1690  const xmlChar *mode; /* the current mode */
1691  const xmlChar *modeURI; /* the current mode URI */
1692 
1693  xsltDocumentPtr docList; /* the document list */
1694 
1695  xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */
1696  xmlNodePtr node; /* the current node being processed */
1697  xmlNodeSetPtr nodeList; /* the current node list */
1698  /* xmlNodePtr current; the node */
1699 
1700  xmlDocPtr output; /* the resulting document */
1701  xmlNodePtr insert; /* the insertion node */
1702 
1703  xmlXPathContextPtr xpathCtxt; /* the XPath context */
1704  xsltTransformState state; /* the current state */
1705 
1706  /*
1707  * Global variables
1708  */
1709  xmlHashTablePtr globalVars; /* the global variables and params */
1710 
1711  xmlNodePtr inst; /* the instruction in the stylesheet */
1712 
1713  int xinclude; /* should XInclude be processed */
1714 
1715  const char * outputFile; /* the output URI if known */
1716 
1717  int profile; /* is this run profiled */
1718  long prof; /* the current profiled value */
1719  int profNr; /* Nb of templates in the stack */
1720  int profMax; /* Size of the templtaes stack */
1721  long *profTab; /* the profile template stack */
1722 
1723  void *_private; /* user defined data */
1724 
1725  int extrasNr; /* the number of extras used */
1726  int extrasMax; /* the number of extras allocated */
1727  xsltRuntimeExtraPtr extras; /* extra per runtime information */
1728 
1729  xsltDocumentPtr styleList; /* the stylesheet docs list */
1730  void * sec; /* the security preferences if any */
1731 
1732  xmlGenericErrorFunc error; /* a specific error handler */
1733  void * errctx; /* context for the error handler */
1734 
1735  xsltSortFunc sortfunc; /* a ctxt specific sort routine */
1736 
1737  /*
1738  * handling of temporary Result Value Tree
1739  * (XSLT 1.0 term: "Result Tree Fragment")
1740  */
1741  xmlDocPtr tmpRVT; /* list of RVT without persistance */
1742  xmlDocPtr persistRVT; /* list of persistant RVTs */
1743  int ctxtflags; /* context processing flags */
1744 
1745  /*
1746  * Speed optimization when coalescing text nodes
1747  */
1748  const xmlChar *lasttext; /* last text node content */
1749  int lasttsize; /* last text node size */
1750  int lasttuse; /* last text node use */
1751  /*
1752  * Per Context Debugging
1753  */
1754  int debugStatus; /* the context level debug status */
1755  unsigned long* traceCode; /* pointer to the variable holding the mask */
1756 
1757  int parserOptions; /* parser options xmlParserOption */
1758 
1759  /*
1760  * dictionary: shared between stylesheet, context and documents.
1761  */
1763  xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */
1764  /*
1765  * all document text strings are internalized
1766  */
1768  int nbKeys;
1770  xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */
1774  void *contextVariable; /* the current variable item */
1775  xmlDocPtr localRVT; /* list of local tree fragments; will be freed when
1776  the instruction which created the fragment
1777  exits */
1778  xmlDocPtr localRVTBase; /* Obsolete */
1779  int keyInitLevel; /* Needed to catch recursive keys issues */
1780  int depth; /* Needed to catch recursions */
1783  unsigned long opLimit;
1784  unsigned long opCount;
1785 };
1786 
1793 #define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
1794 
1801 #define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
1802 
1809 #define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
1810 
1811 /*
1812  * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about
1813  * possible incompatibilities between function pointers and object
1814  * pointers. It is defined in libxml/hash.h within recent versions
1815  * of libxml2, but is put here for compatibility.
1816  */
1817 #ifndef XML_CAST_FPTR
1818 
1831 #define XML_CAST_FPTR(fptr) fptr
1832 #endif
1833 /*
1834  * Functions associated to the internal types
1835 xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
1836  xmlChar *name);
1837  */
1839  xsltNewStylesheet (void);
1842 XSLTPUBFUN void XSLTCALL
1844 XSLTPUBFUN int XSLTCALL
1845  xsltIsBlank (xmlChar *str);
1846 XSLTPUBFUN void XSLTCALL
1850  xmlChar *name);
1853  const xmlChar *nsUri,
1854  const xmlChar *name);
1855 
1858  xmlDocPtr doc);
1859 XSLTPUBFUN void XSLTCALL
1861  xmlNodePtr cur);
1867 XSLTPUBFUN int XSLTCALL
1869  xmlDocPtr doc);
1872 XSLTPUBFUN void XSLTCALL
1875  xmlNodePtr node);
1876 XSLTPUBFUN xmlXPathError XSLTCALL
1878  xmlChar *format,
1879  double number,
1880  xmlChar **result);
1881 
1882 XSLTPUBFUN void XSLTCALL
1884  xmlNodePtr templ);
1885 XSLTPUBFUN int XSLTCALL
1887 XSLTPUBFUN int XSLTCALL
1889 /*
1890  * Extra functions for Result Value Trees
1891  */
1894 XSLTPUBFUN int XSLTCALL
1896  xmlDocPtr RVT);
1897 XSLTPUBFUN int XSLTCALL
1899  xmlDocPtr RVT);
1900 XSLTPUBFUN int XSLTCALL
1902  xmlDocPtr RVT);
1903 XSLTPUBFUN int XSLTCALL
1906  xmlXPathObjectPtr obj);
1907 XSLTPUBFUN int XSLTCALL
1910 XSLTPUBFUN int XSLTCALL
1911  xsltFlagRVTs(
1913  xmlXPathObjectPtr obj,
1914  void *val);
1915 XSLTPUBFUN void XSLTCALL
1917 XSLTPUBFUN void XSLTCALL
1919  xmlDocPtr RVT);
1920 /*
1921  * Extra functions for Attribute Value Templates
1922  */
1923 XSLTPUBFUN void XSLTCALL
1925  xmlAttrPtr attr);
1928  void *avt,
1929  xmlNodePtr node);
1930 XSLTPUBFUN void XSLTCALL
1931  xsltFreeAVTList (void *avt);
1932 
1933 /*
1934  * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
1935  */
1936 
1937 XSLTPUBFUN void XSLTCALL
1938  xsltUninit (void);
1939 
1940 /************************************************************************
1941  * *
1942  * Compile-time functions for *internal* use only *
1943  * *
1944  ************************************************************************/
1945 
1946 #ifdef XSLT_REFACTORED
1947 XSLTPUBFUN void XSLTCALL
1948  xsltParseSequenceConstructor(
1949  xsltCompilerCtxtPtr cctxt,
1950  xmlNodePtr start);
1951 XSLTPUBFUN int XSLTCALL
1952  xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt,
1953  xmlNodePtr elem);
1954 #ifdef XSLT_REFACTORED_XSLT_NSCOMP
1955 XSLTPUBFUN int XSLTCALL
1956  xsltRestoreDocumentNamespaces(
1957  xsltNsMapPtr ns,
1958  xmlDocPtr doc);
1959 #endif
1960 #endif /* XSLT_REFACTORED */
1961 
1962 /************************************************************************
1963  * *
1964  * Transformation-time functions for *internal* use only *
1965  * *
1966  ************************************************************************/
1967 XSLTPUBFUN int XSLTCALL
1969  xsltDocumentPtr doc,
1970  xsltKeyDefPtr keyd);
1971 XSLTPUBFUN int XSLTCALL
1973 #ifdef __cplusplus
1974 }
1975 #endif
1976 
1977 #endif /* __XML_XSLT_H__ */
1978 
xmlNodeSetPtr nodeList
xsltStyleType type
xsltElemPreCompPtr next
XSLTPUBFUN void XSLTCALL xsltFreeStackElemList(xsltStackElemPtr elem)
Definition: variables.c:608
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:825
xmlNodePtr initialContextNode
xsltStyleType
const xmlChar * use
xmlNsPtr * nsList
GLuint64EXT * result
Definition: glext.h:11304
struct _xsltDecimalFormat * next
const xmlChar * test
xsltKeyTable * xsltKeyTablePtr
void(XMLCALL * xmlFreeFunc)(void *mem)
Definition: xmlmemory.h:57
xsltDecimalFormat * xsltDecimalFormatPtr
xsltStackElemPtr variables
xmlXPathCompExprPtr usecomp
XSLTPUBFUN int XSLTCALL xsltParseStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc)
Definition: xslt.c:6547
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:809
xmlChar * methodURI
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetImportedDoc(xmlDocPtr doc, xsltStylesheetPtr style)
Definition: xslt.c:6518
xsltTemplatePtr * templCalledTab
xsltOutputType
struct _xsltStylesheet * imports
xmlNodePtr content
xmlNodePtr elem
xmlHashTablePtr namedTemplates
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:213
xsltDocument * xsltDocumentPtr
const char * filename
Definition: ioapi.h:135
const xmlChar * order
xmlNodePtr tree
xmlHashTablePtr extInfos
xmlChar * use
xmlDocPtr doc
xmlChar ** exclPrefixTab
XSLTPUBFUN int XSLTCALL xsltRegisterPersistRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
Definition: variables.c:399
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:950
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:604
const xmlChar * modeURI
union _xsltRuntimeExtra::@3439 val
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:722
static size_t double number
Definition: printf.c:69
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:6410
xsltDocumentPtr document
xsltStyleType type
xmlDocPtr fragment
xmlXPathContextPtr xpathCtxt
Definition: dict.c:116
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:535
const xmlChar * modeURI
const char * stype[]
Definition: cmds.c:192
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetFile(const xmlChar *filename)
Definition: xslt.c:6715
XSLTPUBFUN int XSLTCALL xsltFlagRVTs(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj, void *val)
Definition: variables.c:237
void MSVCRT() terminate()
const xmlChar * defaultAlias
GLsizeiptr size
Definition: glext.h:5919
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:30
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:168
xsltTransformFunction func
xsltTemplatePtr currentTemplateRule
Definition: cookie.c:201
xmlChar * match
xsltTransformFunction func
XSLTPUBFUN void XSLTCALL xsltFreeAVTList(void *avt)
Definition: attrvt.c:119
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:328
Definition: mxnamespace.c:44
xsltDocumentPtr styleList
const xmlChar * case_order
const xmlChar * lasttext
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetDoc(xmlDocPtr doc)
Definition: xslt.c:6699
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
FxCollectionEntry * cur
xsltStylePreComp * xsltStylePreCompPtr
xmlChar * doctypePublic
static const wchar_t void * locale
Definition: printf.c:79
const xmlChar * nsUri
xsltStylesheetPtr style
static unsigned __int64 next
Definition: rand_nt.c:6
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:4882
xmlXPathContextPtr xpathCtxt
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:356
#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:38
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:421
xsltStackElem * xsltStackElemPtr
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltLoadStylesheetPI(xmlDocPtr doc)
Definition: xslt.c:6877
XSLTPUBFUN void XSLTCALL xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
Definition: xslt.c:1181
xmlHashTablePtr stripSpaces
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNewStylesheet(void)
Definition: xslt.c:795
xmlChar * match
xsltRuntimeExtra * xsltRuntimeExtraPtr
static TCHAR * items[]
Definition: page1.c:45
Arabic default style
Definition: afstyles.h:93
xmlHashTablePtr extInfos
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:935
xmlHashTablePtr globalVars
xsltStylesheetPtr principal
const xmlChar * mode
xmlNodePtr inst
Definition: dlist.c:348
xsltStylesheet * xsltStylesheetPtr
GLuint const GLchar * name
Definition: glext.h:6031