We do not define a tag data type here, since this is too much bound to the particular use (e.g. list or tree structure). However we define a tag name and several
- newtype Name ident = Name {
- unname :: ident
- doctype :: Tag name => Name name
- doctypeName :: Tag name => Name name
- doctypeString :: String
- cdata :: Tag name => Name name
- cdataName :: Tag name => Name name
- cdataString :: String
- isEmpty :: Tag name => Name name -> Bool
- isSloppy :: Tag name => Name name -> Bool
- isInnerOf :: Tag name => Name name -> Name name -> Bool
- closes :: Tag name => Name name -> Name name -> Bool
- maybeMetaHTTPHeader :: (Tag name, Attribute name) => Name name -> [T name string] -> Maybe (string, string)
- maybeMetaEncoding :: (Tag name, Attribute name) => Name name -> [T name String] -> Maybe String
Documentation
doctypeName :: Tag name => Name nameSource
isSloppy :: Tag name => Name name -> BoolSource
Some tags, namely those for text styles like FONT, B, I, are used quite sloppily. That is, they are not terminated or not terminated in the right order. We close them implicitly, if another tag closes and ignore non-matching closing tags.