1·However, the validator does require some additional metadata to be added to the syntax information and imposes some restrictions in its structure.
但是,验证器的确需要向这个语法信息添加一些额外的元数据并对其结构实施一些限制。
2·Thus far, I have discussed how to structure your XML to pave the way for using a schema validator.
到目前为止,我已经讨论了如何将 XML 格式化,以便为使用模式验证器铺平道路。
3·If you add this type of constraint at development time, the schema validator will reject the invalid data at runtime.
如果您在开发阶段加入这种类型的约束,在运行的时候模式验证器就会拒绝无效数据。
4·Doing so is not always bad, but in this case it has unwittingly kept the schema validator from helping out.
这种做法并不总是坏事,但是在本文的例子中却无意中妨碍了模式验证器的工作。
5·One useful application of this ability involves using the validator to automatically set default values for certain fields if they're not present in the POST submission.
这个功能的一个有用的应用是:如果某些字段没有出现在POST提交中,可以使用验证器自动设置这些字段的默认值。
1·During parsing, if a validator needs a new schema, it first checks to see if the grammar bucket has the compiled schema it needs.
在解析过程中,如果验证程序需要新的模式,它首先检查语法桶中是否包含需要的编译后的模式。
2·This situation isn't pretty, but a real-world validator tool needs to be aware of it.
这种情况不怎么好,但实用的验证程序工具必须能处理这种情况。
3·On the other hand, the chances are pretty good that this condition is an authoring error, like the one in Listing 1, and so the validator spits out a warning.
另一方面,这也是一个发现编辑错误的好机会,如清单1那样,因此,验证程序发出一条警告信息。
4·To deal with this, the validator USES a highly modularized RELAX ng schema for XForms, which is integrated into a highly permissive host language.
为此,验证程序使用了高度模块化的RELAX NG模式,将其集成到非常宽容的宿主语言中。
5·Thus, the first job of an XForms validator is to extricate the XForms portions out of a document.
因此,XForms 验证程序的第一项任务就是从文档中分离出 XForms 部分。