module Text.XML.Basic.Name where
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
match proto = (fromString proto ==)
matchAny :: (C name) => [String] -> name -> Bool
matchAny proto = flip elem (map fromString proto)