Safe Haskell | None |
---|---|
Language | Haskell2010 |
Low-level parsers for doctype's internal subset:
- parsed tokens are small and may overlap; it is not possible to tokenize doctype internal-subset in a stateless way
- parsers are reversible: all formatting details are retained (e.g. whitespacing)
All documentation examples assume the following setup:
:set -XOverloadedStrings import Data.Attoparsec.ByteString
Synopsis
- module Data.XML.Parser.Low.Name
- module Data.XML.Parser.Low.Reference
- newtype ParameterEntityRef = ParameterEntityRef Text
- data EntityValue
- tokenEntityOpen :: CharParsing m => m ()
- tokenElementTypeOpen :: CharParsing m => m ()
- tokenElementTypeContentEmpty :: CharParsing m => m ()
- tokenElementTypeContentAny :: CharParsing m => m ()
- tokenAttributeListOpen :: CharParsing m => m ()
- tokenPercent :: CharParsing m => m ()
- tokenNotationOpen :: CharParsing m => m ()
- tokenPublic :: CharParsing m => m ()
- tokenParameterEntityRef :: CharParsing m => Monad m => m ParameterEntityRef
- tokenEntityValue :: CharParsing m => Monad m => String -> m EntityValue
Documentation
module Data.XML.Parser.Low.Name
newtype ParameterEntityRef Source #
Parameter entity reference
Instances
Eq ParameterEntityRef Source # | |
Defined in Data.XML.InternalSubset.Parser.Low (==) :: ParameterEntityRef -> ParameterEntityRef -> Bool # (/=) :: ParameterEntityRef -> ParameterEntityRef -> Bool # | |
Ord ParameterEntityRef Source # | |
Defined in Data.XML.InternalSubset.Parser.Low compare :: ParameterEntityRef -> ParameterEntityRef -> Ordering # (<) :: ParameterEntityRef -> ParameterEntityRef -> Bool # (<=) :: ParameterEntityRef -> ParameterEntityRef -> Bool # (>) :: ParameterEntityRef -> ParameterEntityRef -> Bool # (>=) :: ParameterEntityRef -> ParameterEntityRef -> Bool # max :: ParameterEntityRef -> ParameterEntityRef -> ParameterEntityRef # min :: ParameterEntityRef -> ParameterEntityRef -> ParameterEntityRef # | |
Read ParameterEntityRef Source # | |
Defined in Data.XML.InternalSubset.Parser.Low | |
Show ParameterEntityRef Source # | |
Defined in Data.XML.InternalSubset.Parser.Low showsPrec :: Int -> ParameterEntityRef -> ShowS # show :: ParameterEntityRef -> String # showList :: [ParameterEntityRef] -> ShowS # |
data EntityValue Source #
Instances
Eq EntityValue Source # | |
Defined in Data.XML.InternalSubset.Parser.Low (==) :: EntityValue -> EntityValue -> Bool # (/=) :: EntityValue -> EntityValue -> Bool # | |
Ord EntityValue Source # | |
Defined in Data.XML.InternalSubset.Parser.Low compare :: EntityValue -> EntityValue -> Ordering # (<) :: EntityValue -> EntityValue -> Bool # (<=) :: EntityValue -> EntityValue -> Bool # (>) :: EntityValue -> EntityValue -> Bool # (>=) :: EntityValue -> EntityValue -> Bool # max :: EntityValue -> EntityValue -> EntityValue # min :: EntityValue -> EntityValue -> EntityValue # | |
Read EntityValue Source # | |
Defined in Data.XML.InternalSubset.Parser.Low readsPrec :: Int -> ReadS EntityValue # readList :: ReadS [EntityValue] # readPrec :: ReadPrec EntityValue # readListPrec :: ReadPrec [EntityValue] # | |
Show EntityValue Source # | |
Defined in Data.XML.InternalSubset.Parser.Low showsPrec :: Int -> EntityValue -> ShowS # show :: EntityValue -> String # showList :: [EntityValue] -> ShowS # |
tokenEntityOpen :: CharParsing m => m () Source #
<!ENTITY
tokenElementTypeOpen :: CharParsing m => m () Source #
<!ELEMENT
tokenElementTypeContentEmpty :: CharParsing m => m () Source #
EMPTY
tokenElementTypeContentAny :: CharParsing m => m () Source #
ANY
tokenAttributeListOpen :: CharParsing m => m () Source #
<!ATTLIST
tokenPercent :: CharParsing m => m () Source #
%
tokenNotationOpen :: CharParsing m => m () Source #
<!NOTATION
tokenPublic :: CharParsing m => m () Source #
PUBLIC
tokenParameterEntityRef :: CharParsing m => Monad m => m ParameterEntityRef Source #
https://www.w3.org/TR/REC-xml/#NT-PEReference
>>>
parseOnly tokenParameterEntityRef "%foo;"
Right (ParameterEntityRef "foo")