2024-10-13 17:19:40 +02:00
|
|
|
package atomfeed
|
|
|
|
|
|
|
|
import "errors"
|
|
|
|
|
|
|
|
type InlineXHTMLContent struct {
|
|
|
|
*CommonAttributes
|
|
|
|
Type string `xml:"type,attr"`
|
|
|
|
XHTMLDiv string `xml:"xhtmldiv"`
|
|
|
|
}
|
|
|
|
|
2024-10-15 19:32:14 +02:00
|
|
|
func (i *InlineXHTMLContent) isContent() bool { return true }
|
|
|
|
|
|
|
|
func (i *InlineXHTMLContent) hasSRC() bool { return false }
|
|
|
|
|
|
|
|
func (i *InlineXHTMLContent) getType() string { return i.Type }
|
2024-10-13 17:19:40 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|