Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2004-05-20 12:42:04 +0400
committerAtsushi Eno <atsushieno@gmail.com>2004-05-20 12:42:04 +0400
commit7580260949afcfd8a2662c2dce0f2ec0f94cc93e (patch)
treebda0b5e7bff5542ec9052383d81fe949e9733e01 /mcs/class/System.XML/Mono.Xml.Xsl.Operations
parentff370646d6da58cf925a7e5093e3a161e3eeced4 (diff)
2004-05-20 Atsushi Enomoto <atsushi@ximian.com>
* XslCopyOf.cs : When evaluation result was result tree fragment (i.e. XPathNavigator) output its content (children). * XslNumber.cs : Reflected CompilePattern() change. * XslTemplateContent.cs : Don't throw System.Exception. * XslVariable.cs : XslVariableInformation.Evaluate() now returns XPathNavigator, not NodeSet (it should not return "children", since the node pointed by XPathNavigator should be referenced as Root). svn path=/trunk/mcs/; revision=27725
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Xsl.Operations')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog10
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs10
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs4
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs2
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs4
5 files changed, 23 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 f446c7062b4..f605a446871 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
@@ -1,3 +1,13 @@
+2004-05-20 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XslCopyOf.cs : When evaluation result was result tree fragment (i.e.
+ XPathNavigator) output its content (children).
+ * XslNumber.cs : Reflected CompilePattern() change.
+ * XslTemplateContent.cs : Don't throw System.Exception.
+ * XslVariable.cs : XslVariableInformation.Evaluate() now returns
+ XPathNavigator, not NodeSet (it should not return "children", since
+ the node pointed by XPathNavigator should be referenced as Root).
+
2004-05-12 Atsushi Enomoto <atsushi@ximian.com>
* XslNumber.cs : made enum internal
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 dac29a3e8f5..bbf3b047bf7 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCopyOf.cs
@@ -99,9 +99,13 @@ namespace Mono.Xml.Xsl.Operations {
public override void Evaluate (XslTransformProcessor p)
{
object o = p.Evaluate (select);
- if (o is XPathNodeIterator)
- {
- XPathNodeIterator itr = (XPathNodeIterator)o;
+ 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 {
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
index c01ea5bd731..24d69b841b5 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
@@ -62,8 +62,8 @@ namespace Mono.Xml.Xsl.Operations {
break;
}
- count = c.CompilePattern (c.GetAttribute ("count"));
- from = c.CompilePattern (c.GetAttribute ("from"));
+ count = c.CompilePattern (c.GetAttribute ("count"), c.Input);
+ from = c.CompilePattern (c.GetAttribute ("from"), c.Input);
value = c.CompileExpression (c.GetAttribute ("value"));
format = c.ParseAvtAttribute ("format");
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
index af70c81562c..7071c7e9623 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
@@ -111,7 +111,7 @@ namespace Mono.Xml.Xsl.Operations {
break;
default:
// TODO: handle fallback, like we should
- throw new Exception ("Did not recognize element " + n.Name);
+ throw new XsltCompileException ("Did not recognize element " + n.Name, null, n);
}
break;
default:
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs
index 1005e1b2142..3a08830a753 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslVariable.cs
@@ -85,7 +85,9 @@ namespace Mono.Xml.Xsl.Operations {
content.Evaluate (p);
p.PopOutput ();
// return w.Document.CreateNavigator ().SelectChildren (XPathNodeType.All);
- return w.CreateDocument ().CreateNavigator ().SelectChildren (XPathNodeType.All);
+// return w.CreateDocument ().CreateNavigator ().SelectChildren (XPathNodeType.All);
+// return w.Document.CreateNavigator ();
+ return w.CreateDocument ().CreateNavigator ();
} else {
return "";
}