diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2007-12-17 10:28:33 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2007-12-17 10:28:33 +0300 |
commit | e6024b90d2023924dd1935973145f45a3e55d8a4 (patch) | |
tree | fe383eb1d69858a11fec5956b313c3150d342a53 /mcs/class/System.XML/System.Xml.XPath | |
parent | 0ce63640a1657d7b4d3b8021e80eaafb6fbed4de (diff) |
2007-12-17 Atsushi Enomoto <atsushi@ximian.com>
* Expression.cs : In any comparison expr, treat RTF as equivalent to
string type (as specified in XSLT 1.0 section 11.1: "An operation
is permitted on a result tree fragment only if that operation would
be permitted on a string." ...). Fixed bug #349035.
* XslTransformTests.cs : added test for bug #349035.
svn path=/trunk/mcs/; revision=91402
Diffstat (limited to 'mcs/class/System.XML/System.Xml.XPath')
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/Expression.cs | 12 |
2 files changed, 13 insertions, 6 deletions
diff --git a/mcs/class/System.XML/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/System.Xml.XPath/ChangeLog index 433183d1cb9..92e4d7ff0af 100644 --- a/mcs/class/System.XML/System.Xml.XPath/ChangeLog +++ b/mcs/class/System.XML/System.Xml.XPath/ChangeLog @@ -1,3 +1,10 @@ +2007-12-17 Atsushi Enomoto <atsushi@ximian.com> + + * Expression.cs : In any comparison expr, treat RTF as equivalent to + string type (as specified in XSLT 1.0 section 11.1: "An operation + is permitted on a result tree fragment only if that operation would + be permitted on a string." ...). Fixed bug #349035. + 2007-11-29 Atsushi Enomoto <atsushi@ximian.com> * XPathNavigator.cs : implemented ValueAs(). diff --git a/mcs/class/System.XML/System.Xml.XPath/Expression.cs b/mcs/class/System.XML/System.Xml.XPath/Expression.cs index 5af27f6af92..8acb84da148 100644 --- a/mcs/class/System.XML/System.Xml.XPath/Expression.cs +++ b/mcs/class/System.XML/System.Xml.XPath/Expression.cs @@ -751,11 +751,11 @@ namespace System.Xml.XPath if (typeR == XPathResultType.Any) typeR = GetReturnType (_right.Evaluate (iter)); - // Regard RTF as nodeset + // Regard RTF as string if (typeL == XPathResultType.Navigator) - typeL = XPathResultType.NodeSet; + typeL = XPathResultType.String; if (typeR == XPathResultType.Navigator) - typeR = XPathResultType.NodeSet; + typeR = XPathResultType.String; if (typeL == XPathResultType.NodeSet || typeR == XPathResultType.NodeSet) { @@ -851,11 +851,11 @@ namespace System.Xml.XPath if (typeR == XPathResultType.Any) typeR = GetReturnType (_right.Evaluate (iter)); - // Regard RTF as nodeset + // Regard RTF as string if (typeL == XPathResultType.Navigator) - typeL = XPathResultType.NodeSet; + typeL = XPathResultType.String; if (typeR == XPathResultType.Navigator) - typeR = XPathResultType.NodeSet; + typeR = XPathResultType.String; if (typeL == XPathResultType.NodeSet || typeR == XPathResultType.NodeSet) { |