XMLSpy 验证器
XMLspy 使用什么 XML 验证器?我遇到了一个问题,我可以使用 Oxygen 根据架构验证 XML 文件,但当我使用 XMLSpy 时它无效!有人对此有什么总体想法吗?
多谢 :)
What XML validator does XMLspy uses? I am running into an issue that I can validate an XML file against the schema using Oxygen but yet it is not valid when I use XMLSpy! does anyone has any general thoughts regarding this?
Thanks a lot :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
XMLSpy 使用它自己的验证引擎。通常问题是相反的,即 XMLSpy 接受其他模式处理器拒绝的内容。众所周知,Altova 选择不强制执行唯一粒子归因约束。
Oxygen 可以配置为使用 Xerces 或 Saxon。两者都高度符合 W3C 规范,尽管存在一些灰色区域(例如 xs:redefines 的复杂序列),您很少会在其中获得两个处理器的一致意见。有些事情是在 W3C 规范中明确实现定义的,例如对接受日期范围的限制。
如果您需要更具体的帮助,您必须告诉我们这两个产品的架构、实例和错误消息是什么样的。
更常见的是产品之间关于模式是否有效的差异,而不是关于实例是否有效的差异。
XMLSpy uses its own validation engine. Usually the problem is the other way around, that XMLSpy accepts things which other schema processors reject. Notoriously, Altova chose not to enforce the Unique Particle Attribution constraint.
Oxygen can be configured to use either Xerces or Saxon. Both are highly conformant with the W3C specifications, though there are a few grey areas (such as complex sequences of xs:redefines) where you will rarely get two processors to agree. Some things are explicitly implementation-defined in the W3C specs, such as limits on the range of dates accepted.
If you want more specific help you'll have to tell us what the schema, the instance, and the error messages from both products look like.
It's more common to get differences between products as to whether or not a schema is valid, rather than differences as to whether an instance is valid.
您可以通过配置设置告诉 Oxygen 使用不同的验证引擎。如果我没记错的话,默认的是 Xalan,您可以将其换成 MSXML 或 Saxon 或...
从外观上看,您无法在 Altova 中执行此操作,并且只能使用 Altova 自己的验证引擎(即显然非常严格)。我读过一篇论坛帖子,其中暗示在 XMLSpy 中使用宏来利用外部系统/验证引擎。如果你能做到的话,你就能让它发挥作用。
在不讨论这些程序(或其利基市场中的其他程序)中的哪一个更好的情况下,并避免对可用的不同验证引擎进行类似的讨论,我建议您(和您的团队)选择一个,最好基于当然要进行一些研究,并坚持下去。如果在某一时刻该模式也将由外部各方使用,那么让他们使用与您相同的模式将是一项挑战。根据情况,外部方或您必须调整偏好。
You can tell Oxygen to use a different validation engine through the configuration settings. If I'm not mistaken the default one is Xalan and you could trade it for MSXML or Saxon or ...
From the looks of it you can't do that in Altova and you're stuck with Altova's own validation engine (which is very strict apparently). I've read one forum post that hints to the use of a macro in XMLSpy to make use of an external system / validation engine. If you're up to it you could get that to work.
Without going into a discussion of which one of these programs (or others in its niche) is the better one and avoiding a similar discussion about the different validation engines available, I'd recommend you (and your team) pick one, preferably based on some research of course, and stick to it. If at one point the schema is also to be used by external parties, it will be the challenge of getting them to use the same one as you do. Depending on the case the external party or you will have to adjust preferences.