13#ifndef __XML_XSLT_INTERNALS_H__
14#define __XML_XSLT_INTERNALS_H__
38#define XSLT_IS_TEXT_NODE(n) ((n != NULL) && \
39 (((n)->type == XML_TEXT_NODE) || \
40 ((n)->type == XML_CDATA_SECTION_NODE)))
48#define XSLT_MARK_RES_TREE_FRAG(n) \
49 (n)->name = (char *) xmlStrdup(BAD_CAST " fake node libxslt");
56#define XSLT_IS_RES_TREE_FRAG(n) \
57 ((n != NULL) && ((n)->type == XML_DOCUMENT_NODE) && \
58 ((n)->name != NULL) && ((n)->name[0] == ' '))
66#define XSLT_REFACTORED_KEYCOMP
89#define XSLT_REFACTORED_VARS
93extern const xmlChar *xsltXSLTAttrMarker;
108#ifdef XSLT_REFACTORED_XSLT_NSCOMP
110extern const xmlChar *xsltConstNamespaceNameXSLT;
117#define IS_XSLT_ELEM_FAST(n) \
118 (((n) != NULL) && ((n)->ns != NULL) && \
119 ((n)->ns->href == xsltConstNamespaceNameXSLT))
126#define IS_XSLT_ATTR_FAST(a) \
127 (((a) != NULL) && ((a)->ns != NULL) && \
128 ((a)->ns->href == xsltConstNamespaceNameXSLT))
135#define XSLT_HAS_INTERNAL_NSMAP(s) \
136 (((s) != NULL) && ((s)->principal) && \
137 ((s)->principal->principalData) && \
138 ((s)->principal->principalData->nsMap))
145#define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap)
154#define IS_XSLT_ELEM_FAST(n) \
155 (((n) != NULL) && ((n)->ns != NULL) && \
156 (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
163#define IS_XSLT_ATTR_FAST(a) \
164 (((a) != NULL) && ((a)->ns != NULL) && \
165 (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE)))
186typedef struct _xsltPointerList xsltPointerList;
187typedef xsltPointerList *xsltPointerListPtr;
188struct _xsltPointerList {
209#define XSLT_MAX_SORT 15
216#define XSLT_PAT_NO_PRIORITY -12345789
241#define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
249#define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
257#define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ
446#ifdef XSLT_REFACTORED
453 XSLT_FUNC_LITERAL_RESULT_ELEMENT,
454 XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
498#ifdef XSLT_REFACTORED
504 xsltPointerListCreate (
int initialSize);
506 xsltPointerListFree (xsltPointerListPtr
list);
508 xsltPointerListClear (xsltPointerListPtr
list);
510 xsltPointerListAddSize (xsltPointerListPtr
list,
520typedef struct _xsltNsListContainer xsltNsListContainer;
521typedef xsltNsListContainer *xsltNsListContainerPtr;
522struct _xsltNsListContainer {
537#define XSLT_ITEM_COMPATIBILITY_FIELDS \
538 xsltElemPreCompPtr next;\
540 xsltTransformFunction func;\
549#define XSLT_ITEM_NAVIGATION_FIELDS
561#define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs;
568#define XSLT_ITEM_COMMON_FIELDS \
569 XSLT_ITEM_COMPATIBILITY_FIELDS \
570 XSLT_ITEM_NAVIGATION_FIELDS \
571 XSLT_ITEM_NSINSCOPE_FIELDS
594 xsltNsListContainerPtr inScopeNs;
605typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem;
606typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr;
608struct _xsltStyleBasicEmptyItem {
609 XSLT_ITEM_COMMON_FIELDS
618typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem;
619typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr;
621struct _xsltStyleBasicExpressionItem {
622 XSLT_ITEM_COMMON_FIELDS
625 xmlXPathCompExprPtr comp;
645typedef struct _xsltStyleItemElement xsltStyleItemElement;
646typedef xsltStyleItemElement *xsltStyleItemElementPtr;
648struct _xsltStyleItemElement {
649 XSLT_ITEM_COMMON_FIELDS
670typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute;
671typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr;
673struct _xsltStyleItemAttribute {
674 XSLT_ITEM_COMMON_FIELDS
691typedef struct _xsltStyleItemText xsltStyleItemText;
692typedef xsltStyleItemText *xsltStyleItemTextPtr;
694struct _xsltStyleItemText {
695 XSLT_ITEM_COMMON_FIELDS
707typedef xsltStyleBasicEmptyItem xsltStyleItemComment;
708typedef xsltStyleItemComment *xsltStyleItemCommentPtr;
719typedef struct _xsltStyleItemPI xsltStyleItemPI;
720typedef xsltStyleItemPI *xsltStyleItemPIPtr;
722struct _xsltStyleItemPI {
723 XSLT_ITEM_COMMON_FIELDS
734typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports;
735typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr;
747typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates;
748typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr;
750struct _xsltStyleItemApplyTemplates {
751 XSLT_ITEM_COMMON_FIELDS
756 xmlXPathCompExprPtr comp;
769typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate;
770typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr;
772struct _xsltStyleItemCallTemplate {
773 XSLT_ITEM_COMMON_FIELDS
792typedef struct _xsltStyleItemCopy xsltStyleItemCopy;
793typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
795struct _xsltStyleItemCopy {
796 XSLT_ITEM_COMMON_FIELDS
810typedef struct _xsltStyleItemIf xsltStyleItemIf;
811typedef xsltStyleItemIf *xsltStyleItemIfPtr;
813struct _xsltStyleItemIf {
814 XSLT_ITEM_COMMON_FIELDS
817 xmlXPathCompExprPtr comp;
828typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf;
829typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr;
839typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf;
840typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr;
842struct _xsltStyleItemValueOf {
843 XSLT_ITEM_COMMON_FIELDS
846 xmlXPathCompExprPtr comp;
865typedef struct _xsltStyleItemNumber xsltStyleItemNumber;
866typedef xsltStyleItemNumber *xsltStyleItemNumberPtr;
868struct _xsltStyleItemNumber {
869 XSLT_ITEM_COMMON_FIELDS
881typedef xsltStyleBasicEmptyItem xsltStyleItemChoose;
882typedef xsltStyleItemChoose *xsltStyleItemChoosePtr;
892typedef xsltStyleBasicEmptyItem xsltStyleItemFallback;
893typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr;
904typedef xsltStyleBasicExpressionItem xsltStyleItemForEach;
905typedef xsltStyleItemForEach *xsltStyleItemForEachPtr;
916typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
917typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
919struct _xsltStyleItemMessage {
920 XSLT_ITEM_COMMON_FIELDS
929typedef struct _xsltStyleItemDocument xsltStyleItemDocument;
930typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr;
932struct _xsltStyleItemDocument {
933 XSLT_ITEM_COMMON_FIELDS
959typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable;
960typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr;
962struct _xsltStyleBasicItemVariable {
963 XSLT_ITEM_COMMON_FIELDS
966 xmlXPathCompExprPtr comp;
984typedef xsltStyleBasicItemVariable xsltStyleItemVariable;
985typedef xsltStyleItemVariable *xsltStyleItemVariablePtr;
997typedef struct _xsltStyleItemParam xsltStyleItemParam;
998typedef xsltStyleItemParam *xsltStyleItemParamPtr;
1000struct _xsltStyleItemParam {
1001 XSLT_ITEM_COMMON_FIELDS
1004 xmlXPathCompExprPtr comp;
1021typedef xsltStyleBasicItemVariable xsltStyleItemWithParam;
1022typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr;
1036typedef struct _xsltStyleItemSort xsltStyleItemSort;
1037typedef xsltStyleItemSort *xsltStyleItemSortPtr;
1039struct _xsltStyleItemSort {
1040 XSLT_ITEM_COMMON_FIELDS
1059 xmlXPathCompExprPtr comp;
1072typedef struct _xsltStyleItemWhen xsltStyleItemWhen;
1073typedef xsltStyleItemWhen *xsltStyleItemWhenPtr;
1075struct _xsltStyleItemWhen {
1076 XSLT_ITEM_COMMON_FIELDS
1079 xmlXPathCompExprPtr comp;
1090typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise;
1091typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr;
1093struct _xsltStyleItemOtherwise {
1094 XSLT_ITEM_COMMON_FIELDS
1097typedef struct _xsltStyleItemInclude xsltStyleItemInclude;
1098typedef xsltStyleItemInclude *xsltStyleItemIncludePtr;
1100struct _xsltStyleItemInclude {
1101 XSLT_ITEM_COMMON_FIELDS
1111typedef struct _xsltStyleItemUknown xsltStyleItemUknown;
1112typedef xsltStyleItemUknown *xsltStyleItemUknownPtr;
1113struct _xsltStyleItemUknown {
1114 XSLT_ITEM_COMMON_FIELDS
1144typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
1145typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
1146struct _xsltStyleItemExtElement {
1147 XSLT_ITEM_COMMON_FIELDS
1157typedef struct _xsltEffectiveNs xsltEffectiveNs;
1158typedef xsltEffectiveNs *xsltEffectiveNsPtr;
1159struct _xsltEffectiveNs {
1160 xsltEffectiveNsPtr nextInStore;
1161 xsltEffectiveNsPtr
next;
1178typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo;
1179typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr;
1180struct _xsltStyleItemLRElementInfo {
1181 XSLT_ITEM_COMMON_FIELDS
1191 xsltEffectiveNsPtr effectiveNs;
1195#ifdef XSLT_REFACTORED
1197typedef struct _xsltNsAlias xsltNsAlias;
1198typedef xsltNsAlias *xsltNsAliasPtr;
1199struct _xsltNsAlias {
1200 xsltNsAliasPtr
next;
1207#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1209typedef struct _xsltNsMap xsltNsMap;
1210typedef xsltNsMap *xsltNsMapPtr;
1227typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData;
1228typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr;
1230typedef struct _xsltNsList xsltNsList;
1231typedef xsltNsList *xsltNsListPtr;
1242typedef struct _xsltVarInfo xsltVarInfo;
1243typedef xsltVarInfo *xsltVarInfoPtr;
1244struct _xsltVarInfo {
1245 xsltVarInfoPtr
next;
1246 xsltVarInfoPtr prev;
1257typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo;
1258typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr;
1259struct _xsltCompilerNodeInfo {
1260 xsltCompilerNodeInfoPtr
next;
1261 xsltCompilerNodeInfoPtr prev;
1270 xsltNsListContainerPtr inScopeNs;
1272 xsltPointerListPtr exclResultNs;
1274 xsltPointerListPtr extElemNs;
1277 xsltStyleItemLRElementInfoPtr litResElemInfo;
1286 int preserveWhitespace;
1287 int stripWhitespace;
1291 int extContentHandled;
1301#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
1304 XSLT_ERROR_SEVERITY_ERROR = 0,
1305 XSLT_ERROR_SEVERITY_WARNING
1306} xsltErrorSeverityType;
1308typedef struct _xsltCompilerCtxt xsltCompilerCtxt;
1309typedef xsltCompilerCtxt *xsltCompilerCtxtPtr;
1310struct _xsltCompilerCtxt {
1314 xsltErrorSeverityType errSeverity;
1325 xsltCompilerNodeInfoPtr
inode;
1326 xsltCompilerNodeInfoPtr inodeList;
1327 xsltCompilerNodeInfoPtr inodeLast;
1328 xsltPointerListPtr tmpList;
1333 int hasForwardsCompat;
1343 xsltPrincipalStylesheetDataPtr psData;
1344 xsltStyleItemUknownPtr unknownItem;
1346 xsltNsAliasPtr nsAliases;
1347 xsltVarInfoPtr ivars;
1348 xsltVarInfoPtr ivar;
1442#ifdef XSLT_REFACTORED
1444struct _xsltPrincipalStylesheetData {
1454 xsltPointerListPtr inScopeNamespaces;
1458 xsltPointerListPtr exclResultNamespaces;
1462 xsltPointerListPtr extElemNamespaces;
1463 xsltEffectiveNsPtr effectiveNs;
1464#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1624#ifdef XSLT_REFACTORED
1628 xsltCompilerCtxtPtr compCtxt;
1630 xsltPrincipalStylesheetDataPtr principalData;
1649#ifdef XSLT_DEBUG_PROFILE_CACHE
1797#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
1805#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
1813#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
1821#ifndef XML_CAST_FPTR
1835#define XML_CAST_FPTR(fptr) fptr
1910 xmlXPathObjectPtr
obj);
1917 xmlXPathObjectPtr
obj,
1950#ifdef XSLT_REFACTORED
1952 xsltParseSequenceConstructor(
1953 xsltCompilerCtxtPtr cctxt,
1956 xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt,
1958#ifdef XSLT_REFACTORED_XSLT_NSCOMP
1960 xsltRestoreDocumentNamespaces(
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
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)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLdouble GLdouble GLint GLint order
void MSVCRT() terminate()
static unsigned int number
static unsigned __int64 next
struct _xsltDocument * includes
struct _xsltDocument * next
xsltElemPreCompDeallocator free
xsltTransformFunction func
struct _xsltKeyDef * next
xmlXPathCompExprPtr usecomp
struct _xsltKeyTable * next
struct _xsltStackElem * next
xsltTransformContextPtr context
xsltTransformFunction func
const xmlChar * case_order
struct _xsltCompMatch * rootMatch
xmlHashTablePtr nsAliases
struct _xsltStylesheet * next
xmlHashTablePtr namedTemplates
xsltTemplatePtr templates
struct _xsltCompMatch * textMatch
xmlXPathContextPtr xpathCtxt
struct _xsltStylesheet * imports
xsltDecimalFormatPtr decimalFormat
xsltStackElemPtr variables
struct _xsltCompMatch * elemMatch
struct _xsltCompMatch * piMatch
xmlHashTablePtr templatesHash
xsltElemPreCompPtr preComps
struct _xsltStylesheet * parent
struct _xsltCompMatch * parentMatch
xmlHashTablePtr cdataSection
struct _xsltCompMatch * attrMatch
const xmlChar * defaultAlias
struct _xsltCompMatch * commentMatch
xmlHashTablePtr stripSpaces
xsltStylesheetPtr principal
xmlHashTablePtr attributeSets
struct _xsltCompMatch * keyMatch
struct _xsltTemplate * next
struct _xsltStylesheet * style
xsltTemplatePtr * templCalledTab
xsltTemplatePtr * templTab
xmlHashTablePtr extElements
unsigned long * traceCode
xmlHashTablePtr extFunctions
xmlHashTablePtr globalVars
xsltTransformCachePtr cache
xmlNodePtr initialContextNode
xsltRuntimeExtraPtr extras
xsltTemplatePtr currentTemplateRule
xsltStackElemPtr * varsTab
xmlGenericErrorFunc error
xmlXPathContextPtr xpathCtxt
xmlDocPtr initialContextDoc
xsltDocumentPtr styleList
static const WCHAR lang[]
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
void(XMLCALL * xmlFreeFunc)(void *mem)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltLoadStylesheetPI(xmlDocPtr doc)
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultRegister(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj)
xsltTransformContext * xsltTransformContextPtr
xsltKeyDef * xsltKeyDefPtr
@ XSLT_FUNC_APPLYTEMPLATES
void(* xsltSortFunc)(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
XSLTPUBFUN void XSLTCALL xsltNumberFormat(xsltTransformContextPtr ctxt, xsltNumberDataPtr data, xmlNodePtr node)
XSLTPUBFUN void XSLTCALL xsltUninit(void)
XSLTPUBFUN void XSLTCALL xsltReleaseRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
XSLTPUBFUN void XSLTCALL xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetFile(const xmlChar *filename)
XSLTPUBFUN int XSLTCALL xsltRegisterPersistRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
XSLTPUBFUN void XSLTCALL xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ)
xsltTransformCache * xsltTransformCachePtr
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc)
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByName(xsltStylesheetPtr style, xmlChar *name)
xsltElemPreComp * xsltElemPreCompPtr
XSLTPUBFUN void XSLTCALL xsltFreeStylesheet(xsltStylesheetPtr style)
XSLTPUBFUN void XSLTCALL xsltFreeAVTList(void *avt)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNewStylesheet(void)
XSLTPUBFUN int XSLTCALL xsltIsBlank(xmlChar *str)
xsltStylesheet * xsltStylesheetPtr
xsltKeyTable * xsltKeyTablePtr
XSLTPUBFUN int XSLTCALL xsltAllocateExtraCtxt(xsltTransformContextPtr ctxt)
xsltRuntimeExtra * xsltRuntimeExtraPtr
XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByQName(xsltStylesheetPtr style, const xmlChar *nsUri, const xmlChar *name)
xsltTemplate * xsltTemplatePtr
XSLTPUBFUN void XSLTCALL xsltFreeStackElemList(xsltStackElemPtr elem)
XSLTPUBFUN int XSLTCALL xsltRegisterLocalRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
XSLTPUBFUN int XSLTCALL xsltRegisterTmpRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
xsltDecimalFormat * xsltDecimalFormatPtr
XSLTPUBFUN xmlXPathError XSLTCALL xsltFormatNumberConversion(xsltDecimalFormatPtr self, xmlChar *format, double number, xmlChar **result)
XSLTPUBFUN void XSLTCALL xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr)
void(* xsltElemPreCompDeallocator)(xsltElemPreCompPtr comp)
XSLTPUBFUN int XSLTCALL xsltParseStylesheetUser(xsltStylesheetPtr style, xmlDocPtr doc)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetImportedDoc(xmlDocPtr doc, xsltStylesheetPtr style)
XSLTPUBFUN xmlChar *XSLTCALL xsltEvalAVT(xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node)
xsltStackElem * xsltStackElemPtr
XSLTPUBFUN xmlDocPtr XSLTCALL xsltCreateRVT(xsltTransformContextPtr ctxt)
XSLTPUBFUN int XSLTCALL xsltFlagRVTs(xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj, void *val)
XSLTPUBFUN int XSLTCALL xsltAllocateExtra(xsltStylesheetPtr style)
xsltStylePreComp * xsltStylePreCompPtr
XSLTPUBFUN void XSLTCALL xsltFreeRVTs(xsltTransformContextPtr ctxt)
XSLTPUBFUN int XSLTCALL xsltInitAllDocKeys(xsltTransformContextPtr ctxt)
void(* xsltTransformFunction)(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr comp)
XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetDoc(xmlDocPtr doc)
xsltDocument * xsltDocumentPtr
XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultFinalize(xsltTransformContextPtr ctxt)
XSLTPUBFUN int XSLTCALL xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocumentPtr doc, xsltKeyDefPtr keyd)