NLdoc.Conversion.Reader.Docx.Files.Styles (NLdoc.Conversion.Reader.Docx v1.1.2)
View SourceThis module parses the styles (e.g. word/styles.xml
) files in a Docx document
into a map mapping style IDs to NLdoc.Conversion.Reader.Docx.AST.Style
structs.
Summary
Functions
Get a style by its ID from a parsed map of styles.
Parses the styles from a word/styles.xml
file into a map mapping style IDs to NLdoc.Conversion.Reader.Docx.AST.Style
structs.
Reads a (list of) Docx styles.xml file(s) at the given path(s) and parses it/them into a single map
of all the styles., as returned by parse/1
.
Types
@type t() :: %{ required(style_id :: String.t()) => style :: NLdoc.Conversion.Reader.Docx.AST.Style.t() }
Functions
@spec get(t(), id :: String.t(), default :: default) :: NLdoc.Conversion.Reader.Docx.AST.Style.t() | default when default: var
Get a style by its ID from a parsed map of styles.
@spec parse(Saxy.XML.element()) :: t()
Parses the styles from a word/styles.xml
file into a map mapping style IDs to NLdoc.Conversion.Reader.Docx.AST.Style
structs.
Reads a (list of) Docx styles.xml file(s) at the given path(s) and parses it/them into a single map
of all the styles., as returned by parse/1
.