【问题标题】:Validation of a relations between two objects XSD验证两个对象 XSD 之间的关系
【发布时间】:2022-01-07 07:26:44
【问题描述】:

我是 XSD 的新手,我想知道如何验证两个实体之间的关系类型是否正确?

类型“archimate:TechnologyService”只能通过关系 xsi:type="archimate:RealizationRelationship" 链接到 xsi:type="archimate:TechnologyProcess"

这是我的(archimate)xml:

<?xml version="1.0" encoding="UTF-8"?>
<archimate:model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:archimate="http://www.archimatetool.com/archimate" name="full meta-model" id="id-d8ae3705722c4a808f01c1ba277b6c68" version="4.9.0">
  <folder name="Technology &amp; Physical" id="id-873800e8ceaa48ef89265ddac5b75518" type="technology">
    <element xsi:type="archimate:TechnologyService" name="Technology Service" id="id-b5546f94e55a4c45804c182b5c916515"/>
    <element xsi:type="archimate:TechnologyProcess" name="Technology Process" id="id-1ca241084a8141e7b2292f4cb760201a"/>
  </folder>
  <folder name="Relations" id="id-b2b590869ad04a14a81c9cb388d7fd7d" type="relations">
    <element xsi:type="archimate:RealizationRelationship" id="id-766b9f9efbca4b00b4420ffa45a38c4d" source="id-1ca241084a8141e7b2292f4cb760201a" target="id-b5546f94e55a4c45804c182b5c916515"/>
  </folder>
</archimate:model>

代表这个

我想使这个无效:

<?xml version="1.0" encoding="UTF-8"?>
<archimate:model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:archimate="http://www.archimatetool.com/archimate" name="full meta-model" id="id-d8ae3705722c4a808f01c1ba277b6c68" version="4.9.0">
  <folder name="Technology &amp; Physical" id="id-873800e8ceaa48ef89265ddac5b75518" type="technology">
    <element xsi:type="archimate:TechnologyService" name="Technology Service" id="id-b5546f94e55a4c45804c182b5c916515"/>
    <element xsi:type="archimate:TechnologyProcess" name="Technology Process" id="id-1ca241084a8141e7b2292f4cb760201a"/>
  </folder>
  <folder name="Relations" id="id-b2b590869ad04a14a81c9cb388d7fd7d" type="relations">
<element xsi:type="archimate:ServingRelationship" id="id-365a23fe89dc48539b1f2551a424fdea" source="id-1ca241084a8141e7b2292f4cb760201a" target="id-b5546f94e55a4c45804c182b5c916515"/>
  </folder>
</archimate:model>

【问题讨论】:

    标签: xml xsd


    【解决方案1】:

    您无法使用 XSD 执行此操作,因为 Archi 的模型 XSD 和 ArchiMate 交换格式 XSD 中都不存在这些类型的规则。 ArchiMate 工具有自己的内部方法来验证关系。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多