2025-05-22 11:03:43 -03:00
|
|
|
package element
|
|
|
|
|
|
|
|
|
|
import "encoding/xml"
|
|
|
|
|
|
|
|
|
|
type Section struct {
|
|
|
|
|
XMLName xml.Name `xml:"html"`
|
|
|
|
|
Body Body `xml:"body"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-22 11:08:18 -03:00
|
|
|
var KindSection = NewElementKind("section", Section{})
|
|
|
|
|
|
|
|
|
|
func (Section) Kind() ElementKind {
|
|
|
|
|
return KindSection
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-22 11:03:43 -03:00
|
|
|
type Body struct {
|
|
|
|
|
XMLName xml.Name `xml:"body"`
|
|
|
|
|
Test string `xml:"test,attr"`
|
2025-05-22 11:09:58 -03:00
|
|
|
|
|
|
|
|
Children ElementChildren `xml:",any"`
|
2025-05-22 11:03:43 -03:00
|
|
|
}
|
|
|
|
|
|
2025-05-22 11:08:18 -03:00
|
|
|
var KindBody = NewElementKind("body", Body{})
|
|
|
|
|
|
|
|
|
|
func (Body) Kind() ElementKind {
|
|
|
|
|
return KindBody
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-22 11:03:43 -03:00
|
|
|
type Paragraph struct {
|
|
|
|
|
XMLName xml.Name `xml:"p"`
|
|
|
|
|
DataElement ElementKind `xml:"data-ipub-element,attr"`
|
|
|
|
|
Test string `xml:"test,attr"`
|
|
|
|
|
|
|
|
|
|
Text string `xml:",chardata"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-22 11:08:18 -03:00
|
|
|
var KindParagraph = NewElementKind("paragraph", Paragraph{})
|
|
|
|
|
|
|
|
|
|
func (Paragraph) Kind() ElementKind {
|
|
|
|
|
return KindParagraph
|
|
|
|
|
}
|