Documentation
¶
Overview ¶
Package commandsxml reads the commands.xml file.
Index ¶
- type Attribute
- type Childelement
- type Choice
- type Command
- func (c *Command) Attributes() []*Attribute
- func (c *Command) Childelements() []*Command
- func (c *Command) CmdLink() string
- func (c *Command) DescriptionMarkdown() string
- func (c *Command) DescriptionText(lang string) string
- func (c *Command) ExampleMarkdown() string
- func (c *Command) Htmllink() string
- func (c *Command) InfoMarkdown() string
- func (c *Command) MDlink() string
- func (c *Command) Parents() []*Command
- func (c *Command) RemarkMarkdown() string
- 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
Pro 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) DescriptionMarkdown ¶ added in v0.0.2
DescriptionMarkdown returns the description of the attribute as an asciidoctor 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"`
Pro bool
// 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
Pro bool
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) DescriptionMarkdown ¶ added in v0.0.2
DescriptionMarkdown returns the description of the command as a asciidoctor blob.
func (*Command) DescriptionText ¶
DescriptionText returns the description as text.
func (*Command) ExampleMarkdown ¶ added in v0.0.2
ExampleMarkdown returns the examples section as an markdown blob.
func (*Command) InfoMarkdown ¶ added in v0.0.2
InfoMarkdown returns the info section as a asciidoctor blob.
func (*Command) RemarkMarkdown ¶ added in v0.0.2
RemarkMarkdown returns the remark section as a formatted asciidoctor 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 returns the byte value of a define section in the commands xml
type SchematronRules ¶
SchematronRules represents schematron rules