Documentation
¶
Overview ¶
Package commandsxml reads the commands.xml file.
Index ¶
- type Attribute
- type Childelement
- type Choice
- type Command
- func (c *Command) Adoclink() string
- func (c *Command) Attributes() []*Attribute
- func (c *Command) Childelements() []*Command
- func (c *Command) CmdLink() string
- func (c *Command) DescriptionAdoc(lang string) string
- func (c *Command) DescriptionHTML(lang string) template.HTML
- func (c *Command) DescriptionText(lang string) string
- func (c *Command) ExampleAdoc(lang string) string
- func (c *Command) ExampleHTML(lang string) template.HTML
- func (c *Command) Htmllink() string
- func (c *Command) InfoAdoc(lang string) string
- func (c *Command) InfoHTML(lang string) template.HTML
- func (c *Command) Parents(lang string) []*Command
- func (c *Command) RemarkAdoc(lang string) string
- func (c *Command) RemarkHTML(lang string) template.HTML
- func (c *Command) SeealsoAdoc(lang string) string
- func (c *Command) SeealsoHTML(lang string) template.HTML
- func (c *Command) String() string
- func (c *Command) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
- type Commands
- type SchematronRules
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct {
Choice []*Choice
Name string
CSS string
Since string
Type string
Optional bool
AllowXPath bool
// contains filtered or unexported fields
}
Attribute has all information about each attribute
func (*Attribute) Attlink ¶
Attlink returns a string in the form of cmd-commandname-attribute e.g. cmd-setvariable-select
func (*Attribute) DescriptionAdoc ¶
DescriptionAdoc returns the description of the attribute as an asciidoctor blob.
func (*Attribute) DescriptionHTML ¶
DescriptionHTML returns the the attribute description as an HTML blob.
func (*Attribute) DescriptionText ¶
DescriptionText returns the description of the attribute without markup.
func (*Attribute) UnmarshalXML ¶
UnmarshalXML fills the attribute from the given XML segment
type Childelement ¶
type Childelement struct {
Text []byte `xml:",innerxml"`
// contains filtered or unexported fields
}
Childelement has all child elements of a command.
type Choice ¶
type Choice struct {
Text []byte `xml:",innerxml"`
Name string `xml:"en,attr"`
// contains filtered or unexported fields
}
Choice represents alternative attribute values
func (*Choice) DescriptionText ¶
DescriptionText returns the description of the attribute without markup.
func (*Choice) UnmarshalXML ¶
UnmarshalXML fills the Choice value
type Command ¶
type Command struct {
Attr []*Attribute
Name string
CSS string
Since string
Deprecated bool
Rules []SchematronRules `xml:"rules"`
// contains filtered or unexported fields
}
Command has information about a command
func (*Command) Attributes ¶
Attributes returns all attributes for the command
func (*Command) Childelements ¶
Childelements returns a list of commands that are allowed within this command.
func (*Command) DescriptionAdoc ¶
DescriptionAdoc returns the description of the command as a asciidoctor blob.
func (*Command) DescriptionHTML ¶
DescriptionHTML returns the description as a HTML blob
func (*Command) DescriptionText ¶
DescriptionText returns the description as text.
func (*Command) ExampleAdoc ¶
ExampleAdoc returns the examples section as an asciidoctor blob.
func (*Command) ExampleHTML ¶
ExampleHTML returns the examples section as a HTML blob
func (*Command) RemarkAdoc ¶
RemarkAdoc retuns the remark section as a formatted asciidoctor blob.
func (*Command) RemarkHTML ¶
RemarkHTML returns the remark section as a formatted HTML blob.
func (*Command) SeealsoAdoc ¶
SeealsoAdoc returns the see also section as an asciidoctor blob
func (*Command) SeealsoHTML ¶
SeealsoHTML retuns the see also section as a HTML blob
func (*Command) UnmarshalXML ¶
UnmarshalXML fills the command from the XML segment
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
Commands is the root structure of all Commands
func LoadCommandsFile ¶
LoadCommandsFile opens the doc/commands.xml/commands.xml in the given base dir
func ReadCommandsFile ¶
ReadCommandsFile reads from the reader. It must be in the format of a commands file.
func (*Commands) Command ¶
Command returns a Command structure for the command named in commandname.
func (*Commands) GetDefineText ¶
GetDefineText retuns the byte value of a define section in the commands xml
type SchematronRules ¶
SchematronRules represents schematron rules