Documentation
¶
Index ¶
- type AmendProvision
- type AmendProvisionSentence
- type Appdx
- type AppdxFig
- type AppdxFigTitle
- type AppdxFormat
- type AppdxFormatTitle
- type AppdxNote
- type AppdxNoteTitle
- type AppdxStyle
- type AppdxStyleTitle
- type AppdxTable
- type AppdxTableTitle
- type ArithFormula
- type ArithFormulaNum
- type Article
- type ArticleCaption
- type ArticleRange
- type ArticleTitle
- type Chapter
- type ChapterTitle
- type Class
- type ClassSentence
- type ClassTitle
- type Column
- type ContentNode
- type Division
- type DivisionTitle
- type EnactStatement
- type Era
- type Fig
- type FigStruct
- type FigStructTitle
- type Format
- type FormatStruct
- type FormatStructTitle
- type Item
- type ItemSentence
- type ItemTitle
- type Language
- type Law
- type LawBody
- type LawTitle
- type LawType
- type Line
- type List
- type ListSentence
- type MainProvision
- type MixedContent
- type NewProvision
- type Note
- type NoteStruct
- type NoteStructTitle
- type Paragraph
- type ParagraphCaption
- type ParagraphNum
- type ParagraphSentence
- type Part
- type PartTitle
- type Preamble
- type QuoteStruct
- type RelatedArticleNum
- type Remarks
- type RemarksLabel
- type Rt
- type Ruby
- type RubyNode
- type Section
- type SectionTitle
- type Sentence
- type SentenceImproved
- type SentenceV2
- type Style
- type StyleStruct
- type StyleStructTitle
- type Sub
- type Subitem1
- type Subitem10
- type Subitem10Sentence
- type Subitem10Title
- type Subitem1Sentence
- type Subitem1Title
- type Subitem2
- type Subitem2Sentence
- type Subitem2Title
- type Subitem3
- type Subitem3Sentence
- type Subitem3Title
- type Subitem4
- type Subitem4Sentence
- type Subitem4Title
- type Subitem5
- type Subitem5Sentence
- type Subitem5Title
- type Subitem6
- type Subitem6Sentence
- type Subitem6Title
- type Subitem7
- type Subitem7Sentence
- type Subitem7Title
- type Subitem8
- type Subitem8Sentence
- type Subitem8Title
- type Subitem9
- type Subitem9Sentence
- type Subitem9Title
- type Sublist1
- type Sublist1Sentence
- type Sublist2
- type Sublist2Sentence
- type Sublist3
- type Sublist3Sentence
- type Subsection
- type SubsectionTitle
- type Sup
- type SupplNote
- type SupplProvision
- type SupplProvisionAppdx
- type SupplProvisionAppdxStyle
- type SupplProvisionAppdxStyleTitle
- type SupplProvisionAppdxTable
- type SupplProvisionAppdxTableTitle
- type SupplProvisionLabel
- type TOC
- type TOCAppdxTableLabel
- type TOCArticle
- type TOCChapter
- type TOCDivision
- type TOCLabel
- type TOCPart
- type TOCPreambleLabel
- type TOCSection
- type TOCSubsection
- type TOCSupplProvision
- type Table
- type TableColumn
- type TableHeaderColumn
- type TableHeaderRow
- type TableRow
- type TableStruct
- type TableStructTitle
- type TextNode
- type WritingMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmendProvision ¶
type AmendProvision struct {
AmendProvisionSentence *AmendProvisionSentence `xml:"AmendProvisionSentence,omitempty"`
NewProvision []NewProvision `xml:"NewProvision,omitempty"`
}
AmendProvision represents an amendment provision
type AmendProvisionSentence ¶
type AmendProvisionSentence struct {
Sentence Sentence `xml:"Sentence"`
}
AmendProvisionSentence represents an amendment provision sentence
type Appdx ¶
type Appdx struct {
ArithFormulaNum *ArithFormulaNum `xml:"ArithFormulaNum,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
ArithFormula []ArithFormula `xml:"ArithFormula"`
Remarks *Remarks `xml:"Remarks,omitempty"`
}
Appdx represents an appendix
type AppdxFig ¶
type AppdxFig struct {
Num int `xml:"Num,attr,omitempty"`
AppdxFigTitle *AppdxFigTitle `xml:"AppdxFigTitle,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
}
AppdxFig represents an appendix figure
type AppdxFigTitle ¶
type AppdxFigTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
AppdxFigTitle represents an appendix figure title
type AppdxFormat ¶
type AppdxFormat struct {
Num int `xml:"Num,attr,omitempty"`
AppdxFormatTitle *AppdxFormatTitle `xml:"AppdxFormatTitle,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
FormatStruct []FormatStruct `xml:"FormatStruct,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
}
AppdxFormat represents an appendix format
type AppdxFormatTitle ¶
type AppdxFormatTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
AppdxFormatTitle represents an appendix format title
type AppdxNote ¶
type AppdxNote struct {
Num int `xml:"Num,attr,omitempty"`
AppdxNoteTitle *AppdxNoteTitle `xml:"AppdxNoteTitle,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
NoteStruct []NoteStruct `xml:"NoteStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
}
AppdxNote represents an appendix note
type AppdxNoteTitle ¶
type AppdxNoteTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
AppdxNoteTitle represents an appendix note title
type AppdxStyle ¶
type AppdxStyle struct {
Num int `xml:"Num,attr,omitempty"`
AppdxStyleTitle *AppdxStyleTitle `xml:"AppdxStyleTitle,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
}
AppdxStyle represents an appendix style
type AppdxStyleTitle ¶
type AppdxStyleTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
AppdxStyleTitle represents an appendix style title
type AppdxTable ¶
type AppdxTable struct {
Num int `xml:"Num,attr,omitempty"`
AppdxTableTitle *AppdxTableTitle `xml:"AppdxTableTitle,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
Item []Item `xml:"Item,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
}
AppdxTable represents an appendix table
type AppdxTableTitle ¶
type AppdxTableTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
AppdxTableTitle represents an appendix table title
type ArithFormula ¶
ArithFormula represents an arithmetic formula
type ArithFormulaNum ¶
type ArithFormulaNum struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ArithFormulaNum represents an arithmetic formula number
type Article ¶
type Article struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
ArticleCaption *ArticleCaption `xml:"ArticleCaption,omitempty"`
ArticleTitle *ArticleTitle `xml:"ArticleTitle,omitempty"`
Paragraph []Paragraph `xml:"Paragraph"`
SupplNote *SupplNote `xml:"SupplNote,omitempty"`
}
Article represents an article
type ArticleCaption ¶
type ArticleCaption struct {
CommonCaption bool `xml:"CommonCaption,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ArticleCaption represents an article caption
type ArticleRange ¶
type ArticleRange struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ArticleRange represents an article range
type ArticleTitle ¶
type ArticleTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ArticleTitle represents an article title
type Chapter ¶
type Chapter struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
ChapterTitle ChapterTitle `xml:"ChapterTitle"`
Article []Article `xml:"Article,omitempty"`
Section []Section `xml:"Section,omitempty"`
}
Chapter represents a chapter
type ChapterTitle ¶
type ChapterTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ChapterTitle represents a chapter title
type Class ¶
type Class struct {
Num string `xml:"Num,attr"`
ClassTitle *ClassTitle `xml:"ClassTitle,omitempty"`
ClassSentence ClassSentence `xml:"ClassSentence"`
Item []Item `xml:"Item,omitempty"`
}
Class represents a class
type ClassSentence ¶
type ClassSentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
Table *Table `xml:"Table,omitempty"`
}
ClassSentence represents a class sentence
type ClassTitle ¶
type ClassTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ClassTitle represents a class title
type Column ¶
type Column struct {
Num int `xml:"Num,attr,omitempty"`
LineBreak bool `xml:"LineBreak,attr,omitempty"`
Align string `xml:"Align,attr,omitempty"` // left, center, right, justify
Sentence []Sentence `xml:"Sentence"`
}
Column represents a column
type ContentNode ¶ added in v0.0.5
type ContentNode interface {
String() string // Returns plain text representation
HTML() string // Returns HTML representation with Ruby tags
IsRuby() bool // Returns true if this is a Ruby node
}
ContentNode represents a node in mixed content (text or Ruby element)
type Division ¶
type Division struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
DivisionTitle DivisionTitle `xml:"DivisionTitle"`
Article []Article `xml:"Article"`
}
Division represents a division
type DivisionTitle ¶
type DivisionTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
DivisionTitle represents a division title
type EnactStatement ¶
type EnactStatement struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
EnactStatement represents an enactment statement
type FigStruct ¶
type FigStruct struct {
FigStructTitle *FigStructTitle `xml:"FigStructTitle,omitempty"`
Fig Fig `xml:"Fig"`
Remarks []Remarks `xml:"Remarks,omitempty"`
}
FigStruct represents a figure structure
type FigStructTitle ¶
type FigStructTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
FigStructTitle represents a figure structure title
type FormatStruct ¶
type FormatStruct struct {
FormatStructTitle *FormatStructTitle `xml:"FormatStructTitle,omitempty"`
Format Format `xml:"Format"`
Remarks []Remarks `xml:"Remarks,omitempty"`
}
FormatStruct represents a format structure
type FormatStructTitle ¶
type FormatStructTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
FormatStructTitle represents a format structure title
type Item ¶
type Item struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
ItemTitle *ItemTitle `xml:"ItemTitle,omitempty"`
ItemSentence ItemSentence `xml:"ItemSentence"`
Subitem1 []Subitem1 `xml:"Subitem1,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
Item represents an item
type ItemSentence ¶
type ItemSentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
Table *Table `xml:"Table,omitempty"`
}
ItemSentence represents an item sentence
type ItemTitle ¶
type ItemTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ItemTitle represents an item title
type Law ¶
type Law struct {
XMLName xml.Name `xml:"Law"`
Era Era `xml:"Era,attr"`
Year int `xml:"Year,attr"`
Num string `xml:"Num,attr"`
PromulgateMonth int `xml:"PromulgateMonth,attr,omitempty"`
PromulgateDay int `xml:"PromulgateDay,attr,omitempty"`
LawType LawType `xml:"LawType,attr"`
Lang Language `xml:"Lang,attr"`
LawNum string `xml:"LawNum"`
LawBody LawBody `xml:"LawBody"`
}
Law represents the root element of a Japanese law document
type LawBody ¶
type LawBody struct {
Subject string `xml:"Subject,attr,omitempty"`
LawTitle *LawTitle `xml:"LawTitle,omitempty"`
EnactStatement []EnactStatement `xml:"EnactStatement,omitempty"`
TOC *TOC `xml:"TOC,omitempty"`
Preamble *Preamble `xml:"Preamble,omitempty"`
MainProvision MainProvision `xml:"MainProvision"`
SupplProvision []SupplProvision `xml:"SupplProvision,omitempty"`
AppdxTable []AppdxTable `xml:"AppdxTable,omitempty"`
AppdxNote []AppdxNote `xml:"AppdxNote,omitempty"`
AppdxStyle []AppdxStyle `xml:"AppdxStyle,omitempty"`
Appdx []Appdx `xml:"Appdx,omitempty"`
AppdxFig []AppdxFig `xml:"AppdxFig,omitempty"`
AppdxFormat []AppdxFormat `xml:"AppdxFormat,omitempty"`
}
LawBody represents the body of a law document
type LawTitle ¶
type LawTitle struct {
Kana string `xml:"Kana,attr,omitempty"`
Abbrev string `xml:"Abbrev,attr,omitempty"`
AbbrevKana string `xml:"AbbrevKana,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
LawTitle represents the title of a law
type Line ¶
type Line struct {
Style string `xml:"Style,attr,omitempty"` // dotted, double, none, solid
Content string `xml:",chardata"`
QuoteStruct []QuoteStruct `xml:"QuoteStruct,omitempty"`
ArithFormula []ArithFormula `xml:"ArithFormula,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
Line represents a line
type List ¶
type List struct {
ListSentence ListSentence `xml:"ListSentence"`
Sublist1 []Sublist1 `xml:"Sublist1,omitempty"`
}
List represents a list
type ListSentence ¶
type ListSentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
}
ListSentence represents a list sentence
type MainProvision ¶
type MainProvision struct {
Extract bool `xml:"Extract,attr,omitempty"`
Part []Part `xml:"Part,omitempty"`
Chapter []Chapter `xml:"Chapter,omitempty"`
Section []Section `xml:"Section,omitempty"`
Article []Article `xml:"Article,omitempty"`
Paragraph []Paragraph `xml:"Paragraph,omitempty"`
}
MainProvision represents the main provision
type MixedContent ¶ added in v0.0.5
type MixedContent struct {
Nodes []ContentNode
}
MixedContent holds ordered content nodes (text and Ruby elements)
func (MixedContent) HTML ¶ added in v0.0.5
func (m MixedContent) HTML() string
HTML returns the HTML representation with Ruby tags
func (MixedContent) String ¶ added in v0.0.5
func (m MixedContent) String() string
String returns the plain text representation of all nodes
func (*MixedContent) UnmarshalXML ¶ added in v0.0.5
func (m *MixedContent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements custom XML unmarshaling to preserve mixed content order
type NewProvision ¶
type NewProvision struct {
Content string `xml:",innerxml"`
LawTitle *LawTitle `xml:"LawTitle,omitempty"`
Preamble *Preamble `xml:"Preamble,omitempty"`
TOC *TOC `xml:"TOC,omitempty"`
Part []Part `xml:"Part,omitempty"`
PartTitle []PartTitle `xml:"PartTitle,omitempty"`
Chapter []Chapter `xml:"Chapter,omitempty"`
ChapterTitle []ChapterTitle `xml:"ChapterTitle,omitempty"`
Section []Section `xml:"Section,omitempty"`
SectionTitle []SectionTitle `xml:"SectionTitle,omitempty"`
Subsection []Subsection `xml:"Subsection,omitempty"`
SubsectionTitle []SubsectionTitle `xml:"SubsectionTitle,omitempty"`
Division []Division `xml:"Division,omitempty"`
DivisionTitle []DivisionTitle `xml:"DivisionTitle,omitempty"`
Article []Article `xml:"Article,omitempty"`
SupplNote []SupplNote `xml:"SupplNote,omitempty"`
Paragraph []Paragraph `xml:"Paragraph,omitempty"`
Item []Item `xml:"Item,omitempty"`
Subitem1 []Subitem1 `xml:"Subitem1,omitempty"`
Subitem2 []Subitem2 `xml:"Subitem2,omitempty"`
Subitem3 []Subitem3 `xml:"Subitem3,omitempty"`
Subitem4 []Subitem4 `xml:"Subitem4,omitempty"`
Subitem5 []Subitem5 `xml:"Subitem5,omitempty"`
Subitem6 []Subitem6 `xml:"Subitem6,omitempty"`
Subitem7 []Subitem7 `xml:"Subitem7,omitempty"`
Subitem8 []Subitem8 `xml:"Subitem8,omitempty"`
Subitem9 []Subitem9 `xml:"Subitem9,omitempty"`
Subitem10 []Subitem10 `xml:"Subitem10,omitempty"`
List []List `xml:"List,omitempty"`
Sentence []Sentence `xml:"Sentence,omitempty"`
AmendProvision []AmendProvision `xml:"AmendProvision,omitempty"`
AppdxTable []AppdxTable `xml:"AppdxTable,omitempty"`
AppdxNote []AppdxNote `xml:"AppdxNote,omitempty"`
AppdxStyle []AppdxStyle `xml:"AppdxStyle,omitempty"`
Appdx []Appdx `xml:"Appdx,omitempty"`
AppdxFig []AppdxFig `xml:"AppdxFig,omitempty"`
AppdxFormat []AppdxFormat `xml:"AppdxFormat,omitempty"`
SupplProvisionAppdxStyle []SupplProvisionAppdxStyle `xml:"SupplProvisionAppdxStyle,omitempty"`
SupplProvisionAppdxTable []SupplProvisionAppdxTable `xml:"SupplProvisionAppdxTable,omitempty"`
SupplProvisionAppdx []SupplProvisionAppdx `xml:"SupplProvisionAppdx,omitempty"`
TableStruct *TableStruct `xml:"TableStruct,omitempty"`
TableRow []TableRow `xml:"TableRow,omitempty"`
TableColumn []TableColumn `xml:"TableColumn,omitempty"`
FigStruct *FigStruct `xml:"FigStruct,omitempty"`
NoteStruct *NoteStruct `xml:"NoteStruct,omitempty"`
StyleStruct *StyleStruct `xml:"StyleStruct,omitempty"`
FormatStruct *FormatStruct `xml:"FormatStruct,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
LawBody *LawBody `xml:"LawBody,omitempty"`
}
NewProvision represents a new provision
type NoteStruct ¶
type NoteStruct struct {
NoteStructTitle *NoteStructTitle `xml:"NoteStructTitle,omitempty"`
Note Note `xml:"Note"`
Remarks []Remarks `xml:"Remarks,omitempty"`
}
NoteStruct represents a note structure
type NoteStructTitle ¶
type NoteStructTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
NoteStructTitle represents a note structure title
type Paragraph ¶
type Paragraph struct {
Num int `xml:"Num,attr"`
OldStyle bool `xml:"OldStyle,attr,omitempty"`
OldNum bool `xml:"OldNum,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
ParagraphCaption *ParagraphCaption `xml:"ParagraphCaption,omitempty"`
ParagraphNum ParagraphNum `xml:"ParagraphNum"`
ParagraphSentence ParagraphSentence `xml:"ParagraphSentence"`
AmendProvision []AmendProvision `xml:"AmendProvision,omitempty"`
Class []Class `xml:"Class,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
Item []Item `xml:"Item,omitempty"`
List []List `xml:"List,omitempty"`
}
Paragraph represents a paragraph
type ParagraphCaption ¶
type ParagraphCaption struct {
CommonCaption bool `xml:"CommonCaption,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ParagraphCaption represents a paragraph caption
type ParagraphNum ¶
type ParagraphNum struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
ParagraphNum represents a paragraph number
type ParagraphSentence ¶
type ParagraphSentence struct {
Sentence []Sentence `xml:"Sentence"`
}
ParagraphSentence represents paragraph sentences
type Part ¶
type Part struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
PartTitle PartTitle `xml:"PartTitle"`
Article []Article `xml:"Article,omitempty"`
Chapter []Chapter `xml:"Chapter,omitempty"`
}
Part represents a part in the law structure
type PartTitle ¶
type PartTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
PartTitle represents a part title
type Preamble ¶
type Preamble struct {
Paragraph []Paragraph `xml:"Paragraph"`
}
Preamble represents the preamble section
type QuoteStruct ¶
type QuoteStruct struct {
Content string `xml:",innerxml"`
}
QuoteStruct represents a quote structure
type RelatedArticleNum ¶
type RelatedArticleNum struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
RelatedArticleNum represents a related article number
type Remarks ¶
type Remarks struct {
RemarksLabel RemarksLabel `xml:"RemarksLabel"`
Item []Item `xml:"Item,omitempty"`
Sentence []Sentence `xml:"Sentence,omitempty"`
}
Remarks represents remarks
type RemarksLabel ¶
type RemarksLabel struct {
LineBreak bool `xml:"LineBreak,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
RemarksLabel represents a remarks label
type RubyNode ¶ added in v0.0.5
type RubyNode struct {
Base string // The base text (e.g., "較")
Rt []string // The ruby text annotations (e.g., ["こう"])
}
RubyNode represents a Ruby annotation in mixed content
type Section ¶
type Section struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
SectionTitle SectionTitle `xml:"SectionTitle"`
Article []Article `xml:"Article,omitempty"`
Subsection []Subsection `xml:"Subsection,omitempty"`
Division []Division `xml:"Division,omitempty"`
}
Section represents a section
type SectionTitle ¶
type SectionTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SectionTitle represents a section title
type Sentence ¶
type Sentence struct {
Num int `xml:"Num,attr,omitempty"`
Function string `xml:"Function,attr,omitempty"` // main or proviso
Indent string `xml:"Indent,attr,omitempty"`
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string // Plain text content (backward compatibility)
Line []Line `xml:"Line,omitempty"`
QuoteStruct []QuoteStruct `xml:"QuoteStruct,omitempty"`
ArithFormula []ArithFormula `xml:"ArithFormula,omitempty"`
Ruby []Ruby // Ruby elements (backward compatibility)
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
MixedContent MixedContent // The properly ordered mixed content
}
Sentence represents a sentence NOTE: This type now uses custom XML unmarshaling to properly handle mixed content with inline Ruby elements
func (*Sentence) HTML ¶ added in v0.0.5
HTML returns the HTML representation with properly positioned Ruby tags
func (*Sentence) UnmarshalXML ¶ added in v0.0.5
UnmarshalXML implements custom unmarshaling to handle mixed content
type SentenceImproved ¶ added in v0.0.5
type SentenceImproved struct {
Num int `xml:"Num,attr,omitempty"`
Function string `xml:"Function,attr,omitempty"` // main or proviso
Indent string `xml:"Indent,attr,omitempty"`
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string // Plain text content for backward compatibility
Line []Line `xml:"Line,omitempty"`
QuoteStruct []QuoteStruct `xml:"QuoteStruct,omitempty"`
ArithFormula []ArithFormula `xml:"ArithFormula,omitempty"`
Ruby []Ruby // Ruby elements for backward compatibility
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
MixedContent MixedContent // The properly parsed mixed content
}
SentenceImproved is an improved version of Sentence that handles mixed content properly while maintaining backward compatibility
func (*SentenceImproved) GetContent ¶ added in v0.0.5
func (s *SentenceImproved) GetContent() string
GetContent returns the plain text content (for backward compatibility)
func (*SentenceImproved) GetRubyHTML ¶ added in v0.0.5
func (s *SentenceImproved) GetRubyHTML() string
GetRubyHTML returns HTML with Ruby annotations
func (*SentenceImproved) HTML ¶ added in v0.0.5
func (s *SentenceImproved) HTML() string
HTML returns the HTML representation with Ruby tags
func (*SentenceImproved) String ¶ added in v0.0.5
func (s *SentenceImproved) String() string
String returns the plain text content
func (*SentenceImproved) UnmarshalXML ¶ added in v0.0.5
func (s *SentenceImproved) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements custom unmarshaling to handle mixed content while maintaining backward compatibility
type SentenceV2 ¶ added in v0.0.5
type SentenceV2 struct {
Num int `xml:"Num,attr,omitempty"`
Function string `xml:"Function,attr,omitempty"`
Indent string `xml:"Indent,attr,omitempty"`
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
MixedContent MixedContent // Custom unmarshaling for mixed content
}
SentenceV2 is an improved version of Sentence that properly handles mixed content
func (*SentenceV2) HTML ¶ added in v0.0.5
func (s *SentenceV2) HTML() string
HTML returns the HTML representation with Ruby tags
func (*SentenceV2) String ¶ added in v0.0.5
func (s *SentenceV2) String() string
String returns the plain text content
func (*SentenceV2) UnmarshalXML ¶ added in v0.0.5
func (s *SentenceV2) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements custom unmarshaling for SentenceV2
type StyleStruct ¶
type StyleStruct struct {
StyleStructTitle *StyleStructTitle `xml:"StyleStructTitle,omitempty"`
Style Style `xml:"Style"`
Remarks []Remarks `xml:"Remarks,omitempty"`
}
StyleStruct represents a style structure
type StyleStructTitle ¶
type StyleStructTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
StyleStructTitle represents a style structure title
type Subitem1 ¶
type Subitem1 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem1Title *Subitem1Title `xml:"Subitem1Title,omitempty"`
Subitem1Sentence Subitem1Sentence `xml:"Subitem1Sentence"`
Subitem2 []Subitem2 `xml:"Subitem2,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
Subitem1 through Subitem10 represent nested subitems
type Subitem10 ¶
type Subitem10 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem10Title *Subitem10Title `xml:"Subitem10Title,omitempty"`
Subitem10Sentence Subitem10Sentence `xml:"Subitem10Sentence"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem10Sentence ¶
type Subitem10Title ¶
type Subitem1Sentence ¶
type Subitem1Title ¶
type Subitem2 ¶
type Subitem2 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem2Title *Subitem2Title `xml:"Subitem2Title,omitempty"`
Subitem2Sentence Subitem2Sentence `xml:"Subitem2Sentence"`
Subitem3 []Subitem3 `xml:"Subitem3,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem2Sentence ¶
type Subitem2Title ¶
type Subitem3 ¶
type Subitem3 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem3Title *Subitem3Title `xml:"Subitem3Title,omitempty"`
Subitem3Sentence Subitem3Sentence `xml:"Subitem3Sentence"`
Subitem4 []Subitem4 `xml:"Subitem4,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem3Sentence ¶
type Subitem3Title ¶
type Subitem4 ¶
type Subitem4 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem4Title *Subitem4Title `xml:"Subitem4Title,omitempty"`
Subitem4Sentence Subitem4Sentence `xml:"Subitem4Sentence"`
Subitem5 []Subitem5 `xml:"Subitem5,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem4Sentence ¶
type Subitem4Title ¶
type Subitem5 ¶
type Subitem5 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem5Title *Subitem5Title `xml:"Subitem5Title,omitempty"`
Subitem5Sentence Subitem5Sentence `xml:"Subitem5Sentence"`
Subitem6 []Subitem6 `xml:"Subitem6,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem5Sentence ¶
type Subitem5Title ¶
type Subitem6 ¶
type Subitem6 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem6Title *Subitem6Title `xml:"Subitem6Title,omitempty"`
Subitem6Sentence Subitem6Sentence `xml:"Subitem6Sentence"`
Subitem7 []Subitem7 `xml:"Subitem7,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem6Sentence ¶
type Subitem6Title ¶
type Subitem7 ¶
type Subitem7 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem7Title *Subitem7Title `xml:"Subitem7Title,omitempty"`
Subitem7Sentence Subitem7Sentence `xml:"Subitem7Sentence"`
Subitem8 []Subitem8 `xml:"Subitem8,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem7Sentence ¶
type Subitem7Title ¶
type Subitem8 ¶
type Subitem8 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem8Title *Subitem8Title `xml:"Subitem8Title,omitempty"`
Subitem8Sentence Subitem8Sentence `xml:"Subitem8Sentence"`
Subitem9 []Subitem9 `xml:"Subitem9,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem8Sentence ¶
type Subitem8Title ¶
type Subitem9 ¶
type Subitem9 struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
Subitem9Title *Subitem9Title `xml:"Subitem9Title,omitempty"`
Subitem9Sentence Subitem9Sentence `xml:"Subitem9Sentence"`
Subitem10 []Subitem10 `xml:"Subitem10,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
List []List `xml:"List,omitempty"`
}
type Subitem9Sentence ¶
type Subitem9Title ¶
type Sublist1 ¶
type Sublist1 struct {
Sublist1Sentence Sublist1Sentence `xml:"Sublist1Sentence"`
Sublist2 []Sublist2 `xml:"Sublist2,omitempty"`
}
Sublist1 represents a first-level sublist
type Sublist1Sentence ¶
type Sublist1Sentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
}
Sublist1Sentence represents a first-level sublist sentence
type Sublist2 ¶
type Sublist2 struct {
Sublist2Sentence Sublist2Sentence `xml:"Sublist2Sentence"`
Sublist3 []Sublist3 `xml:"Sublist3,omitempty"`
}
Sublist2 represents a second-level sublist
type Sublist2Sentence ¶
type Sublist2Sentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
}
Sublist2Sentence represents a second-level sublist sentence
type Sublist3 ¶
type Sublist3 struct {
Sublist3Sentence Sublist3Sentence `xml:"Sublist3Sentence"`
}
Sublist3 represents a third-level sublist
type Sublist3Sentence ¶
type Sublist3Sentence struct {
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
}
Sublist3Sentence represents a third-level sublist sentence
type Subsection ¶
type Subsection struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
Hide bool `xml:"Hide,attr,omitempty"`
SubsectionTitle SubsectionTitle `xml:"SubsectionTitle"`
Article []Article `xml:"Article,omitempty"`
Division []Division `xml:"Division,omitempty"`
}
Subsection represents a subsection
type SubsectionTitle ¶
type SubsectionTitle struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SubsectionTitle represents a subsection title
type SupplNote ¶
type SupplNote struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SupplNote represents a supplementary note
type SupplProvision ¶
type SupplProvision struct {
Type string `xml:"Type,attr,omitempty"` // New or Amend
AmendLawNum string `xml:"AmendLawNum,attr,omitempty"`
Extract bool `xml:"Extract,attr,omitempty"`
SupplProvisionLabel SupplProvisionLabel `xml:"SupplProvisionLabel"`
Chapter []Chapter `xml:"Chapter,omitempty"`
Article []Article `xml:"Article,omitempty"`
Paragraph []Paragraph `xml:"Paragraph,omitempty"`
SupplProvisionAppdxTable []SupplProvisionAppdxTable `xml:"SupplProvisionAppdxTable,omitempty"`
SupplProvisionAppdxStyle []SupplProvisionAppdxStyle `xml:"SupplProvisionAppdxStyle,omitempty"`
SupplProvisionAppdx []SupplProvisionAppdx `xml:"SupplProvisionAppdx,omitempty"`
}
SupplProvision represents supplementary provisions
type SupplProvisionAppdx ¶
type SupplProvisionAppdx struct {
Num int `xml:"Num,attr,omitempty"`
ArithFormulaNum *ArithFormulaNum `xml:"ArithFormulaNum,omitempty"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
ArithFormula []ArithFormula `xml:"ArithFormula"`
}
SupplProvisionAppdx represents supplementary provision appendix
type SupplProvisionAppdxStyle ¶
type SupplProvisionAppdxStyle struct {
Num int `xml:"Num,attr,omitempty"`
SupplProvisionAppdxStyleTitle SupplProvisionAppdxStyleTitle `xml:"SupplProvisionAppdxStyleTitle"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
StyleStruct []StyleStruct `xml:"StyleStruct,omitempty"`
}
SupplProvisionAppdxStyle represents supplementary provision appendix style
type SupplProvisionAppdxStyleTitle ¶
type SupplProvisionAppdxStyleTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SupplProvisionAppdxStyleTitle represents title for supplementary provision appendix style
type SupplProvisionAppdxTable ¶
type SupplProvisionAppdxTable struct {
Num int `xml:"Num,attr,omitempty"`
SupplProvisionAppdxTableTitle SupplProvisionAppdxTableTitle `xml:"SupplProvisionAppdxTableTitle"`
RelatedArticleNum *RelatedArticleNum `xml:"RelatedArticleNum,omitempty"`
TableStruct []TableStruct `xml:"TableStruct,omitempty"`
}
SupplProvisionAppdxTable represents supplementary provision appendix table
type SupplProvisionAppdxTableTitle ¶
type SupplProvisionAppdxTableTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SupplProvisionAppdxTableTitle represents title for supplementary provision appendix table
type SupplProvisionLabel ¶
type SupplProvisionLabel struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
SupplProvisionLabel represents a supplementary provision label
type TOC ¶
type TOC struct {
TOCLabel *TOCLabel `xml:"TOCLabel,omitempty"`
TOCPreambleLabel *TOCPreambleLabel `xml:"TOCPreambleLabel,omitempty"`
TOCPart []TOCPart `xml:"TOCPart,omitempty"`
TOCChapter []TOCChapter `xml:"TOCChapter,omitempty"`
TOCSection []TOCSection `xml:"TOCSection,omitempty"`
TOCArticle []TOCArticle `xml:"TOCArticle,omitempty"`
TOCSupplProvision *TOCSupplProvision `xml:"TOCSupplProvision,omitempty"`
TOCAppdxTableLabel []TOCAppdxTableLabel `xml:"TOCAppdxTableLabel,omitempty"`
}
TOC represents the table of contents
type TOCAppdxTableLabel ¶
type TOCAppdxTableLabel struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
TOCAppdxTableLabel represents an appendix table label in TOC
type TOCArticle ¶
type TOCArticle struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
ArticleTitle ArticleTitle `xml:"ArticleTitle"`
ArticleCaption ArticleCaption `xml:"ArticleCaption"`
}
TOCArticle represents an article in the table of contents
type TOCChapter ¶
type TOCChapter struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
ChapterTitle ChapterTitle `xml:"ChapterTitle"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
TOCSection []TOCSection `xml:"TOCSection,omitempty"`
}
TOCChapter represents a chapter in the table of contents
type TOCDivision ¶
type TOCDivision struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
DivisionTitle DivisionTitle `xml:"DivisionTitle"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
}
TOCDivision represents a division in the table of contents
type TOCLabel ¶
type TOCLabel struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
TOCLabel represents a TOC label
type TOCPart ¶
type TOCPart struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
PartTitle PartTitle `xml:"PartTitle"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
TOCChapter []TOCChapter `xml:"TOCChapter,omitempty"`
}
TOCPart represents a part in the table of contents
type TOCPreambleLabel ¶
type TOCPreambleLabel struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
TOCPreambleLabel represents a TOC preamble label
type TOCSection ¶
type TOCSection struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
SectionTitle SectionTitle `xml:"SectionTitle"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
TOCSubsection []TOCSubsection `xml:"TOCSubsection,omitempty"`
TOCDivision []TOCDivision `xml:"TOCDivision,omitempty"`
}
TOCSection represents a section in the table of contents
type TOCSubsection ¶
type TOCSubsection struct {
Num string `xml:"Num,attr"`
Delete bool `xml:"Delete,attr,omitempty"`
SubsectionTitle SubsectionTitle `xml:"SubsectionTitle"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
TOCDivision []TOCDivision `xml:"TOCDivision,omitempty"`
}
TOCSubsection represents a subsection in the table of contents
type TOCSupplProvision ¶
type TOCSupplProvision struct {
SupplProvisionLabel SupplProvisionLabel `xml:"SupplProvisionLabel"`
ArticleRange *ArticleRange `xml:"ArticleRange,omitempty"`
TOCArticle []TOCArticle `xml:"TOCArticle,omitempty"`
TOCChapter []TOCChapter `xml:"TOCChapter,omitempty"`
}
TOCSupplProvision represents supplementary provisions in TOC
type Table ¶
type Table struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
TableHeaderRow []TableHeaderRow `xml:"TableHeaderRow,omitempty"`
TableRow []TableRow `xml:"TableRow"`
}
Table represents a table
type TableColumn ¶
type TableColumn struct {
BorderTop string `xml:"BorderTop,attr,omitempty"` // solid, none, dotted, double
BorderBottom string `xml:"BorderBottom,attr,omitempty"` // solid, none, dotted, double
BorderLeft string `xml:"BorderLeft,attr,omitempty"` // solid, none, dotted, double
BorderRight string `xml:"BorderRight,attr,omitempty"` // solid, none, dotted, double
Rowspan string `xml:"rowspan,attr,omitempty"`
Colspan string `xml:"colspan,attr,omitempty"`
Align string `xml:"Align,attr,omitempty"` // left, center, right, justify
Valign string `xml:"Valign,attr,omitempty"` // top, middle, bottom
Part []Part `xml:"Part,omitempty"`
Chapter []Chapter `xml:"Chapter,omitempty"`
Section []Section `xml:"Section,omitempty"`
Subsection []Subsection `xml:"Subsection,omitempty"`
Division []Division `xml:"Division,omitempty"`
Article []Article `xml:"Article,omitempty"`
Paragraph []Paragraph `xml:"Paragraph,omitempty"`
Item []Item `xml:"Item,omitempty"`
Subitem1 []Subitem1 `xml:"Subitem1,omitempty"`
Subitem2 []Subitem2 `xml:"Subitem2,omitempty"`
Subitem3 []Subitem3 `xml:"Subitem3,omitempty"`
Subitem4 []Subitem4 `xml:"Subitem4,omitempty"`
Subitem5 []Subitem5 `xml:"Subitem5,omitempty"`
Subitem6 []Subitem6 `xml:"Subitem6,omitempty"`
Subitem7 []Subitem7 `xml:"Subitem7,omitempty"`
Subitem8 []Subitem8 `xml:"Subitem8,omitempty"`
Subitem9 []Subitem9 `xml:"Subitem9,omitempty"`
Subitem10 []Subitem10 `xml:"Subitem10,omitempty"`
FigStruct []FigStruct `xml:"FigStruct,omitempty"`
Remarks *Remarks `xml:"Remarks,omitempty"`
Sentence []Sentence `xml:"Sentence,omitempty"`
Column []Column `xml:"Column,omitempty"`
}
TableColumn represents a table column
type TableHeaderColumn ¶
type TableHeaderColumn struct {
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
TableHeaderColumn represents a table header column
type TableHeaderRow ¶
type TableHeaderRow struct {
TableHeaderColumn []TableHeaderColumn `xml:"TableHeaderColumn"`
}
TableHeaderRow represents a table header row
type TableRow ¶
type TableRow struct {
TableColumn []TableColumn `xml:"TableColumn"`
}
TableRow represents a table row
type TableStruct ¶
type TableStruct struct {
TableStructTitle *TableStructTitle `xml:"TableStructTitle,omitempty"`
Table Table `xml:"Table"`
Remarks []Remarks `xml:"Remarks,omitempty"`
}
TableStruct represents a table structure
type TableStructTitle ¶
type TableStructTitle struct {
WritingMode WritingMode `xml:"WritingMode,attr,omitempty"`
Content string `xml:",chardata"`
Line []Line `xml:"Line,omitempty"`
Ruby []Ruby `xml:"Ruby,omitempty"`
Sup []Sup `xml:"Sup,omitempty"`
Sub []Sub `xml:"Sub,omitempty"`
}
TableStructTitle represents a table structure title
type TextNode ¶ added in v0.0.5
type TextNode struct {
Text string
}
TextNode represents plain text in mixed content
type WritingMode ¶
type WritingMode string
WritingMode represents text direction
const ( WritingModeVertical WritingMode = "vertical" WritingModeHorizontal WritingMode = "horizontal" )