pandoc-3.1.11.1: Conversion between markup formats
CopyrightCopyright (C) 2007 Galois Inc. 2021-2023 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.XML.Light.Types

Description

This code is taken from xml-light, released under the BSD3 license. It has been modified to use Text instead of String, and the fromXL* functions have been added.

Synopsis

Basic types, duplicating those from xml-light but with Text

type Line = Integer Source #

A line is an Integer

data Content Source #

XML content

Constructors

Elem Element 
Text CData 
CRef Text 

Instances

Instances details
Data Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Content -> c Content Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Content Source #

toConstr :: Content -> Constr Source #

dataTypeOf :: Content -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Content) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Content) Source #

gmapT :: (forall b. Data b => b -> b) -> Content -> Content Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Content -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Content -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Content -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Content -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

Show Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Ord Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Node Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Content -> Element Source #

Node [Content] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Content] -> Element Source #

Node (Attr, Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Content) -> Element Source #

Node ([Attr], Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Content) -> Element Source #

Node ([Attr], [Content]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Content]) -> Element Source #

data Element Source #

XML elements

Constructors

Element 

Instances

Instances details
Data Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Element -> c Element Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Element Source #

toConstr :: Element -> Constr Source #

dataTypeOf :: Element -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Element) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Element) Source #

gmapT :: (forall b. Data b => b -> b) -> Element -> Element Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Element -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Element -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Element -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Element -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Element -> m Element Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Element -> m Element Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Element -> m Element Source #

Show Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Ord Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Node Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Element -> Element Source #

Node [Element] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Element] -> Element Source #

Node (Attr, Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Element) -> Element Source #

Node ([Attr], Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Element) -> Element Source #

Node ([Attr], [Element]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Element]) -> Element Source #

data Attr Source #

XML attributes

Constructors

Attr 

Fields

Instances

Instances details
Data Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Attr -> c Attr Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Attr Source #

toConstr :: Attr -> Constr Source #

dataTypeOf :: Attr -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Attr) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Attr) Source #

gmapT :: (forall b. Data b => b -> b) -> Attr -> Attr Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Attr -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Attr -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Attr -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Attr -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Attr -> m Attr Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Attr -> m Attr Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Attr -> m Attr Source #

Show Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

(==) :: Attr -> Attr -> Bool Source #

(/=) :: Attr -> Attr -> Bool Source #

Ord Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Node Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Attr -> Element Source #

Node [Attr] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Attr] -> Element Source #

Node (Attr, CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, CData) -> Element Source #

Node (Attr, Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Content) -> Element Source #

Node (Attr, Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Element) -> Element Source #

Node (Attr, Text) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Text) -> Element Source #

Node ([Attr], CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], CData) -> Element Source #

Node ([Attr], Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Content) -> Element Source #

Node ([Attr], Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Element) -> Element Source #

Node ([Attr], Text) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Text) -> Element Source #

Node ([Attr], [CData]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [CData]) -> Element Source #

Node ([Attr], [Content]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Content]) -> Element Source #

Node ([Attr], [Element]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Element]) -> Element Source #

data CData Source #

XML CData

Constructors

CData 

Instances

Instances details
Data CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CData -> c CData Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CData Source #

toConstr :: CData -> Constr Source #

dataTypeOf :: CData -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CData) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CData) Source #

gmapT :: (forall b. Data b => b -> b) -> CData -> CData Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CData -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CData -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> CData -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CData -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CData -> m CData Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CData -> m CData Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CData -> m CData Source #

Show CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

(==) :: CData -> CData -> Bool Source #

(/=) :: CData -> CData -> Bool Source #

Ord CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Node CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> CData -> Element Source #

Node [CData] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [CData] -> Element Source #

Node (Attr, CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, CData) -> Element Source #

Node ([Attr], CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], CData) -> Element Source #

Node ([Attr], [CData]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [CData]) -> Element Source #

data CDataKind Source #

Constructors

CDataText

Ordinary character data; pretty printer escapes &, < etc.

CDataVerbatim

Unescaped character data; pretty printer embeds it in <![CDATA[..

CDataRaw

As-is character data; pretty printer passes it along without any escaping or CDATA wrap-up.

Instances

Instances details
Data CDataKind Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDataKind -> c CDataKind Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CDataKind Source #

toConstr :: CDataKind -> Constr Source #

dataTypeOf :: CDataKind -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CDataKind) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CDataKind) Source #

gmapT :: (forall b. Data b => b -> b) -> CDataKind -> CDataKind Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDataKind -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDataKind -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> CDataKind -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDataKind -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDataKind -> m CDataKind Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDataKind -> m CDataKind Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDataKind -> m CDataKind Source #

Show CDataKind Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq CDataKind Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Ord CDataKind Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

data QName Source #

XML qualified names

Constructors

QName 

Fields

Instances

Instances details
Data QName Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QName -> c QName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QName Source #

toConstr :: QName -> Constr Source #

dataTypeOf :: QName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QName) Source #

gmapT :: (forall b. Data b => b -> b) -> QName -> QName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> QName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> QName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> QName -> m QName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QName -> m QName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QName -> m QName Source #

Show QName Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Eq QName Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

(==) :: QName -> QName -> Bool Source #

(/=) :: QName -> QName -> Bool Source #

Ord QName Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

class Node t where Source #

Methods

node :: QName -> t -> Element Source #

Instances

Instances details
Node Attr Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Attr -> Element Source #

Node CData Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> CData -> Element Source #

Node Content Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Content -> Element Source #

Node Element Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Element -> Element Source #

Node Text Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> Text -> Element Source #

Node () Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> () -> Element Source #

Node [Attr] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Attr] -> Element Source #

Node [CData] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [CData] -> Element Source #

Node [Content] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Content] -> Element Source #

Node [Element] Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> [Element] -> Element Source #

Node (Attr, CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, CData) -> Element Source #

Node (Attr, Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Content) -> Element Source #

Node (Attr, Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Element) -> Element Source #

Node (Attr, Text) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> (Attr, Text) -> Element Source #

Node ([Attr], CData) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], CData) -> Element Source #

Node ([Attr], Content) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Content) -> Element Source #

Node ([Attr], Element) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Element) -> Element Source #

Node ([Attr], Text) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], Text) -> Element Source #

Node ([Attr], [CData]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [CData]) -> Element Source #

Node ([Attr], [Content]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Content]) -> Element Source #

Node ([Attr], [Element]) Source # 
Instance details

Defined in Text.Pandoc.XML.Light.Types

Methods

node :: QName -> ([Attr], [Element]) -> Element Source #

unode :: Node t => Text -> t -> Element Source #

Create node with unqualified name

add_attr :: Attr -> Element -> Element Source #

Add an attribute to an element.

add_attrs :: [Attr] -> Element -> Element Source #

Add some attributes to an element.

Conversion functions from xml-light types