Skip to main content

A lightweight Python+lxml implementation of xsltproc with limited features

Project description

xsltproc-py-lite

PyPI version Python versions License: MIT

A lightweight Python reimplementation of xsltproc, supporting basic XSLT 1.0 transformations using lxml.

🔗 View on PyPI
🔗 GitHub Repository


✨ Features

  • Apply XSLT 1.0 stylesheets to XML documents
  • Outputs to file or standard output
  • Zero-dependency CLI (except lxml)
  • Simple and familiar xsltproc-like usage

📦 Installation

You can install this package from PyPI:

pip install xsltproc-py-lite

🚀 Usage

xsltproc-py stylesheet.xsl input.xml -o output.xml

Arguments

Option Description
stylesheet.xsl Path to the XSLT file
input.xml Path to the input XML file
-o output.xml Output file path (default: stdout)

🛠 Example

Given:

example.xsl

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <hello>World</hello>
  </xsl:template>
</xsl:stylesheet>

input.xml

<root/>

Run:

xsltproc-py example.xsl input.xml -o result.xml

Output:

<hello>World</hello>

⚠ Limitations

  • XSLT 1.0 only
  • Does not support parameters (e.g., --stringparam)
  • No support for chunking, profiling, or extensions

📄 License

This project is licensed under the MIT License.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xsltproc_py_lite-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xsltproc_py_lite-0.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file xsltproc_py_lite-0.1.2.tar.gz.

File metadata

  • Download URL: xsltproc_py_lite-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for xsltproc_py_lite-0.1.2.tar.gz
Algorithm Hash digest
SHA256 46b660ae073abce0a7f31ca738729a3c143e68799ffc9b4021d5806a51056840
MD5 22d34b38829893f1ce44163de394cf0d
BLAKE2b-256 b74c90bb154170d2e5cb0415bedae5b2d22aca7296d83e8ae8d34b4b60fe39c6

See more details on using hashes here.

File details

Details for the file xsltproc_py_lite-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for xsltproc_py_lite-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 777cc89afaff74a8fcdbb741f914c2d80c059c03b2c0e5bcc11c555a4c734380
MD5 4841c4f2a0a17a5a35e84d6a43a98a48
BLAKE2b-256 93ba360331170e10b7505c5099e87630c70860eb6295e8d9d9d8c6cb13f801de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page