dtd-0.6.0: Parse and render DTD files

Safe HaskellSafe-Infered

Data.DTD.Types

Contents

Synopsis

DTD structure

data DTD Source

A DTD is a sequence components in any order.

Instances

data DTDTextDecl Source

The ?xml text declaration at the beginning of a DTD.

Constructors

DTDTextDecl 

data DTDComponent Source

The kinds of components that can appear in a DTD.

Constructors

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

Constructors

InternalGeneralEntityDecl 
ExternalGeneralEntityDecl

An external general entity is unparsed if a notation is specified.

Element declarations

data ElementDecl Source

A declaration of an element.

data ContentDecl Source

The content that can occur in an element.

Constructors

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.

Constructors

CMName Text Repeat

Element name

CMChoice [ContentModel] Repeat

Choice, delimited by "|"

CMSeq [ContentModel] Repeat

Sequence, delimited by ","

data Repeat Source

The number of times a production of content model syntax can repeat.

Attribute declarations

data AttList Source

A list of attribute declarations for an element.

Constructors

AttList 

Fields

attListElementName :: Text

The name of the element to which the attribute declarations apply

attListDecls :: [AttDecl]
 

data AttDecl Source

A declaration of an attribute that can occur in an element.

Constructors

AttDecl 

Fields

attDeclName :: Text

The name of the attribute

attDeclType :: AttType

The type of the attribute

attDeclDefault :: AttDefault

The default value specification

Instances

data AttType Source

The type of value that an attribute can take.

Constructors

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.

Constructors

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

data Notation Source

A declaration of a 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.

Constructors

NotationSysID Text

A system ID

NotationPubID Text

A public ID

NotationPubSysID Text Text

A public ID with a system ID