A lightweight Python+lxml implementation of xsltproc with limited features
Project description
xsltproc-py-lite
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b660ae073abce0a7f31ca738729a3c143e68799ffc9b4021d5806a51056840
|
|
| MD5 |
22d34b38829893f1ce44163de394cf0d
|
|
| BLAKE2b-256 |
b74c90bb154170d2e5cb0415bedae5b2d22aca7296d83e8ae8d34b4b60fe39c6
|
File details
Details for the file xsltproc_py_lite-0.1.2-py3-none-any.whl.
File metadata
- Download URL: xsltproc_py_lite-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
777cc89afaff74a8fcdbb741f914c2d80c059c03b2c0e5bcc11c555a4c734380
|
|
| MD5 |
4841c4f2a0a17a5a35e84d6a43a98a48
|
|
| BLAKE2b-256 |
93ba360331170e10b7505c5099e87630c70860eb6295e8d9d9d8c6cb13f801de
|