纯 Python XSLT 库 [英] Pure Python XSLT library

查看:35
本文介绍了纯 Python XSLT 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有纯 Python 的 XSLT 库?

Is there an XSLT library that is pure Python?

在我需要支持的一些平台上安装 libxml2+libxslt 或任何类似的 C 库是一个问题.

Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support.

我真的只需要基本的 XSLT 支持,速度不是主要问题.

I really only need basic XSLT support, and speed is not a major issue.

推荐答案

遗憾的是,目前没有纯 Python XSLT 处理器.如果您需要更独立于平台的东西,您可能需要使用基于 Java 的 XSLT 处理器,例如 Saxon.4Suite 正在开发纯python XPath 解析器,但看起来纯XSLT 处理器不会出现一段时间.也许最好使用 Python 的一些功能来尝试和近似现有的样式表,或者研究使用 Java 代替的可行性.

Unfortunately there are no pure-python XSLT processors at the moment. If you need something that is more platform independent, you may want to use a Java-based XSLT processor like Saxon. 4Suite is working on a pure-python XPath parser, but it doesn't look like a pure XSLT processor will be out for some time. Perhaps it would be best to use some of Python's functional capabilities to try and approximate the existing stylesheet or look into the feasibility of using Java instead.

这篇关于纯 Python XSLT 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆