components/libxslt/patches/08-libxslt-Fix-system-property-with-unknown-namespace.patch
Taken as it's from:
http://git.gnome.org/browse/libxslt/commit/?id=abb7c65980c7da450f0447dcc6a1821eef99d473
From abb7c65980c7da450f0447dcc6a1821eef99d473 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <[email protected]>
Date: Wed, 15 Aug 2012 21:06:14 +0000
Subject: Fix system-property with unknown namespace
The empty string should be returned, see bug #631803.
---
diff --git a/libxslt/functions.c b/libxslt/functions.c
index de962f4..01852b8 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -799,7 +799,9 @@ xsltSystemPropertyFunction(xmlXPathParserContextPtr ctxt, int nargs){
} else {
valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
}
- }
+ } else {
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
+ }
if (name != NULL)
xmlFree(name);
if (prefix != NULL)
diff --git a/tests/docs/bug-176.xml b/tests/docs/bug-176.xml
new file mode 100644
index 0000000..69d62f2
--- a/dev/null
+++ b/tests/docs/bug-176.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/general/bug-176.out b/tests/general/bug-176.out
new file mode 100644
index 0000000..e829790
--- a/dev/null
+++ b/tests/general/bug-176.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<result/>
diff --git a/tests/general/bug-176.xsl b/tests/general/bug-176.xsl
new file mode 100644
index 0000000..6996e1e
--- a/dev/null
+++ b/tests/general/bug-176.xsl
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:msxsl="urn:schemas-microsoft-com:xslt"
+ exclude-result-prefixes="msxsl"
+ version="1.0">
+ <xsl:template match="/">
+ <result>
+ <xsl:value-of select="system-property('msxsl:version')"/>
+ </result>
+ </xsl:template>
+</xsl:transform>
--
cgit v0.9.0.2