简体   繁体   English

如何使用 SaxonJ-HE 11(Saxon 11 Home Edition for Java)根据其 XSD 模式验证 XML 文档

[英]How to validate XML document against its XSD schema using SaxonJ-HE 11 (Saxon 11 Home Edition for Java)

I am looking at Product Description for SaxonJ-HE (Home Edition) pdf document and on page 4, section " Interfaces and APIs " it says:我正在查看SaxonJ-HE(家庭版)pdf 文档的产品说明,在第 4 页的“接口和 API ”部分中它说:

13. JAXP API
Implementations of the standard JAXP interfaces for XSLT transformation, XPath evaluation, and XML Schema validation.

在此处输入图像描述

Does that mean I can validate XML message against XSD schema using API included in Home Edition?这是否意味着我可以使用家庭版中包含的 API 针对 XSD 模式验证 XML 消息? Does anyone know how?有谁知道怎么做?

No, I'm sorry, that's misleading and I'll get it fixed.不,我很抱歉,这是误导,我会修复它。

While the JAXP and s9api APIs allow you to request schema validation, Saxon-HE does not include a schema validator so the request will fail.虽然 JAXP 和 s9api API 允许您请求模式验证,但 Saxon-HE 不包含模式验证器,因此请求将失败。

You can of course use the Xerces schema validator which is open source, but it doesn't integrate with Saxon.您当然可以使用开源的 Xerces 模式验证器,但它不与 Saxon 集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM