XMI 2.1 文件中 UML 2.3 的 XML 模式

发布于 2024-10-10 08:27:12 字数 208 浏览 0 评论 0原文

在哪里可以找到以下名称空间的 xml 架构或 DTD:http://www.omg。 org/spec/UML/20090901

有这样的东西吗?我想将 UML 数据模型导出到 XMI 文件中。为了验证导出的 XMI 文件,我需要这个 xml 架构文件。

Where can I find a xml schema or a DTD for the following namespace: http://www.omg.org/spec/UML/20090901

Is there such a thing? I would like to export UML data model into a XMI file. In order to validate the exported XMI file I need this xml schema file.

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

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

发布评论

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

评论(2

忆梦 2024-10-17 08:27:12

我过去曾查找过此内容,据我所知,没有用于 UML 模型的 XMI 序列化的 XML 模式。

相反,MOF 2.0/XMI 映射的第 6 节“XML 文档生成”(请参阅​​ http:// www.omg.org/spec/XMI/)“指定基于 MOF 2.0 Core 的模型中 XML 文档的 XMI 生成。” UML 是 MOF 的一个实例,因此这也指定了 UML 模型的 XMI 序列化。实际上,它指定了 XMI 的语法,然后描述了如何使用该语法为模型元素的实例生成 XMI​​。

它不是一个模式,但它是我发现的最接近的模式。

I've looked for this in the past, and from what I understand, there is no XML schema for the XMI serialization of a UML model.

Instead, Section 6, "XML Document Production", of the MOF 2.0/XMI Mapping (see http://www.omg.org/spec/XMI/) "specifies the XMI production of an XML document from a model based on the MOF 2.0 Core." UML is an instance of MOF, so this also specifies the XMI serialization of a UML model. Effectively, it specifies a grammar for XMI, then describes the use of the grammar to produce XMI for an instance of an model element.

It isn't a schema, but it's as close as I've found.

何以笙箫默 2024-10-17 08:27:12

您可以做的技巧是从数据库创建 java 代码,然后反转您的 java 代码以获得 UML 2.3 XMI 2.1 模型。它运行良好,并且尝试转换数据模型实际上是不可能的,因为数据库不是像 UML 那样的对象模型。

我不认为 xml 模式或 DTD 可以完成这项工作。为了验证我的模型,我所做的只是使用 EclipseUML 开源编辑器打开我的模型,然后单击模型并使用模型验证菜单。手动执行此验证几乎是不可能的,因为 UML 规则不仅仅涉及 xml 验证。

The trick you can do is to create a java code from your database and then reverse your java code in order to get an UML 2.3 XMI 2.1 model. It works well and trying to convert a data model is not really possible because database is not an object model like UML.

I don't think that xml schema or DTD could do the job. What I do in order to validate my model is simply to open my model with the EclipseUML open source editor and then click on the model and use the model validation menu. Doing this validation manually is almost impossible because UML rules are not just about xml validation.

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