Changed SRGS SISR printing to be closer to the current working draft standard, as supported by the WebSphere implementation (and thus Opera).

This commit is contained in:
bringert
2006-12-08 19:53:44 +00:00
parent c038db9d7c
commit a4b0496378
4 changed files with 83 additions and 43 deletions

View File

@@ -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