xml-basic-0.1.3.2: Basics for XML/HTML representation and processing
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.XML.Basic.Name

Description

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

types and classes

class Ord name => C name where Source #

Methods

fromString :: String -> name Source #

toString :: name -> String Source #

Instances

Instances details
Attribute ident => C (Name ident) Source # 
Instance details

Defined in Text.XML.Basic.Attribute

Methods

fromString :: String -> Name ident Source #

toString :: Name ident -> String Source #

Tag ident => C (Name ident) Source # 
Instance details

Defined in Text.XML.Basic.Tag

Methods

fromString :: String -> Name ident Source #

toString :: Name ident -> String Source #

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.

Methods

tagFromString :: String -> ident Source #

tagToString :: ident -> String Source #

Instances

Instances details
Tag T Source # 
Instance details

Defined in Text.XML.Basic.Name.LowerCase

Tag T Source # 
Instance details

Defined in Text.XML.Basic.Name.MixedCase

Tag T Source # 
Instance details

Defined in Text.XML.Basic.Name.Qualified

class Ord ident => Attribute ident where Source #

convenience functions

match :: C name => String -> name -> Bool Source #

matchAny :: C name => [String] -> name -> Bool Source #