35#define WITH_XSLT_DEBUG_TEMPLATES
58 xmlNsPtr *nsList,
int nsNr) {
60 xmlXPathObjectPtr
res;
62 xmlNsPtr *oldNamespaces;
64 int oldProximityPosition, oldContextSize;
68 "xsltEvalXPathPredicate: No context or instruction\n");
72 oldContextSize = ctxt->
xpathCtxt->contextSize;
73 oldProximityPosition = ctxt->
xpathCtxt->proximityPosition;
75 oldNamespaces = ctxt->
xpathCtxt->namespaces;
86 xmlXPathFreeObject(
res);
87#ifdef WITH_XSLT_DEBUG_TEMPLATES
89 "xsltEvalXPathPredicate: returns %d\n",
ret));
92#ifdef WITH_XSLT_DEBUG_TEMPLATES
94 "xsltEvalXPathPredicate: failed\n"));
101 ctxt->
xpathCtxt->namespaces = oldNamespaces;
102 ctxt->
inst = oldInst;
103 ctxt->
xpathCtxt->contextSize = oldContextSize;
104 ctxt->
xpathCtxt->proximityPosition = oldProximityPosition;
124 int nsNr, xmlNsPtr *nsList) {
126 xmlXPathObjectPtr
res;
131 xmlNsPtr *oldNamespaces;
135 "xsltEvalXPathStringNs: No context or instruction\n");
139 oldInst = ctxt->
inst;
140 oldNode = ctxt->
node;
141 oldPos = ctxt->
xpathCtxt->proximityPosition;
144 oldNamespaces = ctxt->
xpathCtxt->namespaces;
152 if (
res->type != XPATH_STRING)
153 res = xmlXPathConvertString(
res);
154 if ((
res !=
NULL) && (
res->type == XPATH_STRING)) {
159 "xpath : string() function didn't return a String\n");
161 xmlXPathFreeObject(
res);
165#ifdef WITH_XSLT_DEBUG_TEMPLATES
167 "xsltEvalXPathString: returns %s\n",
ret));
169 ctxt->
inst = oldInst;
170 ctxt->
node = oldNode;
172 ctxt->
xpathCtxt->proximityPosition = oldPos;
174 ctxt->
xpathCtxt->namespaces = oldNamespaces;
208 xmlNodePtr contextNode,
211 xmlNodePtr oldInsert, insert =
NULL;
214 int oldLastTextSize, oldLastTextUse;
216 if ((ctxt ==
NULL) || (contextNode ==
NULL) || (inst ==
NULL) ||
217 (inst->type != XML_ELEMENT_NODE))
220 if (inst->children ==
NULL)
231 if (insert ==
NULL) {
233 "Failed to create temporary node\n");
251 ret = xmlNodeGetContent(insert);
284 xmlNsPtr *nsList =
NULL;
294 if (*(
cur+1) ==
'{') {
304 while ((*
cur != 0) && (*
cur !=
'}')) {
306 if ((*
cur ==
'\'') || (*
cur ==
'"')) {
307 char delim = *(
cur++);
308 while ((*
cur != 0) && (*
cur != delim))
317 "xsltAttrTemplateValueProcessNode: unmatched '{'\n");
325 else if (*
expr ==
'{') {
329 xmlXPathCompExprPtr comp;
333 if ((nsList ==
NULL) && (inst !=
NULL)) {
336 nsList = xmlGetNsList(inst->doc, inst);
337 if (nsList !=
NULL) {
338 while (nsList[
i] !=
NULL)
345 xmlXPathFreeCompExpr(comp);
354 }
else if (*
cur ==
'}') {
363 "xsltAttrTemplateValueProcessNode: unmatched '}'\n");
417 (inst->type != XML_ELEMENT_NODE))
431#ifdef WITH_XSLT_DEBUG_TEMPLATES
433 "xsltEvalAttrValueTemplate: %s returns %s\n",
expr,
ret));
462 (inst->type != XML_ELEMENT_NODE))
504 (
target->type != XML_ELEMENT_NODE))
507 if (
attr->type != XML_ATTRIBUTE_NODE)
513#ifdef XSLT_REFACTORED
514 if (
attr->psvi == xsltXSLTAttrMarker)
524 if ((
attr->children->type != XML_TEXT_NODE) ||
528 "Internal error: The children of an attribute node of a "
529 "literal result element are not in the expected form.\n");
552 xmlFreeNodeList(
ret->children);
580 text->parent = (xmlNodePtr)
ret;
596 "Internal error: Failed to evaluate the AVT "
597 "of attribute '{%s}%s'.\n",
601 "Internal error: Failed to evaluate the AVT "
602 "of attribute '%s'.\n",
621 "Internal error: Failed to create attribute '{%s}%s'.\n",
625 "Internal error: Failed to create attribute '%s'.\n",
654 xmlNodePtr
target, xmlAttrPtr attrs)
657 xmlNodePtr oldInsert,
text;
658 xmlNsPtr origNs =
NULL, copyNs =
NULL;
664 (
target->type != XML_ELEMENT_NODE))
675#ifdef XSLT_REFACTORED
676 if ((
attr->psvi == xsltXSLTAttrMarker) &&
704#ifdef XSLT_REFACTORED
705 if (
attr->psvi == xsltXSLTAttrMarker) {
719 if ((
attr->children->type != XML_TEXT_NODE) ||
723 "Internal error: The children of an attribute node of a "
724 "literal result element are not in the expected form.\n");
736 if (
attr->ns != origNs) {
739#ifdef XSLT_REFACTORED
783 "Internal error: Failed to create attribute '{%s}%s'.\n",
787 "Internal error: Failed to create attribute '%s'.\n",
807 if (valueAVT ==
NULL) {
814 "Internal error: Failed to evaluate the AVT "
815 "of attribute '{%s}%s'.\n",
819 "Internal error: Failed to evaluate the AVT "
820 "of attribute '%s'.\n",
826 text->content = valueAVT;
847 return(
target->properties);
xmlChar * xsltEvalAVT(xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
void xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, const xmlChar *attrSets)
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
#define next_attribute(a)
xmlNsPtr xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, const xmlChar *nsName, const xmlChar *nsPrefix, xmlNodePtr target)
xmlNsPtr xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out)
int xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
const xmlChar * xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
xmlXPathContextPtr xpathCtxt
xmlChar * xsltEvalXPathString(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp)
const xmlChar * xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns, int *found)
xmlChar * xsltAttrTemplateValueProcess(xsltTransformContextPtr ctxt, const xmlChar *str)
xmlChar * xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt, const xmlChar *str, xmlNodePtr inst)
xmlChar * xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns)
xmlAttrPtr xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr attrs)
xmlAttrPtr xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr attr)
xmlNodePtr * xsltTemplateProcess(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, xmlNodePtr node)
xmlChar * xsltEvalTemplateString(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst)
xmlChar * xsltEvalXPathStringNs(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, int nsNr, xmlNsPtr *nsList)
int xsltEvalXPathPredicate(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, xmlNsPtr *nsList, int nsNr)
XMLPUBFUN xmlIDPtr xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr)
XMLPUBFUN int xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)
XMLPUBFUN xmlChar * xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN xmlChar * xmlStrncat(xmlChar *cur, const xmlChar *add, int len)
XMLPUBFUN xmlChar * xmlStrcat(xmlChar *cur, const xmlChar *add)
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN const xmlChar * xmlStrchr(const xmlChar *str, xmlChar val)
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
xmlGenericErrorFunc xsltGenericDebug
void * xsltGenericDebugContext
xmlChar * xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace)
#define XSLT_TRACE(ctxt, code, call)