Author: atsushi
Date: 2005-03-09 17:46:17 -0500 (Wed, 09 Mar 2005)
New Revision: 41618
Modified:
trunk/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
trunk/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs
Log:
2005-03-09 Atsushi Enomoto <[EMAIL PROTECTED]>
* XslTemplate.cs : First non-element content were incorrectly ignored.
Modified: trunk/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog 2005-03-09 21:41:16 UTC
(rev 41617)
+++ trunk/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog 2005-03-09 22:46:17 UTC
(rev 41618)
@@ -1,5 +1,9 @@
2005-03-09 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * XslTemplate.cs : First non-element content were incorrectly ignored.
+
+2005-03-09 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XslFunctions.cs, Compiler.cs : Eliminated XPathNavigatorNsm class
to reduce references to stylesheet XPathNavigator. To accomplish it,
IStaticXsltContext does not declare GetNsm() anymore. All xslt
Modified: trunk/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs 2005-03-09
21:41:16 UTC (rev 41617)
+++ trunk/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs 2005-03-09
22:46:17 UTC (rev 41618)
@@ -318,7 +318,13 @@
if (c.Input.MoveToFirstChild ()) {
bool alldone = true;
+ XPathNavigator contentStart = c.Input.Clone ();
+ bool shouldMove = false;
do {
+ if (shouldMove) {
+ shouldMove = false;
+ contentStart.MoveTo (c.Input);
+ }
if (c.Input.NodeType ==
XPathNodeType.Text)
{ alldone = false; break; }
@@ -333,10 +339,12 @@
this.parameters = new ArrayList
();
parameters.Add (new XslLocalParam (c));
-
+ shouldMove = true;
} while (c.Input.MoveToNext ());
- if (!alldone)
+ if (!alldone) {
+ c.Input.MoveTo (contentStart);
content = c.CompileTemplateContent ();
+ }
c.Input.MoveToParent ();
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches