是否有一个应用程序可以帮助某人创建基于 Relax NG 模式的 XML 文档?

发布于 2024-09-02 22:49:51 字数 459 浏览 2 评论 0原文

我花了一些时间创建了一个 Relax NG 模式,以便在我们的团队中使用,以验证我们用于交换信息的 XML 文档。架构并不复杂,但相当大。

我想知道是否存在一个工具可以读取这样的 Relax NG 模式并帮助用户使用该模式作为模板创建相应的实例文档。也许是一个带有 GUI 的应用程序,可以为文档的每个部分创建字段和下拉选项?

例如,该工具可能会创建一个大纲 XML 文档,并提示用户选择多个特定元素,填写每个字段,或许还可以使用直接从架构中读取的允许值。当用户的文档“完成”时,它还可以通过视觉反馈向用户显示,或者在出现验证问题时突出显示。

我可以预期编写一个自定义 GUI 工具来创建这样的 XML 文档,但我真的希望 GUI 自动反映对架构的更改 - 我真的想知道这是否还没有完成。

我知道有些编辑器可以在编写 XML 文档时自动根据模式验证 XML 文档,但我真的希望让我的用户远离 XML,这样他们就不必担心 XML 语法的细节。

I've spent a bit of time creating a Relax NG schema for use within our team to validate XML documents we use for exchanging information. The schema is not complicated, but it is reasonably large.

I am wondering if there exists a tool that can read in such a Relax NG schema and assist a user in creating a corresponding instance document, using the schema as a template. Perhaps an application with a GUI that creates fields and drop-down selections for each part of the document?

For example, the tool might create an outline XML document and prompt the user to select multiples of certain elements, fill in each field, perhaps with permitted values read directly from the schema. It might also show the user via visual feedback when their document is 'complete', or highlight validation problems as they come up.

I could anticipate writing a custom GUI tool to create such an XML document, but I'd really like changes to the schema to be automatically reflected by the GUI - and I really wonder if this hasn't already been done.

I know some editors can automatically validate an XML document against a schema as it's being written, but I would really like to get my users one step away from the XML so they don't have to worry about the details of the XML syntax.

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

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

发布评论

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

评论(3

一江春梦 2024-09-09 22:49:51

Sun XML Instance Generator 可以完成这项工作,但自从 Oracle 接管 Sun 以来,它的链接似乎已经失效了。我想,请向某人要一份副本,或者在网上查找。

The Sun XML Instance Generator does this job, but the links to it seem to have rotted since Oracle took over Sun. Ask someone for a copy, I guess, or poke around the Web.

拥抱影子 2024-09-09 22:49:51

请参阅 Relax 创建者的 http://www.thaiopensource.com/nxml-mode/ -不好!

这是基于 Emacs 的模式。它与 Emacs 23 及更高版本捆绑在一起!

Look to http://www.thaiopensource.com/nxml-mode/ from creator on Relax-NG!

This is Emacs based mode. It bundled with Emacs 23 and upper versions!

要走干脆点 2024-09-09 22:49:51

从来没有找到一个完全适合这个问题的解决方案。一种有希望的途径是将 RelaxNG 模式转换为 XML 模式 (XSD),然后使用 Eclipse 编辑器的 XML 模式支持来指导数据输入,但我们从未深入了解这一点。

Never did find a completely suitable solution to this question. One promising avenue was to convert the RelaxNG schema to XML Schema (XSD) and then use the Eclipse editor's XML schema support to guide data entry, but we never took it far enough to know for sure.

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