Documentation ¶
Overview ¶
Package DTD Representss main structs of a DTD
Specifications: https://www.w3.org/TR/xml11/
Found this reference very usefull: https://xmlwriter.net/xml_guide/attlist_declaration.shtml
This is a simplified implementation ¶
This package offers one struct per DTD blocks Each struct will implements the IDTDBlock the IDTDBlock is necessary for the parser to populate and process its collection
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD ¶
Package DTD Represents main structs of a DTD
Index ¶
- Constants
- func AttributeType(a int) string
- func IsAttlistType(i interface{}) bool
- func IsCommentType(i interface{}) bool
- func IsElementType(i interface{}) bool
- func IsEntityType(i interface{}) bool
- func IsNotationType(i interface{}) bool
- func SeekAttributeType(s string) int
- func Translate(i int) string
- type Attlist
- type Attribute
- type Comment
- type DTDExtra
- type Element
- type Entity
- type IDTDBlock
- type Notation
- type XMLDecl
Constants ¶
const ( // DTD Block type UNIDENTIFIED = -1 XMLDECL = 0 ATTRIBUTE = 1 COMMENT = 3 ELEMENT = 4 ENTITY = 5 PCDATA = 6 EXPORTED_ENTITY = 7 ATTLIST = 8 NOTATION = 9 // string type CDATA = 20 // Tokenized Attribute type TOKEN_ID = 30 TOKEN_IDREF = 31 TOKEN_IDREFS = 32 TOKEN_ENTITY = 33 TOKEN_ENTITIES = 34 TOKEN_NMTOKEN = 35 TOKEN_NMTOKENS = 36 //Enumerated Attribute Type: Attribute Description: ENUM_NOTATION = 37 ENUM_ENUM = 38 )
Variables ¶
This section is empty.
Functions ¶
func AttributeType ¶
AttributeType convert DTD Attribute type (int) to its corresponding string value
func IsAttlistType ¶
func IsAttlistType(i interface{}) bool
IsAttlistType check if the interface is a DTD.Comment
func IsCommentType ¶
func IsCommentType(i interface{}) bool
IsCommentType check if the interface is a DTD.Comment
func IsElementType ¶
func IsElementType(i interface{}) bool
IsElementType check if the interface is a DTD.Element
func IsEntityType ¶
func IsEntityType(i interface{}) bool
IsEntityType check if the interface is a DTD.ExportedEntity
func IsNotationType ¶
func IsNotationType(i interface{}) bool
IsNotationType check if the interface is a DTD.Notation
func SeekAttributeType ¶
SeekAttributeType Attempt to identify attribute type
Types ¶
type Attlist ¶
Attlist represents an attlist
func (*Attlist) GetExported ¶
GetExported Unused, tells if the comment was exported implements IDTDBlock
func (*Attlist) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock
type Attribute ¶
type Attribute struct { Name string Type int Default string Value string Implied bool Required bool Fixed bool IsEntity bool }
Attribute represents an attribute
type Comment ¶
Comment represents a comment
func (*Comment) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock
type Element ¶
Element represents a DTD element
func (*Element) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock
type Entity ¶
type Entity struct { Parameter bool IsExternal bool IsInternal bool Name string Value string Public bool System bool Url string Exported bool Attributes []Attribute }
Entity representss a DTD Entity
func (Entity) MarshalLogObject ¶
func (e Entity) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*Entity) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock
type IDTDBlock ¶
type IDTDBlock interface { GetName() string Render() string SetExported(v bool) GetValue() string GetExtra() *DTDExtra }
IDTDBlock Interface for DTD block
type Notation ¶
Notation reprensents a notation
func (*Notation) Render ¶
Render an Notation implements IDTDBlock <!NOTATION name SYSTEM "URI"> <!NOTATION name PUBLIC "public_ID"> <!NOTATION name PUBLIC "public_ID" "URI">
func (*Notation) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock
type XMLDecl ¶
Attlist represents an attlist
func (*XMLDecl) GetExported ¶
GetExported Unused, tells if the comment was exported implements IDTDBlock
func (*XMLDecl) GetParameter ¶
GetParameter return parameter for entity only implements IDTDBlock
func (*XMLDecl) SetExported ¶
SetExported set the current entity to exported implements IDTDBlock