Categorygithub.com/fbaube/xmlutils
modulepackage
0.0.0-20240425064631-d7c56373bd9a
Repository: https://github.com/fbaube/xmlutils.git
Documentation: pkg.go.dev

# README

package github.com/fbaube/xmlutils

Low-level XML data structures and code for processing XML mixed content.

# Functions

DoParse_xml takes a string, so we can assume that we can discard it after use cos the caller has another copy of it.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPIDSIDcatalogFileRecord is pretty self-explanatory.
No description provided by the author
NewXmlCatalogFile is a convenience function that reads in the file and then processes the file contents.
NewXmlPreambleFields parses an XML preamble, which (BTW) MUST be the first line in a file.
Peek_xml takes a string and does the minimum to find XML preamble, DOCTYPE, root element, whether DTD stuff was encountered, and the locations of outer elements containing metadata and body text.

# Variables

DitaContypes - see "type DitaContype".
DitaFlavors - see "type DitaFlavor".
DITArootElms are all the XML root elements that can be classified as DITA-type.
DITAtypeFileExtensions are all the file extensions that are automatically classified as being DITA-type.
DTDtypeFileExtensions are all the file extensions that are automatically classified as being DTD-type.
DTMTmap maps DOCTYPEs to MTypes (and: Is it LwDITA ?).
HtmlKeyContentElms is elements that often surround the actual page content.
HtmlSectioningContentElms have internal sections and subsections.
HtmlSectioningRootElms have their OWN outlines, separate from the outlines of their ancestors, i.e.
No description provided by the author
No description provided by the author
MarkdownFileExtensions are all the file extensions that are automatically classified as being Markdown-type, even tho we generally use a regex instead.
MiscFileExtensions are all the file extensions that we want to procss.
NS_OASIS_XML_CATALOG is the OASIS namespace for XML catalogs.
NS_XML is the XML namespace.
STD_PREAMBLE is "<?xml version="1.0" encoding="UTF-8"?>" + "\n".
STD_PreambleFields is our parse of variable "STD_PREAMBLE".
XML_NS_Recognized is recognized values in the "xml:" namespace.
XmlContypes note: maybe DTDmod should be DTDelms.

# Structs

No description provided by the author
ContentityBasics has Raw,Root,Text,Meta,MetaProps and is embedded in XU.AnalysisRecord.
ContypingInfo has simple fields related to typing content (i.e.
DoctypeMType maps a DOCTYPE string to an MType string and a bool, Is it LwDITA?.
No description provided by the author
NS is e.g.
One of these has to be filled in for the NS declarations at the top of a content file.
ParsedDoctype is a parse of a complete DOCTYPE declaration.
ParsedPreamble is a parse of an optional PI (processing instruction) at the start of an XML file.
No description provided by the author
PIDFPIfields holds the parsed results of a PID (PublicID) a.k.a.
PIDSIDcatalogFileRecord representa a line item from a parsed XML catalog file.
No description provided by the author
XmlCatalogFile represents a parsed XML catalog file, at the top level.
XmlPeek is called by FU.AnalyseFile(..) when preparing an FU.AnalysisRecord .

# Type aliases

DitaContype is a [Lw]DITA Topic, Map, etc.
DitaFlavor is a [Lw]DITA flavor.
Possible TODO: type XmlDoctypeFamily string The XmlDoctypeFamilies are the broad groups of DOCTYPES.
XmlContype categorizes the XML file.
XmlDoctype is just a DOCTYPE string, for example: <!DOCTYPE html>.
XmlPublicID = PID = Public ID = FPI = Formal Public Identifier.
XmlSystemID = SID = System ID = URI (Universal Resource Identifier) (can be a filepath or an HTTP address).