changeset 736:e80ad5feaba8

cleanup some old xml code
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 02 Jun 2006 19:18:15 +0200
parents e3c44dc8f488
children 87cf4c0aac44
files MoinMoin/wikixml/marshal.py MoinMoin/wikixml/util.py MoinMoin/wikixml/xsltutil.py
diffstat 3 files changed, 3 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikixml/marshal.py	Fri Jun 02 19:04:27 2006 +0200
+++ b/MoinMoin/wikixml/marshal.py	Fri Jun 02 19:18:15 2006 +0200
@@ -24,12 +24,12 @@
         Default is to omit all properties starting with an underscore.
 
         TAG_MAP is a translation table for tag names, and is empty by
-        default. It can also be used to surpress certain properties by
+        default. It can also be used to suppress certain properties by
         mapping a tag name to `None`.
     """
 
-    # Convenience: Standard-XML-Deklaration
-    XML_DECL = '<?xml version="1.0" encoding="ISO-8859-1"?>\n'
+    # Convenience: Standard XML declaration
+    XML_DECL = '<?xml version="1.0" encoding="utf-8"?>\n'
 
     # Container Tags
     ROOT_CONTAINER = "data"
@@ -65,18 +65,15 @@
             content = "<none/>"
 
         elif isinstance(data, types.StringType):
-            # String
             content = (data.replace("&", "&amp;") # Must be done first!
                            .replace("<", "&lt;")
                            .replace(">", "&gt;"))
 
         elif isinstance(data, types.DictionaryType):
-            # Dictionary
             for key, value in data.items():
                 add_content(self.__toXML(key, value))
 
         elif isinstance(data, types.ListType) or isinstance(data, types.TupleType):
-            # List or Tuple
             for item in data:
                 add_content(self.__toXML(self.ITEM_CONTAINER, item))
 
@@ -87,7 +84,6 @@
             add_content(self.__toXML(self.ROOT_CONTAINER, data.__dict__))
 
         else:
-            # Everything else
             content = (str(data).replace("&", "&amp;") # Must be done first!
                                 .replace("<", "&lt;")
                                 .replace(">", "&gt;"))
--- a/MoinMoin/wikixml/util.py	Fri Jun 02 19:04:27 2006 +0200
+++ b/MoinMoin/wikixml/util.py	Fri Jun 02 19:18:15 2006 +0200
@@ -70,4 +70,3 @@
         self.endElementNS((self.xmlns['rdf'], 'RDF'), 'rdf:RDF')
         XMLGenerator.endDocument(self)
 
-
--- a/MoinMoin/wikixml/xsltutil.py	Fri Jun 02 19:04:27 2006 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-"""
-    MoinMoin - XSLT Utilities
-
-    @copyright: 2001, 2003 by Jürgen Hermann <jh@web.de>
-    @license: GNU GPL, see COPYING for details.
-"""
-
-## currently empty, due to adaption to 4Suite 1.0a1
-## keep this file for later!
-