summaryrefslogtreecommitdiff
path: root/src/GF/Data
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2006-12-08 19:53:44 +0000
committerbringert <bringert@cs.chalmers.se>2006-12-08 19:53:44 +0000
commita4b04963782448e477e2ef54640ee5739c97f17a (patch)
tree7d3664c6e070f50eb27c7ac1f1bf4bf2a91b88d6 /src/GF/Data
parentc038db9d7cc39de613ece4edcfbc5820d53317dc (diff)
Changed SRGS SISR printing to be closer to the current working draft standard, as supported by the WebSphere implementation (and thus Opera).
Diffstat (limited to 'src/GF/Data')
-rw-r--r--src/GF/Data/XML.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GF/Data/XML.hs b/src/GF/Data/XML.hs
index 03965fba7..94d8e354a 100644
--- a/src/GF/Data/XML.hs
+++ b/src/GF/Data/XML.hs
@@ -12,7 +12,7 @@ module GF.Data.XML (XML(..), Attr, comments, showsXMLDoc, showsXML) where
import GF.Data.Utilities
-data XML = Data String | CData String | Tag String [Attr] [XML] | Comment String
+data XML = Data String | CData String | Tag String [Attr] [XML] | Comment String | Empty
deriving (Ord,Eq,Show)
type Attr = (String,String)
@@ -32,6 +32,7 @@ showsXML (Tag t as cs) =
showChar '<' . showString t . showsAttrs as . showChar '>'
. concatS (map showsXML cs) . showString "</" . showString t . showChar '>'
showsXML (Comment c) = showString "<!-- " . showString c . showString " -->"
+showsXML (Empty) = id
showsAttrs :: [Attr] -> ShowS
showsAttrs = concatS . map (showChar ' ' .) . map showsAttr