How to debug lxml.etree.XSLTParseError: Invalid expression error

两盒软妹~` 提交于 2019-12-03 16:03:14
markw

Looking at the exception's properties, I see that it has an error_log, but for an xpath error (for example) the log only includes information about where within the xpath the error is, so it's not especially helpful. For the use-case I describe, having arbitrary users submitting XSLT, there's not a push-button approach. Instead, it would be probably be easiest to use a combination of schema validation and custom logic to find out where the error is and why it's an error for the purpose of reporting back to the user.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!