Better structure of files; introduced XML models

This commit is contained in:
Simon Martens
2025-01-01 17:00:26 +01:00
parent e46d540c01
commit 7539a2dca7
25 changed files with 297 additions and 348 deletions

47
xmlmodels/references.go Normal file
View File

@@ -0,0 +1,47 @@
package xmlmodels
import "encoding/xml"
type Reference struct {
Ref string `xml:"ref,attr"`
Category string `xml:"kat,attr"`
Unsicher bool `xml:"unsicher,attr"`
Value
}
type AgentRef struct {
XMLName xml.Name `xml:"akteur"`
Reference
}
type IssueRef struct {
XMLName xml.Name `xml:"stueck"`
Nr int `xml:"nr,attr"`
Von int `xml:"von,attr"`
Bis int `xml:"bis,attr"`
Beilage int `xml:"beilage,attr"`
DateAttributes
Reference // Nicht im Schema
}
type PlaceRef struct {
XMLName xml.Name `xml:"ort"`
Reference
}
type CategoryRef struct {
XMLName xml.Name `xml:"kategorie"`
Reference
}
type WorkRef struct {
XMLName xml.Name `xml:"werk"`
Page string `xml:"s,attr"`
Reference
}
type PieceRef struct {
XMLName xml.Name `xml:"beitrag"`
Page string `xml:"s,attr"`
Reference
}