[gnumeric] fuzzxml: write empty tags in short form.



commit fbb4d3f25ebf552e69350280b6d669be0dc34e8a
Author: Morten Welinder <terra gnome org>
Date:   Fri Aug 6 11:35:24 2010 -0400

    fuzzxml: write empty tags in short form.

 test/ChangeLog |    4 ++++
 test/fuzzxml   |   10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/test/ChangeLog b/test/ChangeLog
index e2dce5b..fa5d078 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-06  Morten Welinder  <terra gnome org>
+
+	* fuzzxml: Write empty tags in the short form.
+
 2010-07-30  Morten Welinder <terra gnome org>
 
 	* Release 1.10.8
diff --git a/test/fuzzxml b/test/fuzzxml
index 4d9a708..4588144 100755
--- a/test/fuzzxml
+++ b/test/fuzzxml
@@ -155,9 +155,13 @@ sub write_xml {
 	    $writer->characters($cont);
 	} else {
 	    my ($attrs,@l) = @$cont;
-	    $writer->startTag($tag, @$attrs);
-	    &write_xml ($writer, \ l);
-	    $writer->endTag($tag);
+	    if (@l == 0) {
+		$writer->emptyTag($tag, @$attrs);
+	    } else {
+		$writer->startTag($tag, @$attrs);
+		&write_xml ($writer, \ l);
+		$writer->endTag($tag);
+	    }
 	}	
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]