packages feed

dtd-types 0.0.0.1 → 0.1.0.0

raw patch · 2 files changed

+20/−17 lines, 2 files

Files

Data/XML/DTD/Types.hs view
@@ -69,11 +69,11 @@ import Data.Text (Text) import Data.Typeable ( Typeable, TypeRep, typeOf                      , mkTyConApp, mkTyCon)-import Data.XML.Types (ExternalID)+import Data.XML.Types (ExternalID, Name, Instruction)  -- | A 'DTD' is a sequence components in any order. data DTD = DTD-             { dtdTextDecl :: DTDTextDecl+             { dtdTextDecl :: Maybe DTDTextDecl              , dtdComponents :: [DTDComponent]              }   deriving (Show, Eq)@@ -101,6 +101,7 @@    | DTDNotation Notation       -- ^ A notation declaration    | DTDPERef PERef             -- ^ A parameter entity reference in                                 -- the top-level flow of the DTD+   | DTDInstruction Instruction -- ^ A processing instruction    | DTDComment Text            -- ^ A comment   deriving (Show, Eq) @@ -114,23 +115,24 @@ -- the DTD; it is specified by external syntax declared as a notation -- elsewhere in the DTD. data EntityDecl =-     InternalEntityDecl                   -- ^ An internal general entity+     InternalEntityDecl        { entityDeclName :: Text        , entityDeclValue :: Text-       }-   | ExternalEntityDecl                   -- ^ An external general+       }                                  -- ^ An internal general entity+   | ExternalEntityDecl+       { entityDeclName :: Text+       , entityDeclID :: ExternalID+       , entityDeclNotation :: Maybe Text+       }                                  -- ^ An external general                                           -- entity, parsed or                                           -- unparsed. It is unparsed                                           -- if a notation is                                           -- specified.-       { entityDeclName :: Text-       , entityDeclID :: ExternalID-       , entityDeclNotation :: Maybe Text-       }-   | ParameterEntityDecl                  -- ^ A parameter entity++   | ParameterEntityDecl        { entityDeclName :: Text        , peDeclValue :: [PEContent]-       }+       }                                 -- ^ A parameter entity   deriving (Show, Eq)  instance Typeable EntityDecl where@@ -153,7 +155,7 @@ -- | A declaration of an element. data ElementDecl =      ElementDecl-      { eltDeclName :: Text+      { eltDeclName :: Name       , eltDeclContent :: ContentDecl       }   deriving (Show, Eq)@@ -174,7 +176,7 @@  -- | A model of structured content for an element. data ContentModel =-     CMName Text Repeat             -- ^ Element name+     CMName Name Repeat             -- ^ Element name    | CMChoice [ContentModel] Repeat -- ^ Choice, delimited by @\"|\"@    | CMSeq [ContentModel] Repeat    -- ^ Sequence, delimited by @\",\"@   deriving (Show, Eq)@@ -193,7 +195,7 @@ -- | A list of attribute declarations for an element. data AttrList =      AttrList-       { attrListElementName :: Text -- ^ The name of the element to+       { attrListElementName :: Name -- ^ The name of the element to                                      -- which the attribute                                      -- declarations apply        , attrListDecls :: [AttrDecl]@@ -206,7 +208,7 @@ -- | A declaration of an attribute that can occur in an element. data AttrDecl =      AttrDecl-       { attrDeclName :: Text           -- ^ The name of the attribute+       { attrDeclName :: Name           -- ^ The name of the attribute        , attrDeclType :: AttrType       -- ^ The type of the attribute        , attrDeclDefault :: AttrDefault -- ^ The default value specification        }@@ -224,7 +226,7 @@    | AttrEntityType           -- ^ An unparsed external entity    | AttrEntitiesType         -- ^ One or more unparsed external entities    | AttrNmTokenType          -- ^ A name-like token-   | AttrNmTokensTYpe         -- ^ One or more name-like tokens+   | AttrNmTokensType         -- ^ One or more name-like tokens    | AttrEnumType [Text]      -- ^ One of the given values    | AttrNotationType [Text]  -- ^ Specified by external syntax                               -- declared as a notation
dtd-types.cabal view
@@ -1,5 +1,5 @@ name: dtd-types-version: 0.0.0.1+version: 0.1.0.0 synopsis: Basic types for representing XML DTDs description:   This package provides types to represent an XML Document Type@@ -36,6 +36,7 @@ category: Text, XML stability: experimental bug-reports: mailto:gale@sefer.org+homepage: http://projects.haskell.org/dtd/  source-repository head   type: darcs