components/libxslt/patches/08-libxslt-Fix-system-property-with-unknown-namespace.patch
branchs11u1-sru
changeset 2471 b1f0e4a84df6
equal deleted inserted replaced
2469:0b02cc321ac6 2471:b1f0e4a84df6
       
     1 Taken as it's from:
       
     2 
       
     3 http://git.gnome.org/browse/libxslt/commit/?id=abb7c65980c7da450f0447dcc6a1821eef99d473
       
     4 
       
     5 From abb7c65980c7da450f0447dcc6a1821eef99d473 Mon Sep 17 00:00:00 2001
       
     6 From: Nick Wellnhofer <[email protected]>
       
     7 Date: Wed, 15 Aug 2012 21:06:14 +0000
       
     8 Subject: Fix system-property with unknown namespace
       
     9 
       
    10 The empty string should be returned, see bug #631803.
       
    11 ---
       
    12 diff --git a/libxslt/functions.c b/libxslt/functions.c
       
    13 index de962f4..01852b8 100644
       
    14 --- a/libxslt/functions.c
       
    15 +++ b/libxslt/functions.c
       
    16 @@ -799,7 +799,9 @@ xsltSystemPropertyFunction(xmlXPathParserContextPtr ctxt, int nargs){
       
    17  	    } else {
       
    18  		valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
       
    19  	    }
       
    20 -	}
       
    21 +	} else {
       
    22 +	    valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
       
    23 +        }
       
    24  	if (name != NULL)
       
    25  	    xmlFree(name);
       
    26  	if (prefix != NULL)
       
    27 diff --git a/tests/docs/bug-176.xml b/tests/docs/bug-176.xml
       
    28 new file mode 100644
       
    29 index 0000000..69d62f2
       
    30 --- a/dev/null
       
    31 +++ b/tests/docs/bug-176.xml
       
    32 @@ -0,0 +1 @@
       
    33 +<doc/>
       
    34 diff --git a/tests/general/bug-176.out b/tests/general/bug-176.out
       
    35 new file mode 100644
       
    36 index 0000000..e829790
       
    37 --- a/dev/null
       
    38 +++ b/tests/general/bug-176.out
       
    39 @@ -0,0 +1,2 @@
       
    40 +<?xml version="1.0"?>
       
    41 +<result/>
       
    42 diff --git a/tests/general/bug-176.xsl b/tests/general/bug-176.xsl
       
    43 new file mode 100644
       
    44 index 0000000..6996e1e
       
    45 --- a/dev/null
       
    46 +++ b/tests/general/bug-176.xsl
       
    47 @@ -0,0 +1,11 @@
       
    48 +<?xml version="1.0" encoding="UTF-8"?>
       
    49 +<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       
    50 +               xmlns:msxsl="urn:schemas-microsoft-com:xslt"
       
    51 +               exclude-result-prefixes="msxsl"
       
    52 +               version="1.0">
       
    53 +    <xsl:template match="/">
       
    54 +        <result>
       
    55 +            <xsl:value-of select="system-property('msxsl:version')"/>
       
    56 +        </result>
       
    57 +    </xsl:template>
       
    58 +</xsl:transform>
       
    59 --
       
    60 cgit v0.9.0.2