2007-08-08 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 8 Aug 2007 06:27:38 +0000 (06:27 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 8 Aug 2007 06:27:38 +0000 (06:27 -0000)
* XslCallTemplate.cs : significant whitespace should be allowed
  as its content. Fixed bug #82357.

* XslTransformTests.cs : added test for bug #82357.

svn path=/trunk/mcs/; revision=83634

mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslCallTemplate.cs
mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog
mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs

index b0ae6ac0d1549207c37dbc414945a9a3c2c4fb1a..bc04949709b07aae97f703e5397d46be15b927d7 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-08  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XslCallTemplate.cs : significant whitespace should be allowed
+         as its content. Fixed bug #82357.
+
 2007-06-28  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XslText.cs XslMessage.cs XslVariable.cs XslNotSupportedOperation.cs
index accc3a2d7127837d2c54db756d1de6c6d064520a..b73ffed5ae767e4c0fef1a86b3e80d59232c46b4 100644 (file)
@@ -55,6 +55,7 @@ namespace Mono.Xml.Xsl.Operations {
                                        switch (c.Input.NodeType) {
                                        case XPathNodeType.Comment:
                                        case XPathNodeType.ProcessingInstruction:
+                                       case XPathNodeType.SignificantWhitespace:
                                        case XPathNodeType.Whitespace:
                                                continue;
                                        case XPathNodeType.Element:
index 87184ee8e679d5b2190c541ec0d656c7208dc758..41092033156a32b84c586e80206f0d5dc223b265 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-08  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XslTransformTests.cs : added test for bug #82357.
+
 2006-04-07  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XslTransformTests.cs : added CurrentInSelect().
index 714aba7e504d2810b7e5f6ee2ebde42c225ac68b..31484edb7a17cfdcbceb8f4256dc9a026b415f4c 100644 (file)
@@ -1914,5 +1914,24 @@ Services
                                Assert.AreEqual (s, sw.ToString ());
                        }
                }
+
+               [Test]
+               public void CallTemplateSignificantWhitespace ()
+               {
+                       // bug #82357
+                       string xsl = @"<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+  <xsl:template name='foo' xml:space='preserve'>
+    <xsl:call-template name='bar'>
+      <xsl:with-param name='hoge' select='hoge' />
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name='bar'>
+  </xsl:template>
+</xsl:stylesheet>";
+                       XslTransform t = new XslTransform ();
+                       t.Load (new XmlTextReader (new StringReader (xsl)));
+                       t.Transform (new XPathDocument (new StringReader ("<dummy/>")), null, new XmlTextWriter (TextWriter.Null));
+               }
        }
 }