First implementation of an atom feed

This commit is contained in:
2024-10-13 17:19:40 +02:00
parent 520c2de196
commit 92c794d070
23 changed files with 805 additions and 0 deletions

23
inlineXHTMLContent.go Normal file
View File

@@ -0,0 +1,23 @@
package atomfeed
import "errors"
type InlineXHTMLContent struct {
*CommonAttributes
Type string `xml:"type,attr"`
XHTMLDiv string `xml:"xhtmldiv"`
}
func (i *InlineXHTMLContent) IsContent() bool { return true }
func (i *InlineXHTMLContent) Check() error {
if i.Type != "xhtml" {
return errors.New("type attribute of inline xhtml content must be xhtml")
}
if i.XHTMLDiv == "" {
return errors.New("xhtmlDiv element of inline xhtml content empty")
}
return nil
}