Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使我的 RNG 文件更详细,以便如果我未能指定所需的选择元素,错误消息将得到更好的描述,而不仅仅是:
Expected an element , got nothing
有没有办法命名选择标签?
RelaxNG 没有根据这些条件定义人类可读错误文本的系统。正如@daxim 所暗示的那样,是否能够注意到未能满足所需的选择元素将取决于运行验证的软件。
一种可能的解决方案是使用 Schematron,它旨在为此类测试输出特定消息。