Safe Haskell | None |
---|
- data DTD = DTD {}
- data DTDTextDecl = DTDTextDecl {
- dtdXMLVersion :: Maybe Text
- dtdEncoding :: Text
- data DTDComponent
- data EntityDecl
- = InternalGeneralEntityDecl {
- entityDeclName :: Text
- entityDeclValue :: Text
- | ExternalGeneralEntityDecl {
- entityDeclName :: Text
- entityDeclID :: ExternalID
- entityDeclNotation :: Maybe Text
- = InternalGeneralEntityDecl {
- data ElementDecl = ElementDecl {
- eltDeclName :: Text
- eltDeclContent :: ContentDecl
- data ContentDecl
- = ContentEmpty
- | ContentAny
- | ContentElement ContentModel
- | ContentMixed [Text]
- data ContentModel
- = CMName Text Repeat
- | CMChoice [ContentModel] Repeat
- | CMSeq [ContentModel] Repeat
- data Repeat
- = One
- | ZeroOrOne
- | ZeroOrMore
- | OneOrMore
- data AttList = AttList {
- attListElementName :: Text
- attListDecls :: [AttDecl]
- data AttDecl = AttDecl {
- attDeclName :: Text
- attDeclType :: AttType
- attDeclDefault :: AttDefault
- data AttType
- = AttStringType
- | AttIDType
- | AttIDRefType
- | AttIDRefsType
- | AttEntityType
- | AttEntitiesType
- | AttNmTokenType
- | AttNmTokensType
- | AttEnumType [Text]
- | AttNotationType [Text]
- data AttDefault
- = AttRequired
- | AttImplied
- | AttFixed Text
- | AttDefaultValue Text
- data Notation = Notation {
- notationName :: Text
- notationSource :: NotationSource
- data NotationSource
- = NotationSysID Text
- | NotationPubID Text
- | NotationPubSysID Text Text
DTD structure
A DTD
is a sequence components in any order.
data DTDTextDecl Source
The ?xml
text declaration at the beginning of a DTD.
DTDTextDecl | |
|
data DTDComponent Source
The kinds of components that can appear in a DTD
.
DTDEntityDecl EntityDecl | Entity declaration |
DTDElementDecl ElementDecl | Element declaration |
DTDAttList AttList | List of attribute declarions for an element |
DTDNotation Notation | A notation declaration |
DTDInstruction Instruction | A processing instruction |
DTDComment Text | A comment |
Entity declarations and references
data EntityDecl Source
InternalGeneralEntityDecl | |
| |
ExternalGeneralEntityDecl | An external general entity is unparsed if a notation is specified. |
|
Element declarations
data ElementDecl Source
A declaration of an element.
ElementDecl | |
|
data ContentDecl Source
The content that can occur in an element.
ContentEmpty | No content |
ContentAny | Unrestricted content |
ContentElement ContentModel | Structured element content |
ContentMixed [Text] | A mixture of text and elements |
data ContentModel Source
A model of structured content for an element.
CMName Text Repeat | Element name |
CMChoice [ContentModel] Repeat | Choice, delimited by |
CMSeq [ContentModel] Repeat | Sequence, delimited by |
The number of times a production of content model syntax can repeat.
Attribute declarations
A list of attribute declarations for an element.
AttList | |
|
A declaration of an attribute that can occur in an element.
AttDecl | |
|
The type of value that an attribute can take.
AttStringType | Any text |
AttIDType | A unique ID |
AttIDRefType | A reference to an ID |
AttIDRefsType | One or more references to IDs |
AttEntityType | An unparsed external entity |
AttEntitiesType | One or more unparsed external entities |
AttNmTokenType | A name-like token |
AttNmTokensType | One or more name-like tokens |
AttEnumType [Text] | One of the given values |
AttNotationType [Text] | Specified by external syntax declared as a notation |
data AttDefault Source
A default value specification for an attribute.
AttRequired | No default value; the attribute must always be supplied |
AttImplied | No default value; the attribute is optional |
AttFixed Text | When supplied, the attribute must have the given value |
AttDefaultValue Text | The attribute has the given default value when not supplied |
Notation declarations
A declaration of a notation.
Notation | |
|
data NotationSource Source
A source for a notation. We do not use the usual ExternalID
type here, because for notations it is only optional, not required,
for a public ID to be accompanied also by a system ID.
NotationSysID Text | A system ID |
NotationPubID Text | A public ID |
NotationPubSysID Text Text | A public ID with a system ID |