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>2005-06-06 12:52:27 +0400
committerAtsushi Eno <atsushieno@gmail.com>2005-06-06 12:52:27 +0400
commit6fd49bea9af97ae4c3a58373fc95b9763acb6f7c (patch)
tree61f8cff609e30c193d1c4df55d456314e26c2fe2 /mcs/class/System.XML/Mono.Xml.Xsl
parente479bca05a1e11cb03adc55f2bf6d010633a29ea (diff)
2005-06-06 Atsushi Enomoto <atsushi@ximian.com>
* HtmlEmitter.cs : Boolean attribute values should be omitted, but only for related elements. svn path=/trunk/mcs/; revision=45476
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Xsl')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog5
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/HtmlEmitter.cs11
2 files changed, 10 insertions, 6 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
index af3b1df9fc6..64f2fc976b9 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HtmlEmitter.cs : Boolean attribute values should be omitted, but
+ only for related elements.
+
2005-05-07 Atsushi Enomoto <atsushi@ximian.com>
* MSXslScriptManager.cs : it should ignore compiler warnings. This
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/HtmlEmitter.cs b/mcs/class/System.XML/Mono.Xml.Xsl/HtmlEmitter.cs
index 1d7349089df..617e916e484 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl/HtmlEmitter.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/HtmlEmitter.cs
@@ -302,17 +302,16 @@ namespace Mono.Xml.Xsl
}
string attribute = localName.ToUpper (CultureInfo.InvariantCulture);
- switch (attribute) {
- case "OPTION":
- case "CHECKED":
- case "SELECTED":
+ string element = ((string) elementNameStack.Peek ()).ToLower (CultureInfo.InvariantCulture);
+
+ if (attribute == "SELECTED" && element == "option"
+ || attribute == "CHECKED" && element == "input")
return;
- }
+
writer.Write ("=\"");
openAttribute = true;
// URI attribute should be escaped.
- string element = ((string) elementNameStack.Peek ()).ToLower (CultureInfo.InvariantCulture);
string attrName = null;
string [] attrNames = null;
switch (element) {