Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: third_party/libxslt/libexslt/common.c

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no iconv Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxslt/libexslt/Makefile.am ('k') | third_party/libxslt/libexslt/crypto.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #define IN_LIBEXSLT 1 #define IN_LIBEXSLT
2 #include "libexslt/libexslt.h" 2 #include "libexslt/libexslt.h"
3 3
4 #if defined(WIN32) && !defined (__CYGWIN__) && (!__MINGW32__) 4 #if defined(WIN32) && !defined (__CYGWIN__) && (!__MINGW32__)
5 #include <win32config.h> 5 #include <win32config.h>
6 #else 6 #else
7 #include "config.h" 7 #include "config.h"
8 #endif 8 #endif
9 9
10 #include <libxml/tree.h> 10 #include <libxml/tree.h>
(...skipping 28 matching lines...) Expand all
39 /* 39 /*
40 * SPEC EXSLT: 40 * SPEC EXSLT:
41 * "You can also use this function to turn a string into a text 41 * "You can also use this function to turn a string into a text
42 * node, which is helpful if you want to pass a string to a 42 * node, which is helpful if you want to pass a string to a
43 * function that only accepts a node-set." 43 * function that only accepts a node-set."
44 */ 44 */
45 fragment = xsltCreateRVT(tctxt); 45 fragment = xsltCreateRVT(tctxt);
46 if (fragment == NULL) { 46 if (fragment == NULL) {
47 xsltTransformError(tctxt, NULL, tctxt->inst, 47 xsltTransformError(tctxt, NULL, tctxt->inst,
48 "exsltNodeSetFunction: Failed to create a tree fragment.\n"); 48 "exsltNodeSetFunction: Failed to create a tree fragment.\n");
49 » tctxt->state = XSLT_STATE_STOPPED; 49 » tctxt->state = XSLT_STATE_STOPPED;
50 return; 50 return;
51 } 51 }
52 xsltRegisterLocalRVT(tctxt, fragment); 52 xsltRegisterLocalRVT(tctxt, fragment);
53 53
54 strval = xmlXPathPopString (ctxt); 54 strval = xmlXPathPopString (ctxt);
55 » 55
56 txt = xmlNewDocText (fragment, strval); 56 txt = xmlNewDocText (fragment, strval);
57 xmlAddChild((xmlNodePtr) fragment, txt); 57 xmlAddChild((xmlNodePtr) fragment, txt);
58 » obj = xmlXPathNewNodeSet(txt);» 58 » obj = xmlXPathNewNodeSet(txt);
59 if (obj == NULL) { 59 if (obj == NULL) {
60 xsltTransformError(tctxt, NULL, tctxt->inst, 60 xsltTransformError(tctxt, NULL, tctxt->inst,
61 "exsltNodeSetFunction: Failed to create a node set object.\n"); 61 "exsltNodeSetFunction: Failed to create a node set object.\n");
62 tctxt->state = XSLT_STATE_STOPPED; 62 tctxt->state = XSLT_STATE_STOPPED;
63 } else { 63 } else {
64 /* 64 /*
65 * Mark it as a function result in order to avoid garbage 65 * Mark it as a function result in order to avoid garbage
66 * collecting of tree fragments 66 * collecting of tree fragments
67 */ 67 */
68 xsltExtensionInstructionResultRegister(tctxt, obj); 68 xsltExtensionInstructionResultRegister(tctxt, obj);
69 } 69 }
70 if (strval != NULL) 70 if (strval != NULL)
71 xmlFree (strval); 71 xmlFree (strval);
72 » 72
73 valuePush (ctxt, obj); 73 valuePush (ctxt, obj);
74 } 74 }
75 } 75 }
76 76
77 static void 77 static void
78 exsltObjectTypeFunction (xmlXPathParserContextPtr ctxt, int nargs) { 78 exsltObjectTypeFunction (xmlXPathParserContextPtr ctxt, int nargs) {
79 xmlXPathObjectPtr obj, ret; 79 xmlXPathObjectPtr obj, ret;
80 80
81 if (nargs != 1) { 81 if (nargs != 1) {
82 xmlXPathSetArityError(ctxt); 82 xmlXPathSetArityError(ctxt);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EXSLT_COMMON_NAMESPACE, 128 EXSLT_COMMON_NAMESPACE,
129 exsltNodeSetFunction); 129 exsltNodeSetFunction);
130 xsltRegisterExtModuleFunction((const xmlChar *) "object-type", 130 xsltRegisterExtModuleFunction((const xmlChar *) "object-type",
131 EXSLT_COMMON_NAMESPACE, 131 EXSLT_COMMON_NAMESPACE,
132 exsltObjectTypeFunction); 132 exsltObjectTypeFunction);
133 xsltRegisterExtModuleElement((const xmlChar *) "document", 133 xsltRegisterExtModuleElement((const xmlChar *) "document",
134 EXSLT_COMMON_NAMESPACE, 134 EXSLT_COMMON_NAMESPACE,
135 (xsltPreComputeFunction) xsltDocumentComp, 135 (xsltPreComputeFunction) xsltDocumentComp,
136 (xsltTransformFunction) xsltDocumentElem); 136 (xsltTransformFunction) xsltDocumentElem);
137 } 137 }
OLDNEW
« no previous file with comments | « third_party/libxslt/libexslt/Makefile.am ('k') | third_party/libxslt/libexslt/crypto.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698