Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
We provide a type class for tag and attribute names. Instances can be names that preserve case, names with lowercase letters as canonical representation.
Synopsis
- class Ord name => C name where
- fromString :: String -> name
- toString :: name -> String
- class Ord ident => Tag ident where
- tagFromString :: String -> ident
- tagToString :: ident -> String
- class Ord ident => Attribute ident where
- attributeFromString :: String -> ident
- attributeToString :: ident -> String
- match :: C name => String -> name -> Bool
- matchAny :: C name => [String] -> name -> Bool
types and classes
class Ord ident => Tag ident where Source #
We need to distinguish between tag names and attribute names, because DOCTYPE as tag name must be written upper case, whereas as attribute name it may be written either way.
tagFromString :: String -> ident Source #
tagToString :: ident -> String Source #
Instances
Tag T Source # | |
Defined in Text.XML.Basic.Name.LowerCase tagFromString :: String -> T Source # tagToString :: T -> String Source # | |
Tag T Source # | |
Defined in Text.XML.Basic.Name.MixedCase tagFromString :: String -> T Source # tagToString :: T -> String Source # | |
Tag T Source # | |
Defined in Text.XML.Basic.Name.Qualified tagFromString :: String -> T Source # tagToString :: T -> String Source # |
class Ord ident => Attribute ident where Source #
attributeFromString :: String -> ident Source #
attributeToString :: ident -> String Source #
Instances
Attribute T Source # | |
Defined in Text.XML.Basic.Name.LowerCase attributeFromString :: String -> T Source # attributeToString :: T -> String Source # | |
Attribute T Source # | |
Defined in Text.XML.Basic.Name.MixedCase attributeFromString :: String -> T Source # attributeToString :: T -> String Source # | |
Attribute T Source # | |
Defined in Text.XML.Basic.Name.Qualified attributeFromString :: String -> T Source # attributeToString :: T -> String Source # |