20 #ifdef WITH_XSLT_DEBUG 21 #define WITH_XSLT_DEBUG_PREPROC 32 #ifdef XSLT_REFACTORED 57 "internal problem: element has no parent\n");
69 "element %s only allowed as child of stylesheet\n",
91 (
style->literal_result))
99 "internal problem: element has no parent\n");
125 "element %s only allowed within a template, variable or param\n",
146 (
style->literal_result))
152 "internal problem: element has no parent\n");
178 "element %s is not allowed within that context\n",
203 #ifdef XSLT_REFACTORED 210 #ifdef XSLT_REFACTORED 217 size =
sizeof(xsltStyleItemCopy);
break;
219 size =
sizeof(xsltStyleItemSort);
break;
221 size =
sizeof(xsltStyleItemText);
break;
223 size =
sizeof(xsltStyleItemElement);
break;
225 size =
sizeof(xsltStyleItemAttribute);
break;
227 size =
sizeof(xsltStyleItemComment);
break;
229 size =
sizeof(xsltStyleItemPI);
break;
231 size =
sizeof(xsltStyleItemCopyOf);
break;
233 size =
sizeof(xsltStyleItemValueOf);
break;;
235 size =
sizeof(xsltStyleItemNumber);
break;
237 size =
sizeof(xsltStyleItemApplyImports);
break;
239 size =
sizeof(xsltStyleItemCallTemplate);
break;
241 size =
sizeof(xsltStyleItemApplyTemplates);
break;
243 size =
sizeof(xsltStyleItemChoose);
break;
245 size =
sizeof(xsltStyleItemIf);
break;
247 size =
sizeof(xsltStyleItemForEach);
break;
249 size =
sizeof(xsltStyleItemDocument);
break;
251 size =
sizeof(xsltStyleItemWithParam);
break;
253 size =
sizeof(xsltStyleItemParam);
break;
255 size =
sizeof(xsltStyleItemVariable);
break;
257 size =
sizeof(xsltStyleItemWhen);
break;
258 case XSLT_FUNC_OTHERWISE:
259 size =
sizeof(xsltStyleItemOtherwise);
break;
262 "xsltNewStylePreComp : invalid type %d\n",
type);
272 "xsltNewStylePreComp : malloc failed\n");
285 "xsltNewStylePreComp : malloc failed\n");
340 "xsltNewStylePreComp : no function for type %d\n",
type);
360 #ifdef XSLT_REFACTORED 364 switch (comp->
type) {
365 case XSLT_FUNC_LITERAL_RESULT_ELEMENT:
370 xsltStyleItemSortPtr
item = (xsltStyleItemSortPtr) comp;
374 xmlXPathFreeCompExpr(
item->comp);
388 xsltStyleItemCopyOfPtr
item = (xsltStyleItemCopyOfPtr) comp;
390 xmlXPathFreeCompExpr(
item->comp);
394 xsltStyleItemValueOfPtr
item = (xsltStyleItemValueOfPtr) comp;
396 xmlXPathFreeCompExpr(
item->comp);
400 xsltStyleItemNumberPtr
item = (xsltStyleItemNumberPtr) comp;
412 xsltStyleItemApplyTemplatesPtr
item =
413 (xsltStyleItemApplyTemplatesPtr) comp;
415 xmlXPathFreeCompExpr(
item->comp);
421 xsltStyleItemIfPtr
item = (xsltStyleItemIfPtr) comp;
423 xmlXPathFreeCompExpr(
item->comp);
427 xsltStyleItemForEachPtr
item =
428 (xsltStyleItemForEachPtr) comp;
430 xmlXPathFreeCompExpr(
item->comp);
436 xsltStyleItemWithParamPtr
item =
437 (xsltStyleItemWithParamPtr) comp;
439 xmlXPathFreeCompExpr(
item->comp);
443 xsltStyleItemParamPtr
item =
444 (xsltStyleItemParamPtr) comp;
446 xmlXPathFreeCompExpr(
item->comp);
450 xsltStyleItemVariablePtr
item =
451 (xsltStyleItemVariablePtr) comp;
453 xmlXPathFreeCompExpr(
item->comp);
457 xsltStyleItemWhenPtr
item =
458 (xsltStyleItemWhenPtr) comp;
460 xmlXPathFreeCompExpr(
item->comp);
463 case XSLT_FUNC_OTHERWISE:
464 case XSLT_FUNC_FALLBACK:
465 case XSLT_FUNC_MESSAGE:
466 case XSLT_FUNC_INCLUDE:
467 case XSLT_FUNC_ATTRSET:
478 xmlXPathFreeCompExpr(comp->
comp);
510 #ifdef XSLT_REFACTORED 511 xsltStyleItemDocumentPtr comp;
529 #ifdef XSLT_REFACTORED 530 comp = (xsltStyleItemDocumentPtr)
542 #ifdef WITH_XSLT_DEBUG_EXTRA 544 "Found saxon:output extension\n");
558 #ifdef WITH_XSLT_DEBUG_EXTRA 560 "Found xalan:write extension\n");
579 #ifdef WITH_XSLT_DEBUG_EXTRA 581 "Found xslt11:document construct\n");
585 (
const xmlChar *)
"http://exslt.org/common")) {
587 #ifdef WITH_XSLT_DEBUG_EXTRA 589 "Found exslt:document extension\n");
593 #ifdef WITH_XSLT_DEBUG_EXTRA 595 "Found xt:document extension\n");
654 #ifdef XSLT_REFACTORED 655 xsltStyleItemSortPtr comp;
662 #ifdef XSLT_REFACTORED 683 "xsltSortComp: no support for data-type = %s\n", comp->
stype);
698 "xsltSortComp: invalid value %s for order\n", comp->
order);
713 "xsltSortComp: invalid value %s for order\n", comp->
order);
741 "xsltSortComp: could not compile select expression '%s'\n",
747 "xsl:sort : is not empty\n");
761 #ifdef XSLT_REFACTORED 762 xsltStyleItemCopyPtr comp;
769 #ifdef XSLT_REFACTORED 789 #ifdef XSLT_REFACTORED 804 #ifdef XSLT_REFACTORED 805 xsltStyleItemTextPtr comp;
814 #ifdef XSLT_REFACTORED 826 (
const xmlChar *)
"disable-output-escaping",
834 "xsl:text: disable-output-escaping allows only yes or no\n");
850 #ifdef XSLT_REFACTORED 851 xsltStyleItemElementPtr comp;
867 #ifdef XSLT_REFACTORED 888 "xsl:element: The attribute 'name' is missing.\n");
902 if (xmlValidateQName(comp->
name, 0)) {
904 "xsl:element: The value '%s' of the attribute 'name' is " 905 "not a valid QName.\n", comp->
name);
925 #ifdef XSLT_REFACTORED 926 comp->nsPrefix = prefix;
931 }
else if (prefix !=
NULL) {
933 "xsl:element: The prefixed QName '%s' " 934 "has no namespace binding in scope in the " 935 "stylesheet; this is an error, since the namespace was " 936 "not specified by the instruction itself.\n", comp->
name);
940 if ((prefix !=
NULL) &&
954 (
const xmlChar *)
"use-attribute-sets",
970 #ifdef XSLT_REFACTORED 971 xsltStyleItemAttributePtr comp;
986 #ifdef XSLT_REFACTORED 1009 "XSLT-attribute: The attribute 'name' is missing.\n");
1024 if (xmlValidateQName(comp->
name, 0)) {
1026 "xsl:attribute: The value '%s' of the attribute 'name' is " 1027 "not a valid QName.\n", comp->
name);
1031 "xsl:attribute: The attribute name 'xmlns' is not allowed.\n");
1037 if (prefix !=
NULL) {
1052 #ifdef XSLT_REFACTORED 1053 comp->nsPrefix = prefix;
1060 "xsl:attribute: The prefixed QName '%s' " 1061 "has no namespace binding in scope in the " 1062 "stylesheet; this is an error, since the " 1063 "namespace was not specified by the instruction " 1064 "itself.\n", comp->
name);
1082 #ifdef XSLT_REFACTORED 1083 xsltStyleItemCommentPtr comp;
1091 #ifdef XSLT_REFACTORED 1112 #ifdef XSLT_REFACTORED 1113 xsltStyleItemPIPtr comp;
1121 #ifdef XSLT_REFACTORED 1146 #ifdef XSLT_REFACTORED 1147 xsltStyleItemCopyOfPtr comp;
1155 #ifdef XSLT_REFACTORED 1170 "xsl:copy-of : select is missing\n");
1177 "xsl:copy-of : could not compile select expression '%s'\n",
1192 #ifdef XSLT_REFACTORED 1193 xsltStyleItemValueOfPtr comp;
1202 #ifdef XSLT_REFACTORED 1214 (
const xmlChar *)
"disable-output-escaping",
1222 "xsl:value-of : disable-output-escaping allows only yes or no\n");
1230 "xsl:value-of : select is missing\n");
1237 "xsl:value-of : could not compile select expression '%s'\n",
1247 int *hasProp,
const xmlChar **nsName,
1263 "The attribute '%s' is missing.\n", propName);
1270 if (xmlValidateQName(prop, 0)) {
1272 "The value '%s' of the attribute " 1273 "'%s' is not a valid QName.\n", prop, propName);
1319 #ifdef XSLT_REFACTORED 1320 xsltStyleItemWithParamPtr comp;
1328 #ifdef XSLT_REFACTORED 1355 "XSLT-with-param: Failed to compile select " 1356 "expression '%s'\n", comp->
select);
1361 "XSLT-with-param: The content should be empty since " 1362 "the attribute select is present.\n");
1377 #ifdef XSLT_REFACTORED 1378 xsltStyleItemNumberPtr comp;
1387 #ifdef XSLT_REFACTORED 1436 "xsl:number : invalid value %s for level\n", prop);
1444 "xsl:number : lang attribute not implemented\n");
1452 "xsl:number : letter-value 'alphabetic' not implemented\n");
1457 "xsl:number : letter-value 'traditional' not implemented\n");
1462 "xsl:number : invalid value %s for letter-value\n", prop);
1501 #ifdef XSLT_REFACTORED 1502 xsltStyleItemApplyImportsPtr comp;
1510 #ifdef XSLT_REFACTORED 1531 #ifdef XSLT_REFACTORED 1532 xsltStyleItemCallTemplatePtr comp;
1540 #ifdef XSLT_REFACTORED 1541 comp = (xsltStyleItemCallTemplatePtr)
1570 #ifdef XSLT_REFACTORED 1571 xsltStyleItemApplyTemplatesPtr comp;
1579 #ifdef XSLT_REFACTORED 1580 comp = (xsltStyleItemApplyTemplatesPtr)
1605 "XSLT-apply-templates: could not compile select " 1606 "expression '%s'\n", comp->
select);
1622 #ifdef XSLT_REFACTORED 1623 xsltStyleItemChoosePtr comp;
1631 #ifdef XSLT_REFACTORED 1632 comp = (xsltStyleItemChoosePtr)
1653 #ifdef XSLT_REFACTORED 1654 xsltStyleItemIfPtr comp;
1662 #ifdef XSLT_REFACTORED 1663 comp = (xsltStyleItemIfPtr)
1677 "xsl:if : test is not defined\n");
1684 "xsl:if : could not compile test expression '%s'\n",
1699 #ifdef XSLT_REFACTORED 1700 xsltStyleItemWhenPtr comp;
1708 #ifdef XSLT_REFACTORED 1709 comp = (xsltStyleItemWhenPtr)
1723 "xsl:when : test is not defined\n");
1730 "xsl:when : could not compile test expression '%s'\n",
1745 #ifdef XSLT_REFACTORED 1746 xsltStyleItemForEachPtr comp;
1754 #ifdef XSLT_REFACTORED 1755 comp = (xsltStyleItemForEachPtr)
1770 "xsl:for-each : select is missing\n");
1776 "xsl:for-each : could not compile select expression '%s'\n",
1793 #ifdef XSLT_REFACTORED 1794 xsltStyleItemVariablePtr comp;
1802 #ifdef XSLT_REFACTORED 1803 comp = (xsltStyleItemVariablePtr)
1831 #ifndef XSLT_REFACTORED 1837 "XSLT-variable: Failed to compile the XPath expression '%s'.\n",
1841 #ifdef XSLT_REFACTORED 1844 "XSLT-variable: There must be no child nodes, since the " 1845 "attribute 'select' was specified.\n");
1854 "XSLT-variable: There must be no child nodes, since the " 1855 "attribute 'select' was specified.\n");
1872 #ifdef XSLT_REFACTORED 1873 xsltStyleItemParamPtr comp;
1881 #ifdef XSLT_REFACTORED 1882 comp = (xsltStyleItemParamPtr)
1909 "XSLT-param: could not compile select expression '%s'.\n",
1915 "XSLT-param: The content should be empty since the " 1916 "attribute 'select' is present.\n");
1941 cur =
style->preComps;
1942 while (cur !=
NULL) {
1952 #ifdef XSLT_REFACTORED 1976 if (! IS_XSLT_ELEM_FAST(
node))
2006 case XSLT_FUNC_OTHERWISE:
2042 case XSLT_FUNC_FALLBACK:
2050 case XSLT_FUNC_MESSAGE:
2060 "Internal error: (xsltStylePreCompute) cannot handle " 2061 "the XSLT element '%s'.\n",
node->name);
2149 "Internal error: (xsltStylePreCompute) cannot handle " 2150 "the XSLT element '%s'.\n",
node->name);
2161 XSLT_CCTXT(
style)->inode->inScopeNs;
2250 }
else if (
IS_XSLT_NAME(inst,
"processing-instruction")) {
2286 "element %s only allowed only as root element\n",
2319 }
else if ((
style ==
NULL) || (
style->forwards_compatible == 0)) {
2321 "xsltStylePreCompute: unknown xsl:%s\n", inst->
name);
2333 cur->
nsList = xmlGetNsList(inst->
doc, inst);
static void xsltProcessingInstructionComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst)
void xsltAttribute(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst, xsltElemPreCompPtr castedComp)
void xsltFreeCompMatchList(xsltCompMatchPtr comp)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
static void xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltForEachComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltTextComp(xsltStylesheetPtr style, xmlNodePtr inst)
void(* xsltTransformFunction)(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr comp)
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
static void xsltGetQNameProperty(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *propName, int mandatory, int *hasProp, const xmlChar **nsName, const xmlChar **localName)
xmlXPathCompExprPtr xsltXPathCompile(xsltStylesheetPtr style, const xmlChar *str)
struct _xsltCompMatch * countPat
static void xsltFreeStylePreComp(xsltStylePreCompPtr comp)
GLuint GLuint GLsizei GLenum type
int xsltIsBlank(xmlChar *str)
static void xsltValueOfComp(xsltStylesheetPtr style, xmlNodePtr inst)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int xsltGetUTF8Char(const unsigned char *utf, int *len)
static void xsltCommentComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltIfComp(xsltStylesheetPtr style, xmlNodePtr inst)
XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace)
static void xsltApplyTemplatesComp(xsltStylesheetPtr style, xmlNodePtr inst)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
void xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltCallTemplateComp(xsltStylesheetPtr style, xmlNodePtr inst)
void * xsltGenericDebugContext
const xmlChar * xsltSplitQName(xmlDictPtr dict, const xmlChar *name, const xmlChar **prefix)
xsltElemPreCompPtr xsltPreComputeExtModuleElement(xsltStylesheetPtr style, xmlNodePtr inst)
void xsltFreeLocale(xsltLocale locale)
xsltTransformFunction func
XMLPUBVAR xmlFreeFunc xmlFree
static void xsltCheckInstructionElement(xsltStylesheetPtr style, xmlNodePtr inst)
const xmlChar * xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns, int *found)
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
xmlGenericErrorFunc xsltGenericDebug
static void xsltCheckParentElement(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *allow1, const xmlChar *allow2)
const xmlChar * case_order
xsltElemPreCompDeallocator free
xsltElemPreCompPtr xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function ATTRIBUTE_UNUSED)
xsltElemPreComp * xsltElemPreCompPtr
xsltStylePreComp * xsltStylePreCompPtr
static void xsltWhenComp(xsltStylesheetPtr style, xmlNodePtr inst)
void xsltFreeStylePreComps(xsltStylesheetPtr style)
static unsigned __int64 next
static int xsltCheckTopLevelElement(xsltStylesheetPtr style, xmlNodePtr inst, int err)
static void xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur)
xsltCompMatchPtr xsltCompilePattern(const xmlChar *pattern, xmlDocPtr doc, xmlNodePtr node, xsltStylesheetPtr style, xsltTransformContextPtr runtime)
static void xsltApplyImportsComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltWithParamComp(xsltStylesheetPtr style, xmlNodePtr inst)
XMLPUBVAR xmlMallocFunc xmlMalloc
xsltLocale xsltNewLocale(const xmlChar *languageTag)
static void xsltCopyComp(xsltStylesheetPtr style, xmlNodePtr inst)
const xmlChar * xsltGetCNsProp(xsltStylesheetPtr style, xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace)
const xmlChar * xsltGetQNameURI2(xsltStylesheetPtr style, xmlNodePtr node, const xmlChar **name)
struct _xmlNode * children
static xsltStylePreCompPtr xsltNewStylePreComp(xsltStylesheetPtr style, xsltStyleType type)
struct _xsltCompMatch * fromPat
static void xsltChooseComp(xsltStylesheetPtr style, xmlNodePtr inst)
XMLPUBFUN void *XMLCALL xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)
XMLPUBFUN int XMLCALL xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
#define IS_XSLT_NAME(n, val)
static void xsltCopyOfComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltSortComp(xsltStylesheetPtr style, xmlNodePtr inst)
static void xsltParamComp(xsltStylesheetPtr style, xmlNodePtr inst)
const xmlChar * xsltExtMarker
GLuint const GLchar * name