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

Side by Side Diff: third_party/libxslt/libxslt/functions.c

Issue 661058: libxslt update (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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/libxslt/extra.c ('k') | third_party/libxslt/libxslt/imports.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 /* 1 /*
2 * functions.c: Implementation of the XSLT extra functions 2 * functions.c: Implementation of the XSLT extra functions
3 * 3 *
4 * Reference: 4 * Reference:
5 * http://www.w3.org/TR/1999/REC-xslt-19991116 5 * http://www.w3.org/TR/1999/REC-xslt-19991116
6 * 6 *
7 * See Copyright for the status of this software. 7 * See Copyright for the status of this software.
8 * 8 *
9 * daniel@veillard.com 9 * daniel@veillard.com
10 * Bjorn Reese <breese@users.sourceforge.net> for number formatting 10 * Bjorn Reese <breese@users.sourceforge.net> for number formatting
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 xmlChar *prefix, *name; 806 xmlChar *prefix, *name;
807 const xmlChar *nsURI = NULL; 807 const xmlChar *nsURI = NULL;
808 xsltTransformContextPtr tctxt; 808 xsltTransformContextPtr tctxt;
809 809
810 if (nargs != 1) { 810 if (nargs != 1) {
811 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL, 811 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
812 "element-available() : expects one string arg\n"); 812 "element-available() : expects one string arg\n");
813 ctxt->error = XPATH_INVALID_ARITY; 813 ctxt->error = XPATH_INVALID_ARITY;
814 return; 814 return;
815 } 815 }
816 xmlXPathStringFunction(ctxt, 1);
816 if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) { 817 if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
817 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL, 818 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
818 "element-available() : invalid arg expecting a string\n"); 819 "element-available() : invalid arg expecting a string\n");
819 ctxt->error = XPATH_INVALID_TYPE; 820 ctxt->error = XPATH_INVALID_TYPE;
820 return; 821 return;
821 } 822 }
822 obj = valuePop(ctxt); 823 obj = valuePop(ctxt);
823 tctxt = xsltXPathGetTransformContext(ctxt); 824 tctxt = xsltXPathGetTransformContext(ctxt);
824 if (tctxt == NULL) { 825 if (tctxt == NULL) {
825 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL, 826 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 xmlXPathObjectPtr obj; 872 xmlXPathObjectPtr obj;
872 xmlChar *prefix, *name; 873 xmlChar *prefix, *name;
873 const xmlChar *nsURI = NULL; 874 const xmlChar *nsURI = NULL;
874 875
875 if (nargs != 1) { 876 if (nargs != 1) {
876 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL, 877 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
877 "function-available() : expects one string arg\n"); 878 "function-available() : expects one string arg\n");
878 ctxt->error = XPATH_INVALID_ARITY; 879 ctxt->error = XPATH_INVALID_ARITY;
879 return; 880 return;
880 } 881 }
882 xmlXPathStringFunction(ctxt, 1);
881 if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) { 883 if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
882 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL, 884 xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
883 "function-available() : invalid arg expecting a string\n"); 885 "function-available() : invalid arg expecting a string\n");
884 ctxt->error = XPATH_INVALID_TYPE; 886 ctxt->error = XPATH_INVALID_TYPE;
885 return; 887 return;
886 } 888 }
887 obj = valuePop(ctxt); 889 obj = valuePop(ctxt);
888 890
889 name = xmlSplitQName2(obj->stringval, &prefix); 891 name = xmlSplitQName2(obj->stringval, &prefix);
890 if (name == NULL) { 892 if (name == NULL) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 xsltFormatNumberFunction); 966 xsltFormatNumberFunction);
965 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "generate-id", 967 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "generate-id",
966 xsltGenerateIdFunction); 968 xsltGenerateIdFunction);
967 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "system-property", 969 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "system-property",
968 xsltSystemPropertyFunction); 970 xsltSystemPropertyFunction);
969 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "element-available", 971 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "element-available",
970 xsltElementAvailableFunction); 972 xsltElementAvailableFunction);
971 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "function-available", 973 xmlXPathRegisterFunc(ctxt, (const xmlChar *) "function-available",
972 xsltFunctionAvailableFunction); 974 xsltFunctionAvailableFunction);
973 } 975 }
OLDNEW
« no previous file with comments | « third_party/libxslt/libxslt/extra.c ('k') | third_party/libxslt/libxslt/imports.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698