ReactOS 0.4.16-dev-2206-gc56950d
templates.c
Go to the documentation of this file.
1/*
2 * templates.c: Implementation of the template processing
3 *
4 * Reference:
5 * http://www.w3.org/TR/1999/REC-xslt-19991116
6 *
7 * See Copyright for the status of this software.
8 *
9 * daniel@veillard.com
10 */
11
12#define IN_LIBXSLT
13#include "libxslt.h"
14
15#include <string.h>
16
17#include <libxml/xmlmemory.h>
18#include <libxml/globals.h>
19#include <libxml/xmlerror.h>
20#include <libxml/tree.h>
21#include <libxml/dict.h>
24#include "xslt.h"
25#include "xsltInternals.h"
26#include "xsltutils.h"
27#include "variables.h"
28#include "functions.h"
29#include "templates.h"
30#include "transform.h"
31#include "namespaces.h"
32#include "attributes.h"
33
34#ifdef WITH_XSLT_DEBUG
35#define WITH_XSLT_DEBUG_TEMPLATES
36#endif
37
38/************************************************************************
39 * *
40 * Module interfaces *
41 * *
42 ************************************************************************/
43
56int
57xsltEvalXPathPredicate(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp,
58 xmlNsPtr *nsList, int nsNr) {
59 int ret;
60 xmlXPathObjectPtr res;
61 int oldNsNr;
62 xmlNsPtr *oldNamespaces;
63 xmlNodePtr oldInst;
64 int oldProximityPosition, oldContextSize;
65
66 if ((ctxt == NULL) || (ctxt->inst == NULL)) {
68 "xsltEvalXPathPredicate: No context or instruction\n");
69 return(0);
70 }
71
72 oldContextSize = ctxt->xpathCtxt->contextSize;
73 oldProximityPosition = ctxt->xpathCtxt->proximityPosition;
74 oldNsNr = ctxt->xpathCtxt->nsNr;
75 oldNamespaces = ctxt->xpathCtxt->namespaces;
76 oldInst = ctxt->inst;
77
78 ctxt->xpathCtxt->node = ctxt->node;
79 ctxt->xpathCtxt->namespaces = nsList;
80 ctxt->xpathCtxt->nsNr = nsNr;
81
82 res = xmlXPathCompiledEval(comp, ctxt->xpathCtxt);
83
84 if (res != NULL) {
85 ret = xmlXPathEvalPredicate(ctxt->xpathCtxt, res);
86 xmlXPathFreeObject(res);
87#ifdef WITH_XSLT_DEBUG_TEMPLATES
89 "xsltEvalXPathPredicate: returns %d\n", ret));
90#endif
91 } else {
92#ifdef WITH_XSLT_DEBUG_TEMPLATES
94 "xsltEvalXPathPredicate: failed\n"));
95#endif
97 ret = 0;
98 }
99 ctxt->xpathCtxt->nsNr = oldNsNr;
100
101 ctxt->xpathCtxt->namespaces = oldNamespaces;
102 ctxt->inst = oldInst;
103 ctxt->xpathCtxt->contextSize = oldContextSize;
104 ctxt->xpathCtxt->proximityPosition = oldProximityPosition;
105
106 return(ret);
107}
108
122xmlChar *
123xsltEvalXPathStringNs(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp,
124 int nsNr, xmlNsPtr *nsList) {
125 xmlChar *ret = NULL;
126 xmlXPathObjectPtr res;
127 xmlNodePtr oldInst;
128 xmlNodePtr oldNode;
129 int oldPos, oldSize;
130 int oldNsNr;
131 xmlNsPtr *oldNamespaces;
132
133 if ((ctxt == NULL) || (ctxt->inst == NULL)) {
135 "xsltEvalXPathStringNs: No context or instruction\n");
136 return(0);
137 }
138
139 oldInst = ctxt->inst;
140 oldNode = ctxt->node;
141 oldPos = ctxt->xpathCtxt->proximityPosition;
142 oldSize = ctxt->xpathCtxt->contextSize;
143 oldNsNr = ctxt->xpathCtxt->nsNr;
144 oldNamespaces = ctxt->xpathCtxt->namespaces;
145
146 ctxt->xpathCtxt->node = ctxt->node;
147 /* TODO: do we need to propagate the namespaces here ? */
148 ctxt->xpathCtxt->namespaces = nsList;
149 ctxt->xpathCtxt->nsNr = nsNr;
150 res = xmlXPathCompiledEval(comp, ctxt->xpathCtxt);
151 if (res != NULL) {
152 if (res->type != XPATH_STRING)
153 res = xmlXPathConvertString(res);
154 if ((res != NULL) && (res->type == XPATH_STRING)) {
155 ret = res->stringval;
156 res->stringval = NULL;
157 } else {
159 "xpath : string() function didn't return a String\n");
160 }
161 xmlXPathFreeObject(res);
162 } else {
164 }
165#ifdef WITH_XSLT_DEBUG_TEMPLATES
167 "xsltEvalXPathString: returns %s\n", ret));
168#endif
169 ctxt->inst = oldInst;
170 ctxt->node = oldNode;
171 ctxt->xpathCtxt->contextSize = oldSize;
172 ctxt->xpathCtxt->proximityPosition = oldPos;
173 ctxt->xpathCtxt->nsNr = oldNsNr;
174 ctxt->xpathCtxt->namespaces = oldNamespaces;
175 return(ret);
176}
177
188xmlChar *
189xsltEvalXPathString(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp) {
190 return(xsltEvalXPathStringNs(ctxt, comp, 0, NULL));
191}
192
206xmlChar *
208 xmlNodePtr contextNode,
209 xmlNodePtr inst)
210{
211 xmlNodePtr oldInsert, insert = NULL;
212 xmlChar *ret;
213 const xmlChar *oldLastText;
214 int oldLastTextSize, oldLastTextUse;
215
216 if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL) ||
217 (inst->type != XML_ELEMENT_NODE))
218 return(NULL);
219
220 if (inst->children == NULL)
221 return(NULL);
222
223 /*
224 * This creates a temporary element-node to add the resulting
225 * text content to.
226 * OPTIMIZE TODO: Keep such an element-node in the transformation
227 * context to avoid creating it every time.
228 */
229 insert = xmlNewDocNode(ctxt->output, NULL,
230 (const xmlChar *)"fake", NULL);
231 if (insert == NULL) {
232 xsltTransformError(ctxt, NULL, inst,
233 "Failed to create temporary node\n");
234 return(NULL);
235 }
236 oldInsert = ctxt->insert;
237 ctxt->insert = insert;
238 oldLastText = ctxt->lasttext;
239 oldLastTextSize = ctxt->lasttsize;
240 oldLastTextUse = ctxt->lasttuse;
241 /*
242 * OPTIMIZE TODO: if inst->children consists only of text-nodes.
243 */
244 xsltApplyOneTemplate(ctxt, contextNode, inst->children, NULL, NULL);
245
246 ctxt->insert = oldInsert;
247 ctxt->lasttext = oldLastText;
248 ctxt->lasttsize = oldLastTextSize;
249 ctxt->lasttuse = oldLastTextUse;
250
251 ret = xmlNodeGetContent(insert);
252 if (insert != NULL)
253 xmlFreeNode(insert);
254 return(ret);
255}
256
277xmlChar *
279 const xmlChar *str, xmlNodePtr inst)
280{
281 xmlChar *ret = NULL;
282 const xmlChar *cur;
283 xmlChar *expr, *val;
284 xmlNsPtr *nsList = NULL;
285 int nsNr = 0;
286
287 if (str == NULL) return(NULL);
288 if (*str == 0)
289 return(xmlStrndup((xmlChar *)"", 0));
290
291 cur = str;
292 while (*cur != 0) {
293 if (*cur == '{') {
294 if (*(cur+1) == '{') { /* escaped '{' */
295 cur++;
296 ret = xmlStrncat(ret, str, cur - str);
297 cur++;
298 str = cur;
299 continue;
300 }
301 ret = xmlStrncat(ret, str, cur - str);
302 str = cur;
303 cur++;
304 while ((*cur != 0) && (*cur != '}')) {
305 /* Need to check for literal (bug539741) */
306 if ((*cur == '\'') || (*cur == '"')) {
307 char delim = *(cur++);
308 while ((*cur != 0) && (*cur != delim))
309 cur++;
310 if (*cur != 0)
311 cur++; /* skip the ending delimiter */
312 } else
313 cur++;
314 }
315 if (*cur == 0) {
316 xsltTransformError(ctxt, NULL, inst,
317 "xsltAttrTemplateValueProcessNode: unmatched '{'\n");
318 ret = xmlStrncat(ret, str, cur - str);
319 goto exit;
320 }
321 str++;
322 expr = xmlStrndup(str, cur - str);
323 if (expr == NULL)
324 goto exit;
325 else if (*expr == '{') {
326 ret = xmlStrcat(ret, expr);
327 xmlFree(expr);
328 } else {
329 xmlXPathCompExprPtr comp;
330 /*
331 * TODO: keep precompiled form around
332 */
333 if ((nsList == NULL) && (inst != NULL)) {
334 int i = 0;
335
336 nsList = xmlGetNsList(inst->doc, inst);
337 if (nsList != NULL) {
338 while (nsList[i] != NULL)
339 i++;
340 nsNr = i;
341 }
342 }
343 comp = xmlXPathCtxtCompile(ctxt->xpathCtxt, expr);
344 val = xsltEvalXPathStringNs(ctxt, comp, nsNr, nsList);
345 xmlXPathFreeCompExpr(comp);
346 xmlFree(expr);
347 if (val != NULL) {
348 ret = xmlStrcat(ret, val);
349 xmlFree(val);
350 }
351 }
352 cur++;
353 str = cur;
354 } else if (*cur == '}') {
355 cur++;
356 if (*cur == '}') { /* escaped '}' */
357 ret = xmlStrncat(ret, str, cur - str);
358 cur++;
359 str = cur;
360 continue;
361 } else {
362 xsltTransformError(ctxt, NULL, inst,
363 "xsltAttrTemplateValueProcessNode: unmatched '}'\n");
364 }
365 } else
366 cur++;
367 }
368 if (cur != str) {
369 ret = xmlStrncat(ret, str, cur - str);
370 }
371
372exit:
373 if (nsList != NULL)
374 xmlFree(nsList);
375
376 return(ret);
377}
378
389xmlChar *
392}
393
409xmlChar *
411 const xmlChar *name, const xmlChar *ns)
412{
413 xmlChar *ret;
414 xmlChar *expr;
415
416 if ((ctxt == NULL) || (inst == NULL) || (name == NULL) ||
417 (inst->type != XML_ELEMENT_NODE))
418 return(NULL);
419
420 expr = xsltGetNsProp(inst, name, ns);
421 if (expr == NULL)
422 return(NULL);
423
424 /*
425 * TODO: though now {} is detected ahead, it would still be good to
426 * optimize both functions to keep the splitted value if the
427 * attribute content and the XPath precompiled expressions around
428 */
429
431#ifdef WITH_XSLT_DEBUG_TEMPLATES
433 "xsltEvalAttrValueTemplate: %s returns %s\n", expr, ret));
434#endif
435 if (expr != NULL)
436 xmlFree(expr);
437 return(ret);
438}
439
455const xmlChar *
457 const xmlChar *name, const xmlChar *ns, int *found) {
458 const xmlChar *ret;
459 xmlChar *expr;
460
461 if ((style == NULL) || (inst == NULL) || (name == NULL) ||
462 (inst->type != XML_ELEMENT_NODE))
463 return(NULL);
464
465 expr = xsltGetNsProp(inst, name, ns);
466 if (expr == NULL) {
467 *found = 0;
468 return(NULL);
469 }
470 *found = 1;
471
472 ret = xmlStrchr(expr, '{');
473 if (ret != NULL) {
474 xmlFree(expr);
475 return(NULL);
476 }
477 ret = xmlDictLookup(style->dict, expr, -1);
478 xmlFree(expr);
479 return(ret);
480}
481
496xmlAttrPtr
498 xmlAttrPtr attr)
499{
500 const xmlChar *value;
501 xmlAttrPtr ret;
502
503 if ((ctxt == NULL) || (attr == NULL) || (target == NULL) ||
504 (target->type != XML_ELEMENT_NODE))
505 return(NULL);
506
507 if (attr->type != XML_ATTRIBUTE_NODE)
508 return(NULL);
509
510 /*
511 * Skip all XSLT attributes.
512 */
513#ifdef XSLT_REFACTORED
514 if (attr->psvi == xsltXSLTAttrMarker)
515 return(NULL);
516#else
517 if ((attr->ns != NULL) && xmlStrEqual(attr->ns->href, XSLT_NAMESPACE))
518 return(NULL);
519#endif
520 /*
521 * Get the value.
522 */
523 if (attr->children != NULL) {
524 if ((attr->children->type != XML_TEXT_NODE) ||
525 (attr->children->next != NULL))
526 {
527 xsltTransformError(ctxt, NULL, attr->parent,
528 "Internal error: The children of an attribute node of a "
529 "literal result element are not in the expected form.\n");
530 return(NULL);
531 }
532 value = attr->children->content;
533 if (value == NULL)
534 value = xmlDictLookup(ctxt->dict, BAD_CAST "", 0);
535 } else
536 value = xmlDictLookup(ctxt->dict, BAD_CAST "", 0);
537 /*
538 * Overwrite duplicates.
539 */
540 ret = target->properties;
541 while (ret != NULL) {
542 if (((attr->ns != NULL) == (ret->ns != NULL)) &&
543 xmlStrEqual(ret->name, attr->name) &&
544 ((attr->ns == NULL) || xmlStrEqual(ret->ns->href, attr->ns->href)))
545 {
546 break;
547 }
548 ret = ret->next;
549 }
550 if (ret != NULL) {
551 /* free the existing value */
552 xmlFreeNodeList(ret->children);
553 ret->children = ret->last = NULL;
554 /*
555 * Adjust ns-prefix if needed.
556 */
557 if ((ret->ns != NULL) &&
558 (! xmlStrEqual(ret->ns->prefix, attr->ns->prefix)))
559 {
560 ret->ns = xsltGetNamespace(ctxt, attr->parent, attr->ns, target);
561 }
562 } else {
563 /* create a new attribute */
564 if (attr->ns != NULL)
565 ret = xmlNewNsProp(target,
566 xsltGetNamespace(ctxt, attr->parent, attr->ns, target),
567 attr->name, NULL);
568 else
569 ret = xmlNewNsProp(target, NULL, attr->name, NULL);
570 }
571 /*
572 * Set the value.
573 */
574 if (ret != NULL) {
575 xmlNodePtr text;
576
577 text = xmlNewText(NULL);
578 if (text != NULL) {
579 ret->last = ret->children = text;
580 text->parent = (xmlNodePtr) ret;
581 text->doc = ret->doc;
582
583 if (attr->psvi != NULL) {
584 /*
585 * Evaluate the Attribute Value Template.
586 */
587 xmlChar *val;
588 val = xsltEvalAVT(ctxt, attr->psvi, attr->parent);
589 if (val == NULL) {
590 /*
591 * TODO: Damn, we need an easy mechanism to report
592 * qualified names!
593 */
594 if (attr->ns) {
595 xsltTransformError(ctxt, NULL, attr->parent,
596 "Internal error: Failed to evaluate the AVT "
597 "of attribute '{%s}%s'.\n",
598 attr->ns->href, attr->name);
599 } else {
600 xsltTransformError(ctxt, NULL, attr->parent,
601 "Internal error: Failed to evaluate the AVT "
602 "of attribute '%s'.\n",
603 attr->name);
604 }
605 text->content = xmlStrdup(BAD_CAST "");
606 } else {
607 text->content = val;
608 }
609 } else if ((ctxt->internalized) && (target != NULL) &&
610 (target->doc != NULL) &&
611 (target->doc->dict == ctxt->dict) &&
612 xmlDictOwns(ctxt->dict, value)) {
613 text->content = (xmlChar *) value;
614 } else {
615 text->content = xmlStrdup(value);
616 }
617 }
618 } else {
619 if (attr->ns) {
620 xsltTransformError(ctxt, NULL, attr->parent,
621 "Internal error: Failed to create attribute '{%s}%s'.\n",
622 attr->ns->href, attr->name);
623 } else {
624 xsltTransformError(ctxt, NULL, attr->parent,
625 "Internal error: Failed to create attribute '%s'.\n",
626 attr->name);
627 }
628 }
629 return(ret);
630}
631
632
652xmlAttrPtr
654 xmlNodePtr target, xmlAttrPtr attrs)
655{
656 xmlAttrPtr attr, copy, last = NULL;
657 xmlNodePtr oldInsert, text;
658 xmlNsPtr origNs = NULL, copyNs = NULL;
659 const xmlChar *value;
660 xmlChar *valueAVT;
661 int hasAttr = 0;
662
663 if ((ctxt == NULL) || (target == NULL) || (attrs == NULL) ||
664 (target->type != XML_ELEMENT_NODE))
665 return(NULL);
666
667 oldInsert = ctxt->insert;
668 ctxt->insert = target;
669
670 /*
671 * Apply attribute-sets.
672 */
673 attr = attrs;
674 do {
675#ifdef XSLT_REFACTORED
676 if ((attr->psvi == xsltXSLTAttrMarker) &&
677 xmlStrEqual(attr->name, (const xmlChar *)"use-attribute-sets"))
678 {
679 xsltApplyAttributeSet(ctxt, ctxt->node, (xmlNodePtr) attr, NULL);
680 }
681#else
682 if ((attr->ns != NULL) &&
683 xmlStrEqual(attr->name, (const xmlChar *)"use-attribute-sets") &&
684 xmlStrEqual(attr->ns->href, XSLT_NAMESPACE))
685 {
686 xsltApplyAttributeSet(ctxt, ctxt->node, (xmlNodePtr) attr, NULL);
687 }
688#endif
689 attr = attr->next;
690 } while (attr != NULL);
691
692 if (target->properties != NULL) {
693 hasAttr = 1;
694 }
695
696 /*
697 * Instantiate LRE-attributes.
698 */
699 attr = attrs;
700 do {
701 /*
702 * Skip XSLT attributes.
703 */
704#ifdef XSLT_REFACTORED
705 if (attr->psvi == xsltXSLTAttrMarker) {
706 goto next_attribute;
707 }
708#else
709 if ((attr->ns != NULL) &&
710 xmlStrEqual(attr->ns->href, XSLT_NAMESPACE))
711 {
712 goto next_attribute;
713 }
714#endif
715 /*
716 * Get the value.
717 */
718 if (attr->children != NULL) {
719 if ((attr->children->type != XML_TEXT_NODE) ||
720 (attr->children->next != NULL))
721 {
722 xsltTransformError(ctxt, NULL, attr->parent,
723 "Internal error: The children of an attribute node of a "
724 "literal result element are not in the expected form.\n");
725 goto error;
726 }
727 value = attr->children->content;
728 if (value == NULL)
729 value = xmlDictLookup(ctxt->dict, BAD_CAST "", 0);
730 } else
731 value = xmlDictLookup(ctxt->dict, BAD_CAST "", 0);
732
733 /*
734 * Get the namespace. Avoid lookups of same namespaces.
735 */
736 if (attr->ns != origNs) {
737 origNs = attr->ns;
738 if (attr->ns != NULL) {
739#ifdef XSLT_REFACTORED
740 copyNs = xsltGetSpecialNamespace(ctxt, attr->parent,
741 attr->ns->href, attr->ns->prefix, target);
742#else
743 copyNs = xsltGetNamespace(ctxt, attr->parent,
744 attr->ns, target);
745#endif
746 if (copyNs == NULL)
747 goto error;
748 } else
749 copyNs = NULL;
750 }
751 /*
752 * Create a new attribute.
753 */
754 if (hasAttr) {
755 copy = xmlSetNsProp(target, copyNs, attr->name, NULL);
756 } else {
757 /*
758 * Avoid checking for duplicate attributes if there aren't
759 * any attribute sets.
760 */
761 copy = xmlNewDocProp(target->doc, attr->name, NULL);
762
763 if (copy != NULL) {
764 copy->ns = copyNs;
765
766 /*
767 * Attach it to the target element.
768 */
769 copy->parent = target;
770 if (last == NULL) {
771 target->properties = copy;
772 last = copy;
773 } else {
774 last->next = copy;
775 copy->prev = last;
776 last = copy;
777 }
778 }
779 }
780 if (copy == NULL) {
781 if (attr->ns) {
782 xsltTransformError(ctxt, NULL, attr->parent,
783 "Internal error: Failed to create attribute '{%s}%s'.\n",
784 attr->ns->href, attr->name);
785 } else {
786 xsltTransformError(ctxt, NULL, attr->parent,
787 "Internal error: Failed to create attribute '%s'.\n",
788 attr->name);
789 }
790 goto error;
791 }
792
793 /*
794 * Set the value.
795 */
796 text = xmlNewText(NULL);
797 if (text != NULL) {
798 copy->last = copy->children = text;
799 text->parent = (xmlNodePtr) copy;
800 text->doc = copy->doc;
801
802 if (attr->psvi != NULL) {
803 /*
804 * Evaluate the Attribute Value Template.
805 */
806 valueAVT = xsltEvalAVT(ctxt, attr->psvi, attr->parent);
807 if (valueAVT == NULL) {
808 /*
809 * TODO: Damn, we need an easy mechanism to report
810 * qualified names!
811 */
812 if (attr->ns) {
813 xsltTransformError(ctxt, NULL, attr->parent,
814 "Internal error: Failed to evaluate the AVT "
815 "of attribute '{%s}%s'.\n",
816 attr->ns->href, attr->name);
817 } else {
818 xsltTransformError(ctxt, NULL, attr->parent,
819 "Internal error: Failed to evaluate the AVT "
820 "of attribute '%s'.\n",
821 attr->name);
822 }
823 text->content = xmlStrdup(BAD_CAST "");
824 goto error;
825 } else {
826 text->content = valueAVT;
827 }
828 } else if ((ctxt->internalized) &&
829 (target->doc != NULL) &&
830 (target->doc->dict == ctxt->dict) &&
831 xmlDictOwns(ctxt->dict, value))
832 {
833 text->content = (xmlChar *) value;
834 } else {
835 text->content = xmlStrdup(value);
836 }
837 if ((copy != NULL) && (text != NULL) &&
838 (xmlIsID(copy->doc, copy->parent, copy)))
839 xmlAddID(NULL, copy->doc, text->content, copy);
840 }
841
843 attr = attr->next;
844 } while (attr != NULL);
845
846 ctxt->insert = oldInsert;
847 return(target->properties);
848
849error:
850 ctxt->insert = oldInsert;
851 return(NULL);
852}
853
854
864xmlNodePtr *
866 if (node == NULL)
867 return(NULL);
868
869 return(0);
870}
871
872
Arabic default style
Definition: afstyles.h:94
xmlChar * xsltEvalAVT(xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node)
Definition: attrvt.c:377
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
#define NULL
Definition: types.h:112
void xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, const xmlChar *attrSets)
Definition: attributes.c:1118
void xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr list, xsltTemplatePtr templ ATTRIBUTE_UNUSED, xsltStackElemPtr params)
Definition: transform.c:3313
const WCHAR * text
Definition: package.c:1794
return ret
Definition: mutex.c:146
FxCollectionEntry * cur
GLuint res
Definition: glext.h:9613
GLuint GLfloat * val
Definition: glext.h:7180
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
Definition: glfuncs.h:248
#define ATTRIBUTE_UNUSED
Definition: i386-dis.c:36
#define error(str)
Definition: mkdosfs.c:1605
static UINT UINT last
Definition: font.c:45
#define next_attribute(a)
Definition: reader.c:252
xmlNsPtr xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, const xmlChar *nsName, const xmlChar *nsPrefix, xmlNodePtr target)
Definition: namespaces.c:319
xmlNsPtr xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out)
Definition: namespaces.c:616
const WCHAR * str
#define exit(n)
Definition: config.h:202
int xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
Definition: dict.c:376
const xmlChar * xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
Definition: dict.c:824
xmlFreeFunc xmlFree
Definition: globals.c:184
xsltTransformState state
xmlXPathContextPtr xpathCtxt
const xmlChar * lasttext
Definition: cookie.c:202
WCHAR * name
Definition: cookie.c:203
Definition: query.h:86
Definition: name.c:39
Definition: mxnamespace.c:38
Definition: tools.h:99
xmlChar * xsltEvalXPathString(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp)
Definition: templates.c:189
const xmlChar * xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns, int *found)
Definition: templates.c:456
xmlChar * xsltAttrTemplateValueProcess(xsltTransformContextPtr ctxt, const xmlChar *str)
Definition: templates.c:390
xmlChar * xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt, const xmlChar *str, xmlNodePtr inst)
Definition: templates.c:278
xmlChar * xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns)
Definition: templates.c:410
xmlAttrPtr xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr attrs)
Definition: templates.c:653
xmlAttrPtr xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr attr)
Definition: templates.c:497
xmlNodePtr * xsltTemplateProcess(xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, xmlNodePtr node)
Definition: templates.c:865
xmlChar * xsltEvalTemplateString(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst)
Definition: templates.c:207
xmlChar * xsltEvalXPathStringNs(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, int nsNr, xmlNsPtr *nsList)
Definition: templates.c:123
int xsltEvalXPathPredicate(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, xmlNsPtr *nsList, int nsNr)
Definition: templates.c:57
Definition: dlist.c:348
Definition: pdh_main.c:96
XMLPUBFUN xmlIDPtr xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr)
Definition: valid.c:2517
XMLPUBFUN int xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)
Definition: valid.c:2619
XMLPUBFUN xmlChar * xmlStrndup(const xmlChar *cur, int len)
Definition: xmlstring.c:45
XMLPUBFUN xmlChar * xmlStrncat(xmlChar *cur, const xmlChar *add, int len)
Definition: xmlstring.c:448
XMLPUBFUN xmlChar * xmlStrcat(xmlChar *cur, const xmlChar *add)
Definition: xmlstring.c:524
#define BAD_CAST
Definition: xmlstring.h:35
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162
XMLPUBFUN const xmlChar * xmlStrchr(const xmlChar *str, xmlChar val)
Definition: xmlstring.c:327
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:69
@ XSLT_STATE_STOPPED
#define XSLT_NAMESPACE
Definition: xslt.h:46
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
Definition: xsltutils.c:762
xmlGenericErrorFunc xsltGenericDebug
Definition: xsltutils.c:632
void * xsltGenericDebugContext
Definition: xsltutils.c:633
xmlChar * xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace)
Definition: xsltutils.c:166
@ XSLT_TRACE_TEMPLATES
Definition: xsltutils.h:122
#define XSLT_TRACE(ctxt, code, call)
Definition: xsltutils.h:132