如何使用BREX数据模块检测空(How do I detect an empty with a BREX data module)
我需要确保使用XPath 1的BREX数据模块没有空<para>实例.// //para[not(text()]工作正常,除非我的所有文本都包含在<emphasis> ,显示为错误。如何添加包装文本?
I need to make sure that there are no instances of an empty <para> with my BREX data module using XPath 1. //para[not(text()] works OK unless I have all the text wrapped in <emphasis>, which shows as an error. How can I add wrapped text?
最满意答案
尝试使用node()而不是text()因为前者涵盖了您需要的文本节点和元素节点:
//para[not(node())]Try using node() instead of text() since the former covers both text nodes and element nodes as you needed :
//para[not(node())]更多推荐
发布评论