如何使用 xml 模型标记将 xml 文档链接到放松 NG 架构



我希望使用W3C草案中指定的xml-model标签将xml文档链接到其Relax NG描述文档。

<?xml-model href="" type="" schematypens="" charset="" title="" group="" phase="" ?>

你有完整的例子来展示如何使用它吗?是否有理解 xml 模型标记的验证器工具?

编辑:我在这里看到了建议使用模式类型的例子。 我想剩下的唯一问题是哪些工具使用 xml 模型。

规范中给出的例子对于 RELAX NG 来说已经足够了:

<?xml-model href="http://www.docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>

或者,如果您使用的是精简语法:

<?xml-model href="whatever.rnc" type="application/relax-ng-compact-syntax"?>

oXygen XML 确实支持此规范。

最新更新