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

Unified Diff: third_party/libxslt/libexslt/saxon.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxslt/libexslt/math.c ('k') | third_party/libxslt/libexslt/strings.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxslt/libexslt/saxon.c
diff --git a/third_party/libxslt/libexslt/saxon.c b/third_party/libxslt/libexslt/saxon.c
index fcb1547a15e4ba2edbff65c729af22e0aa0209a9..e92ba8d04a92114b647bd25dcea813167a035dda 100644
--- a/third_party/libxslt/libexslt/saxon.c
+++ b/third_party/libxslt/libexslt/saxon.c
@@ -180,10 +180,36 @@ exsltSaxonEvaluateFunction (xmlXPathParserContextPtr ctxt, int nargs) {
}
/**
+ * exsltSaxonSystemIdFunction:
+ * @ctxt: an XPath parser context
+ * @nargs: number of arguments
+ *
+ * Implements the SAXON systemId() function
+ * string saxon:systemId ()
+ * This function returns the system ID of the document being styled.
+ */
+static void
+exsltSaxonSystemIdFunction(xmlXPathParserContextPtr ctxt, int nargs)
+{
+ if (ctxt == NULL)
+ return;
+ if (nargs != 0) {
+ xmlXPathSetArityError(ctxt);
+ return;
+ }
+
+ if ((ctxt->context) && (ctxt->context->doc) &&
+ (ctxt->context->doc->URL))
+ valuePush(ctxt, xmlXPathNewString(ctxt->context->doc->URL));
+ else
+ valuePush(ctxt, xmlXPathNewString(BAD_CAST ""));
+}
+
+/**
* exsltSaxonLineNumberFunction:
* @ctxt: an XPath parser context
* @nargs: number of arguments
- *
+ *
* Implements the SAXON line-number() function
* integer saxon:line-number()
*
@@ -264,4 +290,7 @@ exsltSaxonRegister (void) {
xsltRegisterExtModuleFunction ((const xmlChar *) "line-number",
SAXON_NAMESPACE,
exsltSaxonLineNumberFunction);
+ xsltRegisterExtModuleFunction ((const xmlChar *) "systemId",
+ SAXON_NAMESPACE,
+ exsltSaxonSystemIdFunction);
}
« no previous file with comments | « third_party/libxslt/libexslt/math.c ('k') | third_party/libxslt/libexslt/strings.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698