Documentation ¶
Index ¶
Constants ¶
View Source
const ( G7UCLetter = "A-Z" G7Digit = "0-9" G7Nonzero = "1-9" G7Underscore = "_" G7Atsign = "@" G7Banned = `\x{0}-\x{8}\x{B}-\x{C}\x{E}-\x{1F}\x{7F}\x{80}-\x{9F}\x{D800}-\x{DFFF}\x{FFFE}-\x{FFFF}` )
View Source
const ( TagCONT = "CONT" TagHEAD = "HEAD" TagTRLR = "TRLR" )
Variables ¶
View Source
var (
URIPrefixes = map[string]string{
"g7": "https://gedcom.io/terms/v7/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"dcat": "http://www.w3.org/ns/decat#",
}
)
Functions ¶
func AddValidTag ¶
AddValidTag adds a tag to the list of valid tags. If it already exists, return false, otherwise true.
func IsValidTag ¶
func IsValidTagType ¶
Types ¶
type Specs ¶
type Specs struct { Tags map[string]TagDef Calendars map[string]calDef Types map[string]typeDef // contains filtered or unexported fields }
func (*Specs) IsValidTag ¶
IsValidTag returns true if the tag is a valid standard or extended tag
func (*Specs) SetDeprecatedTags ¶
SetDeprecatedTags sets the list of deprecated tags based on the provided GEDCOM version.
type TagDef ¶
type TagDef struct { Lang string `yaml:"lang"` Type string `yaml:"type"` URI string `yaml:"uri"` Tag string `yaml:"standard tag"` FullTag string Specification []string `yaml:"specification"` Payload string `yaml:"payload"` Substructures map[string]string `yaml:"substructures"` Superstructures map[string]string `yaml:"superstructures"` ValueOf []string `yaml:"value of"` // Validation func based on ABNF spec Rule operators.Operator EnumSetName string `yaml:"enumeration set"` EnumSet enumSet }
func (*TagDef) InferRule ¶
func (t *TagDef) InferRule()
InferRule extracts the tag's validation rule from the ABNF Validation map.
func (*TagDef) ValidatePayload ¶
ValidatePayload checks if the tag's payload conforms to the ABNF definition.
Click to show internal directories.
Click to hide internal directories.