dita

package
v0.0.0-...-c13b88d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// parent <-> child
	Unordered = CollectionType("unordered")
	// parent <-> child
	// child <-> child
	Family = CollectionType("family")
	// parent <-> child
	// child <-> child + 1
	Sequence = CollectionType("sequence")
)
View Source
const (
	NormalLinking = Linking("normal")
	NoLinking     = Linking("none")
	SourceOnly    = Linking("sourceonly")
	TargetOnly    = Linking("targetonly")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName xml.Name
	Content string `xml:",innerxml"`
}

type CollectionType

type CollectionType string

type InnerXML

type InnerXML struct {
	XMLName xml.Name
	Content string `xml:",innerxml"`
}

func (*InnerXML) Text

func (x *InnerXML) Text() (string, error)
type Link struct {
	Href   string `xml:"href,attr"`
	Format string `xml:"format,attr,omitempty"`
	Scope  string `xml:"scope,attr,omitempty"`
	Text   string `xml:"linktext,omitempty"`
}

type Linking

type Linking string

func (Linking) CanLinkFrom

func (linking Linking) CanLinkFrom() bool

func (Linking) CanLinkTo

func (linking Linking) CanLinkTo() bool

type MapNode

type MapNode struct {
	XMLName xml.Name

	Title    string `xml:"title"`
	NavTitle string `xml:"navtitle,attr"`
	Href     string `xml:"href,attr"`
	Keys     string `xml:"keys,attr"`

	Type     string         `xml:"type,attr"`
	CollType CollectionType `xml:"collection-type,attr"`
	Linking  Linking        `xml:"linking,attr"`

	Format    string `xml:"format,attr"`
	TOC       string `xml:"toc,attr"`
	LockTitle string `xml:"locktitle,attr"`

	Audience       string `xml:"audience,attr"`
	Print          string `xml:"print,attr"`
	DeliveryTarget string `xml:"deliveryTarget,attr"`
	ProcessRole    string `xml:"processing-role,attr"`

	Children []*MapNode `xml:",any"`
}

MapNode represents an xml element inside a .ditamap

type OtherMeta

type OtherMeta struct {
	Name    string `xml:"name,attr"`
	Content string `xml:"content,attr"`
}

type Prolog

type Prolog struct {
	Keywords   []string    `xml:"metadata>keywords>keyword"`
	OtherMeta  []OtherMeta `xml:"metadata>othermeta"`
	ResourceID []struct {
		Name string `xml:"id,attr"`
	} `xml:"resourceid"`
}

type Topic

type Topic struct {
	XMLName   xml.Name
	ID        string   `xml:"id,attr"`
	Title     string   `xml:"title"`
	NavTitle  string   `xml:"titlealts>navtitle"`
	Prolog    Prolog   `xml:"prolog"`
	ShortDesc InnerXML `xml:"shortdesc"`

	RelatedLink []Link `xml:"related-links>link"`
	Elements    []Body `xml:",any"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL