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/Mono.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/Mono.Xml.Xsl')
-rw-r--r-- | mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/System.XML/Mono.Xml.Xsl/GenericOutputter.cs | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog index 871d017e93a..43a70da5559 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog @@ -1,3 +1,10 @@ +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). + 2005-12-24 Gert Driesen <drieseng@users.sourceforge.net> * XslOutput.cs: Do not report error for unknown value for "standalone" diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/GenericOutputter.cs b/mcs/class/System.XML/Mono.Xml.Xsl/GenericOutputter.cs index 2a302cf15f0..e7af22c2e62 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/GenericOutputter.cs +++ b/mcs/class/System.XML/Mono.Xml.Xsl/GenericOutputter.cs @@ -333,6 +333,14 @@ namespace Mono.Xml.Xsl CheckState (); if (_insideCData) Emitter.WriteCDataSection (text); + // This weird check is required to reject Doctype + // after non-whitespace nodes but also to allow + // Doctype after whitespace nodes. It especially + // happens when there is an xsl:text before the + // document element (e.g. BVTs_bvt066 testcase). + else if (_state != WriteState.Content && + text.Length > 0 && XmlChar.IsWhitespace (text)) + Emitter.WriteWhitespace (text); else Emitter.WriteString (text); } |