diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-01-19 14:55:07 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-01-19 14:55:07 +0300 |
commit | c6ed142f1b1e241a367f78ae602e6396f0683669 (patch) | |
tree | ac5376e7353c36a02bc03d386859a6d8b94c33be /mcs/class/System.XML/Mono.Xml.Xsl.Operations | |
parent | 35211604e6a80f5e5d876d8d5c7ea64a7a639014 (diff) |
2008-01-19 Atsushi Enomoto <atsushi@ximian.com>
* XslCopyOf.cs : when the evaluated argument was RTF (it could happen
when variable or extensions are used), copy the node itself, not
only its children. Fixed bug #322551.
* XslTransformTests.cs : added test for bug #322551.
svn path=/trunk/mcs/; revision=93314
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Xsl.Operations')
-rw-r--r-- | mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog index 382a4f7adea..b45dce3734d 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog @@ -1,3 +1,9 @@ +2008-01-19 Atsushi Enomoto <atsushi@ximian.com> + + * XslCopyOf.cs : when the evaluated argument was RTF (it could happen + when variable or extensions are used), copy the node itself, not + only its children. Fixed bug #322551. + 2007-12-17 Atsushi Enomoto <atsushi@ximian.com> * XslValueOf.cs : allow external elements in xsl:value-of. diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs index 665598c6533..042412136ba 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs +++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs @@ -137,18 +137,16 @@ namespace Mono.Xml.Xsl.Operations { object o = p.Evaluate (select); XPathNodeIterator itr = o as XPathNodeIterator; - if (itr == null) { - XPathNavigator nav = o as XPathNavigator; // RTF - if (nav != null) - itr = nav.SelectChildren (XPathNodeType.All); - } if (itr != null) { while (itr.MoveNext ()) CopyNode (p, itr.Current); } else { - p.Out.WriteString (XPathFunctions.ToString (o)); + XPathNavigator nav = o as XPathNavigator; // RTF + if (nav != null) + CopyNode (p, nav); + else + p.Out.WriteString (XPathFunctions.ToString (o)); } - } } } |