SkillAgentSearch skills...

Xslt

A lightweight wrapper around xsltproc for elixir

Install / Use

/learn @johnhamelink/Xslt
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Xslt

This library is a light wrapper around the xsltproc tool which allows for XSLT transformations of XML documents.

Prerequesites

The library uses xsltproc to process the documents. It comes preinstalled on OSX, and can be installed simply on debian-based linux distros with apt-get install xsltproc.

The library uses porcelain to communicate safely with xsltproc, so you should install the goon binary for the best performance.

Usage

{:ok, transformed_xml} = Xslt.transform("/path/to/template.xml", "/path/to/xml_file.xml")

Using params:

{:ok, transformed_xml} = Xslt.transform("/path/to/template.xml", "/path/to/xml_file.xml", "--stringparam var_name value")
{:ok, transformed_xml} = Xslt.transform("/path/to/template.xml", "<xml>...</xml>", "--xml-as-string")

Installation

If available in Hex, the package can be installed by adding xslt to your list of dependencies in mix.exs:

def deps do
  [{:xslt, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/xslt.

View on GitHub
GitHub Stars12
CategoryDevelopment
Updated1y ago
Forks7

Languages

Elixir

Security Score

80/100

Audited on Jun 28, 2024

No findings