~ubuntu-branches/ubuntu/trusty/libxslt/trusty

« back to all changes in this revision

Viewing changes to libxslt/xsltInternals.h

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2008-08-03 09:03:42 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080803090342-0gzx6fixj16lirxt
Tags: 1.1.24-2
libexslt/crypto.c: Apply upstream fix for CVE-2008-2935. Closes: #493162.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 * XSLT_REFACTORED_KEYCOMP:
61
61
 *
62
62
 * Internal define to enable on-demand xsl:key computation.
 
63
 * That's the only mode now but the define is kept for compatibility
63
64
 */
64
65
#define XSLT_REFACTORED_KEYCOMP
65
66
 
104
105
/* #define XSLT_REFACTORED_XSLT_NSCOMP */
105
106
 
106
107
/**
107
 
 * XSLT_REFACTORED_XPATHCOMP
 
108
 * XSLT_REFACTORED_XPATHCOMP:
108
109
 *
109
110
 * Internal define to enable the optimization of the
110
111
 * compilation of XPath expressions.
133
134
    (((a) != NULL) && ((a)->ns != NULL) && \
134
135
    ((a)->ns->href == xsltConstNamespaceNameXSLT))
135
136
 
 
137
/**
 
138
 * XSLT_HAS_INTERNAL_NSMAP:
 
139
 *
 
140
 * check for namespace mapping
 
141
 */
136
142
#define XSLT_HAS_INTERNAL_NSMAP(s) \
137
143
    (((s) != NULL) && ((s)->principal) && \
138
144
     ((s)->principal->principalData) && \
139
145
     ((s)->principal->principalData->nsMap))
140
146
 
 
147
/**
 
148
 * XSLT_GET_INTERNAL_NSMAP:
 
149
 *
 
150
 * get pointer to namespace map
 
151
 */
141
152
#define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap)
142
153
 
143
154
#else /* XSLT_REFACTORED_XSLT_NSCOMP */
144
155
 
 
156
/**
 
157
 * IS_XSLT_ELEM_FAST:
 
158
 *
 
159
 * quick check whether this is an xslt element
 
160
 */
145
161
#define IS_XSLT_ELEM_FAST(n) \
146
162
    (((n) != NULL) && ((n)->ns != NULL) && \
147
163
     (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
148
164
 
 
165
/**
 
166
 * IS_XSLT_ATTR_FAST:
 
167
 *
 
168
 * quick check for xslt namespace attribute
 
169
 */
149
170
#define IS_XSLT_ATTR_FAST(a) \
150
171
    (((a) != NULL) && ((a)->ns != NULL) && \
151
172
     (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE)))
1273
1294
    xsltStyleType curChildType;    
1274
1295
};
1275
1296
 
 
1297
/**
 
1298
 * XSLT_CCTXT:
 
1299
 *
 
1300
 * get pointer to compiler context
 
1301
 */
1276
1302
#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt) 
1277
1303
 
1278
1304
typedef enum {
1732
1758
    int parserOptions;                  /* parser options xmlParserOption */
1733
1759
 
1734
1760
    /*
1735
 
     * dictionnary: shared between stylesheet, context and documents.
 
1761
     * dictionary: shared between stylesheet, context and documents.
1736
1762
     */
1737
1763
    xmlDictPtr dict;
1738
1764
    xmlDocPtr           tmpDoc; /* Obsolete; not used in the library. */
1741
1767
     */
1742
1768
    int internalized;
1743
1769
    int nbKeys;
1744
 
    int hasTemplKeyPatterns;    
1745
 
    xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */    
 
1770
    int hasTemplKeyPatterns;
 
1771
    xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */
1746
1772
    xmlNodePtr initialContextNode;
1747
1773
    xmlDocPtr initialContextDoc;
1748
1774
    xsltTransformCachePtr cache;
1750
1776
    xmlDocPtr localRVT; /* list of local tree fragments; will be freed when
1751
1777
                           the instruction which created the fragment
1752
1778
                           exits */
1753
 
    xmlDocPtr localRVTBase;    
 
1779
    xmlDocPtr localRVTBase;
 
1780
    int keyInitLevel;   /* Needed to catch recursive keys issues */
1754
1781
};
1755
1782
 
1756
1783
/**
1933
1960
                        xsltInitCtxtKey         (xsltTransformContextPtr ctxt,
1934
1961
                                                 xsltDocumentPtr doc,
1935
1962
                                                 xsltKeyDefPtr keyd);
1936
 
 
 
1963
XSLTPUBFUN int XSLTCALL
 
1964
                        xsltInitAllDocKeys      (xsltTransformContextPtr ctxt);
1937
1965
#ifdef __cplusplus
1938
1966
}
1939
1967
#endif