如何记录 XML 模式?

发布于 2024-10-09 21:17:53 字数 206 浏览 0 评论 0原文

我已经为我编写的应用程序开发了 XML 模式。现在我想为最终用户记录有效的结构,但是我无法想出任何自然的方法来做到这一点。我见过像 xs3p 这样的东西,它本质上是将 xsd 模式转换为 HTML 表示,但是对我来说这看起来不像是好的文档;用户不需要了解任何有关模式的知识就可以理解他可以做什么。

有什么想法如何记录这个吗?有什么程序/编辑器/图形解决方案或我可以构建的简单概念吗?

I have developed a XML schema for an application I wrote. Now I want to document the valid structure for the end user, however I can't come up with any natural way to do this. I've seen things like xs3p, which essentially converts a xsd schema to a HTML representation, however that doesn't look like good documentation to me; the user shouldn't need to know anything about schemas to understand what he is allowed to do.

Any ideas how to document this? Any programs / editors / graphical solutions or simply concepts I can build on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月竹挽风 2024-10-16 21:17:53

我认为最好的方法(经过 6 年的 xsd 经验以及设计/编码系统到系统接口的经验)是使用 xsd:documentationxsd:annotation为此而设计。这样,XSD 就是自记录的(很像源代码中的 java 文档),并且文档始终与 XSD 一起分发。查看此处中的示例以及文档的显示方式 -放在 XML 编辑器中。alt text

如果您不想这样做,那么我建议您查看这篇文章 < a href="https://stackoverflow.com/questions/237938/how-to-convert-xsd-to- human-read-documentation">如何将 xsd 转换为人类可读的文档?

The best way (after 6 years of experience with xsd and designing/coding system to system interfaces) in my opinion is to use the xsd:documentation and xsd:annotation that are designed for this. This way the XSD is self documenting (much like the java doc you have in the source code) and the documentation is always distributed with the XSD. Look at the example from here and how the documentation is shown in-place in an XML editor.alt text

If you doesn't want to do this then I suggest you look at this post How to convert xsd to human readable documentation?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文