diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2006-01-13 09:38:10 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2006-01-13 09:38:10 +0300 |
commit | 8fc3204c9967f3974c80ebe57f046397b0cc855c (patch) | |
tree | f69b6cf52e750ab296ae5585d24a3f846368a06f /mcs/class/System.XML/Test/System.Xml.Xsl | |
parent | 0fa36c60a4f63dad52c0b666abd3ae4781677382 (diff) |
2006-01-13 Atsushi Enomoto <atsushi@ximian.com>
* GenericOutputter.cs : When writing string, use WriteWhitespace()
instead of WhiteString() when its state is not Content. This fixes
BVTs_bvt066 case (broken after implementing strict state check in
XmlTextWriter).
* XslTransformTests.cs : added DocTypeAfterText().
svn path=/trunk/mcs/; revision=55493
Diffstat (limited to 'mcs/class/System.XML/Test/System.Xml.Xsl')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog index 5e35c732c31..c969d90d464 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog @@ -1,5 +1,9 @@ 2006-01-13 Atsushi Enomoto <atsushi@ximian.com> + * XslTransformTests.cs : added DocTypeAfterText(). + +2006-01-13 Atsushi Enomoto <atsushi@ximian.com> + * XslTransformTests.cs : Output_Indent_Xml_DocType() is working now. 2005-12-27 Gert Driesen <drieseng@users.sourceforge.net> diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs index a598d9ee676..f05616d02b3 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs @@ -1848,5 +1848,31 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros " <body>44.442,70</body>{0}" + "</html>", Environment.NewLine), sw.ToString ()); } + + [Test] + [Category ("NotDotNet")] + // MS bug: the output must be well-formed XML general entity + // (doctype must not appear after text nodes). + public void DocTypeAfterText () + { + string xsl = @" +<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> + <xsl:output doctype-system='system'/> + <xsl:template match='/'> + <xsl:text xml:space='preserve'> a </xsl:text> + <foo/> + </xsl:template> +</xsl:stylesheet>"; + XslTransform t = new XslTransform (); + t.Load (new XmlTextReader (xsl, XmlNodeType.Document, null)); + XmlDocument doc = new XmlDocument (); + try { + t.Transform (new XPathDocument ( + new StringReader ("<root/>")), + null, TextWriter.Null); + Assert.Fail ("should fail; doctype is not allowed after whitespace. See XSLT 1.0 section 16.1."); + } catch { + } + } } } |