XSLT2.0处理器用于Perl? [英] XSLT2.0 processor for Perl?

查看:69
本文介绍了XSLT2.0处理器用于Perl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于Perl的强大XSLT2.0处理器?我刚刚尝试了XML :: LibXSLT,它不支持分析字符串,正则表达式等。我担心我的工作会使用XML :: Saxon :: XSLT2,因为它使用Java,并且我不想添加到我的依赖列表中。你们使用什么库进行XSL2.0转换?

Is there any robust XSLT2.0 processor for Perl? I just tried out XML::LibXSLT and it doesn't support analyze-string, regex, etc. I'm afraid of using XML::Saxon::XSLT2 for my work cause it uses Java and I wouldn't want to add that to my list of dependencies. What library do you guys use for XSL2.0 transformations?

干杯,

推荐答案


所以您是否正在寻找用Perl编写的XSLT 2.0处理器?

So you're looking for an XSLT 2.0 processor written in Perl?

不,您绝对不是不是想要一个纯Perl XSLT处理器。结果将是极其缓慢且占用大量内存,更不用说您想要一个经过大量用户基础比在Perl中使用XSLT的人少得多的,经过大量用户基础全面测试的库。这就是为什么LibXSLT如此流行的原因,因为它是一个快速且稳定的C库,周围带有最少的Perl包装器。并且除非您使用带有断点和变量检查的GUI调试器(如Komodo),否则调试实际上并不会复杂得多。

No, you most definitely do not want a pure-Perl XSLT processor. The result would be excruciatingly slow and memory intensive, not to mention you want a library that's been thoroughly tested in the field by a much larger user base than the comparatively few people that do XSLT in Perl. That's why LibXSLT is so popular, since it's a fast and solid C library with a minimal Perl wrapper around it. And unless you're using a GUI debugger like Komodo with breakpoints and variable inspection, debugging isn't really much more complicated.

但是要回答您的问题:

But to answer your question: The only fully compliant XSLT 2.0 processor available today is Saxon, available as a fully featured commercial Java library and a stripped-down open source version – both incidentally made by the same guy who wrote the XSLT 2.0 spec (I wonder which were written first?). Given the complexity of the spec, it seems likely to remain that way for a long time.

因此,如果不希望使用Java库,也许您应该问问自己是否您确实需要完整的2.0功能列表,或者对使用其他一些缓慢而痛苦地实现 XSLT 1.5的库感到满意。

So, if using a Java library is undesirable, perhaps you should ask yourself whether you really need the complete 2.0 feature list or would be content with using some of the other libraries that slowly and painfully are underway to implementing "XSLT 1.5".

这篇关于XSLT2.0处理器用于Perl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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