Documentation ¶
Index ¶
- Constants
- Variables
- type Annotation
- type AuthorType
- type Binary
- type Body
- type Cite
- type Coverpage
- type CustomInfo
- type Date
- type Description
- type DocumentInfo
- type Epigraph
- type FB2
- type Image
- type Paragraph
- type Parser
- type Poem
- type PublishInfo
- type Section
- type Sequence
- type Stanza
- type Subtitle
- type Title
- type TitleInfo
- type Verse
Constants ¶
View Source
const ( XMLNS_FICTIONBOOK = "http://www.gribuser.ru/xml/fictionbook/2.0" XMLNS_XLINK = "http://www.w3.org/1999/xlink" XMLNS_GENRE = "http://www.gribuser.ru/xml/fictionbook/2.0/genres" XMLNS_XS = "http://www.w3.org/2001/XMLSchema" )
Variables ¶
View Source
var ( ErrMissionOrIncorrectXMLNS = errors.New("missing or incorrect xmlns") ErrMissionOrIncorrectXMLNSXLink = errors.New("missing or incorrect xmlns:xlink") ErrMissionOrIncorrectXMLNSGenre = errors.New("missing or incorrect xmlns:genre") ErrMissionOrIncorrectXMLNSXS = errors.New("missing or incorrect xmlns:xs") )
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type AuthorType ¶
type CustomInfo ¶
type Description ¶
type Description struct { TitleInfo TitleInfo `xml:"title-info"` DocumentInfo DocumentInfo `xml:"document-info"` PublishInfo PublishInfo `xml:"publish-info,omitempty"` CustomInfo []CustomInfo `xml:"custom-info,omitempty"` }
type DocumentInfo ¶
type DocumentInfo struct { Author []AuthorType `xml:"author"` ProgramUsed string `xml:"program-used,omitempty"` Date Date `xml:"date"` SrcURL []string `xml:"src-url,omitempty"` SrcOcr string `xml:"src-ocr,omitempty"` ID string `xml:"id"` Version float64 `xml:"version"` History string `xml:"history,omitempty"` }
type FB2 ¶
type FB2 struct { XMLName xml.Name `xml:"FictionBook"` XMLNS *string `xml:"xmlns,attr"` XMLNSXLink *string `xml:"xmlns:l,attr"` XMLNSGenre *string `xml:"xmlns:genre,attr"` XMLNSXS *string `xml:"xmlns:xs,attr"` Stylesheet []string `xml:"stylesheet"` Description Description `xml:"description"` Bodies []Body `xml:"body"` Binary []Binary `xml:"binary"` }
func (*FB2) BodySectionTitles ¶
func (*FB2) FixNamespaces ¶
func (fb2 *FB2) FixNamespaces()
func (*FB2) ValidateNamespaces ¶
type PublishInfo ¶
type TitleInfo ¶
type TitleInfo struct { Genre []string `xml:"genre"` Author []AuthorType `xml:"author"` BookTitle string `xml:"book-title"` Annotation Annotation `xml:"annotation,omitempty"` Coverpage Coverpage `xml:"coverpage"` Keywords string `xml:"keywords,omitempty"` Date Date `xml:"date"` Lang string `xml:"lang"` SrcLang string `xml:"src-lang,omitempty"` Translator []AuthorType `xml:"translator,omitempty"` Sequence Sequence `xml:"sequence,omitempty"` }
Click to show internal directories.
Click to hide internal directories.