xml-basic-0.1.1: Basics for XML/HTML representation and processing

Text.XML.Basic.Name

Contents

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 whereSource

Methods

fromString :: String -> nameSource

toString :: name -> StringSource

Instances

Attribute ident => C (Name ident) 
Tag ident => C (Name ident) 

class Ord ident => Tag ident whereSource

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

tagToString :: ident -> StringSource

Instances

Tag T 
Tag T 
Tag T 

class Ord ident => Attribute ident whereSource

convenience functions

match :: C name => String -> name -> BoolSource

matchAny :: C name => [String] -> name -> BoolSource