是否存在可用于验证 XMI/UML 文件的现有 XML 架构?
我实际上只需要能够验证我收到的 XMI 文件是否符合 OMG 制定的 XMI 标准。
例如,
我有一个像这样开始的文件...
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20090901" xmlns:xmi="http://www.omg.org/spec/XMI/20100901" xmlns:StandardProfileL3="http://schema.omg.org/spec/UML/2.3/StandardProfileL3.xmi" xmlns:StandardProfileL2="http://schema.omg.org/spec/UML/2.3/StandardProfileL2.xmi" xmi:version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/XMI/20100901 file:///D:/data/tools/Altova/XMI.xsd">
<xmi:Documentation exporter="Altova" exporterVersion="1.0"/>
<uml:Model xmi:id="eee_1045467100313_135436_1" name="Data" visibility="public">
<ownedComment xmi:type="uml:Comment" xmi:id="_17_0_8ce027f_1306433568482_126880_1517" body="Created:6/26/11 3:32">
第一部分验证得很好,但是一旦它到达 uml:Model 它就会抛出错误。我查看了 OMG 网站,但找不到验证其 UML 部分的模式。我需要自己写一篇吗?我这样做对吗?我之前并没有真正的过期,而且一些工作要求不允许我有时间适当地教育自己。感谢任何和所有的帮助/建议!提前致谢!
I really just need to be able to validate that the XMI file I'm receiving is compliant with the XMI standard set by OMG.
For example,
I have a file that starts like this...
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20090901" xmlns:xmi="http://www.omg.org/spec/XMI/20100901" xmlns:StandardProfileL3="http://schema.omg.org/spec/UML/2.3/StandardProfileL3.xmi" xmlns:StandardProfileL2="http://schema.omg.org/spec/UML/2.3/StandardProfileL2.xmi" xmi:version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/XMI/20100901 file:///D:/data/tools/Altova/XMI.xsd">
<xmi:Documentation exporter="Altova" exporterVersion="1.0"/>
<uml:Model xmi:id="eee_1045467100313_135436_1" name="Data" visibility="public">
<ownedComment xmi:type="uml:Comment" xmi:id="_17_0_8ce027f_1306433568482_126880_1517" body="Created:6/26/11 3:32">
The first part validates just fine but as soon as it hits the uml:Model it throws an error. I've looked on OMGs website and I can't find a schema to validate the UML part of this. Do I need to write one myself? Am I even doing this right, I haven't really had any previous expirence and some work demands don't allow me the time to properly educate myself. Any and all help/advice is appreciated! Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我正在寻找一些用于 OMG-UML-Validation 的架构文件,但也一无所获。 OMG 官方网站上只有 pdf/ps 格式的 Xml 示例和规范。
uml 的命名空间在 xml 的根元素中定义。
I'm looking for some Schema-Files for OMG-UML-Validation, but also found nothing. On the official OMG-Website are only Xml-Examples and Specification in pdf/ps.
The Namespace for uml is definied in the root-element of the xml.
从您给定的 XML 中可以清楚地看出,没有为 UML 声明命名空间。
所以总结就是,你收到的xml无效。
希望它会有所帮助。
From your given XML it is clear that there is no namespace declared for UML.
So summary is, the xml u r receiving is invalid.
Wish it will be helpful.