Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0ec574d
Add SRMD validation and schema support
aminbajand Jan 10, 2025
d5e3275
Fix SRMD validation to use generic string representation of the path
aminbajand Jan 10, 2025
e295315
Trigger build
aminbajand Jan 10, 2025
1018c27
Refactor XercesValidator namespace usage and remove outdated TODO com…
aminbajand Jan 10, 2025
345912c
Use namespace for XercesValidator to simplify code in Model.cpp
aminbajand Jan 10, 2025
c816e76
Add invalid SRMD test resources
aminbajand Jan 10, 2025
f1406fb
fix xerces namespace conflicts in mingw
arun3688 Jan 16, 2025
ff2630a
add test to Makefile
arun3688 Jan 16, 2025
60330ff
add invalidSRMD target to Makefile
aminbajand Jan 16, 2025
7cd8300
add testsuite/validate/validateSRMD.lua
arun3688 Jan 16, 2025
16fd25c
update validateSRMD tests to include Lua script and adjust error hand…
aminbajand Jan 16, 2025
fe580b7
update teardown commands in validateSRMD tests
aminbajand Jan 16, 2025
a970ad5
add validate.log target to Makefile for validation tests
aminbajand Jan 16, 2025
a471479
remove unnecessary model deletion in validateSRMD.py
aminbajand Jan 16, 2025
e62637e
fix: correct warning message formatting in validateSSD.py
aminbajand Jan 16, 2025
0902b92
return as warning when SRMD validation failed
arun3688 Jan 17, 2025
323e2b4
update SRMD validation error messages
aminbajand Jan 17, 2025
7f2f708
update SRMD validation output for
aminbajand Jan 17, 2025
de588d3
fix test
arun3688 Jan 17, 2025
8de4a62
fix path
arun3688 Jan 17, 2025
f987790
update SRMD validation output and warnings in test scripts
aminbajand Jan 17, 2025
bf17b44
update validation output formatting in SRMD test script
aminbajand Jan 17, 2025
740aa72
fix SRMD validation warning message path in validateSRMD.py
aminbajand Jan 17, 2025
995cba1
fix missing dependencies "xlink.xsd" when validating srmd
arun3688 Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
896 changes: 896 additions & 0 deletions schema/ssp/SSPTraceabilityCommon.xsd

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions schema/ssp/SimulationResourceMetaData.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0"
xmlns:srmd="http://ssp-standard.org/SSPTraceability1/SimulationResourceMetaData"
xmlns:stc="http://ssp-standard.org/SSPTraceability1/SSPTraceabilityCommon"
xmlns:ssc="http://ssp-standard.org/SSP1/SystemStructureCommon"
xmlns="http://ssp-standard.org/SSPTraceability1/SimulationResourceMetaData"
targetNamespace="http://ssp-standard.org/SSPTraceability1/SimulationResourceMetaData"
elementFormDefault="qualified">

<xs:import namespace="http://ssp-standard.org/SSP1/SystemStructureCommon" schemaLocation="SystemStructureCommon.xsd"/>
<xs:import namespace="http://ssp-standard.org/SSPTraceability1/SSPTraceabilityCommon" schemaLocation="SSPTraceabilityCommon.xsd"/>

<xs:element name="SimulationResourceMetaData">
<xs:annotation>
<xs:documentation xml:lang="en">
This element specifies the structure of a Simulation Resource Meta Data file.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="stc:GElementCommon"/>
<xs:attribute name="version" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Version of SRMD format, 1.0.0 for this release.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:normalizedString">
<xs:pattern value="[0-9]+[.][0-9]+([.][0-9]+)?(-.*)?"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute gives the simulation resource meta data a name,
which can be used for purposes of presenting the simulation resource
meta data to the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="data" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
This optional attribute gives a URI to the data item this
resource meta data applies to. If this attribute is not
present, then the data this resource meta data applies to
is provided outside of the meta data (e.g. by embedding
SRMD into the data format, or providing it as meta data in
an STMD file).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="checksum" type="xs:hexBinary" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute gives the checksum over the data item this meta data
applies to. This is optional information to allow the identification
of the data item and the precise algorithm
specifying
The checksum is calculated using the algorithm indicated by the checksumType attribute.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="checksumType" type="xs:string" use="optional" default="SHA3-256">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute gives the algorithm for the calculation of the checksum attribute. MUST be
SHA3-256 for now, indicating a SHA3 256bit secure hash algorithm, as specified in FIPS 202.
In the future other checksum algorithms might be supported.
</xs:documentation>
</xs:annotation>
</xs:attribute>

<xs:attributeGroup ref="ssc:ABaseElement"/>
<xs:attributeGroup ref="ssc:ATopLevelMetaData"/>
</xs:complexType>
</xs:element>
</xs:schema>
293 changes: 293 additions & 0 deletions schema/ssp/xlink.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,293 @@
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink">

<xs:annotation>
<xs:documentation>This schema is not normative, or even definitive. The
prose copy in the XLink 1.1 recommendation (http://www.w3.org/TR/xlink11/) is
definitive, although it should not differ from this file, except for the
absence of these two initial comments.</xs:documentation>
</xs:annotation>

<xs:annotation>
<xs:documentation>In keeping with the W3C's standard versioning
policy, this schema document will persist at
http://www.w3.org/XML/2008/06/xlink.xsd.
At the date of issue it can also be found at
http://www.w3.org/1999/xlink.xsd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML Schema
itself, or with the XLink namespace itself. In other words, if the XML
Schema or XLink namespaces change, the version of this document at
http://www.w3.org/1999/xlink.xsd will change
accordingly; the version at
http://www.w3.org/2008/06/xlink.xsd will not change.
</xs:documentation>
</xs:annotation>

<xs:annotation>
<xs:documentation>This schema document provides attribute declarations and
attribute group, complex type and simple type definitions which can be used in
the construction of user schemas to define the structure of particular linking
constructs, e.g.
<![CDATA[
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xl="http://www.w3.org/1999/xlink">

<xs:import namespace="http://www.w3.org/1999/xlink"
location="http://www.w3.org/1999/xlink.xsd">

<xs:element name="mySimple">
<xs:complexType>
...
<xs:attributeGroup ref="xl:simpleAttrs"/>
...
</xs:complexType>
</xs:element>
...
</xs:schema>]]></xs:documentation>
</xs:annotation>

<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

<xs:attribute name="type" type="xlink:typeType"/>

<xs:simpleType name="typeType">
<xs:restriction base="xs:token">
<xs:enumeration value="simple"/>
<xs:enumeration value="extended"/>
<xs:enumeration value="title"/>
<xs:enumeration value="resource"/>
<xs:enumeration value="locator"/>
<xs:enumeration value="arc"/>
</xs:restriction>
</xs:simpleType>

<xs:attribute name="href" type="xlink:hrefType"/>

<xs:simpleType name="hrefType">
<xs:restriction base="xs:anyURI"/>
</xs:simpleType>

<xs:attribute name="role" type="xlink:roleType"/>

<xs:simpleType name="roleType">
<xs:restriction base="xs:anyURI">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

<xs:attribute name="arcrole" type="xlink:arcroleType"/>

<xs:simpleType name="arcroleType">
<xs:restriction base="xs:anyURI">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

<xs:attribute name="title" type="xlink:titleAttrType"/>

<xs:simpleType name="titleAttrType">
<xs:restriction base="xs:string"/>
</xs:simpleType>

<xs:attribute name="show" type="xlink:showType"/>

<xs:simpleType name="showType">
<xs:restriction base="xs:token">
<xs:enumeration value="new"/>
<xs:enumeration value="replace"/>
<xs:enumeration value="embed"/>
<xs:enumeration value="other"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:attribute name="actuate" type="xlink:actuateType"/>

<xs:simpleType name="actuateType">
<xs:restriction base="xs:token">
<xs:enumeration value="onLoad"/>
<xs:enumeration value="onRequest"/>
<xs:enumeration value="other"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:attribute name="label" type="xlink:labelType"/>

<xs:simpleType name="labelType">
<xs:restriction base="xs:NCName"/>
</xs:simpleType>

<xs:attribute name="from" type="xlink:fromType"/>

<xs:simpleType name="fromType">
<xs:restriction base="xs:NCName"/>
</xs:simpleType>

<xs:attribute name="to" type="xlink:toType"/>

<xs:simpleType name="toType">
<xs:restriction base="xs:NCName"/>
</xs:simpleType>

<xs:attributeGroup name="simpleAttrs">
<xs:attribute ref="xlink:type" fixed="simple"/>
<xs:attribute ref="xlink:href"/>
<xs:attribute ref="xlink:role"/>
<xs:attribute ref="xlink:arcrole"/>
<xs:attribute ref="xlink:title"/>
<xs:attribute ref="xlink:show"/>
<xs:attribute ref="xlink:actuate"/>
</xs:attributeGroup>

<xs:group name="simpleModel">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType mixed="true" name="simple">
<xs:annotation>
<xs:documentation>
Intended for use as the type of user-declared elements to make them
simple links.
</xs:documentation>
</xs:annotation>
<xs:group ref="xlink:simpleModel"/>
<xs:attributeGroup ref="xlink:simpleAttrs"/>
</xs:complexType>

<xs:attributeGroup name="extendedAttrs">
<xs:attribute ref="xlink:type" fixed="extended" use="required"/>
<xs:attribute ref="xlink:role"/>
<xs:attribute ref="xlink:title"/>
</xs:attributeGroup>

<xs:group name="extendedModel">
<xs:choice>
<xs:element ref="xlink:title"/>
<xs:element ref="xlink:resource"/>
<xs:element ref="xlink:locator"/>
<xs:element ref="xlink:arc"/>
</xs:choice>
</xs:group>

<xs:complexType name="extended">
<xs:annotation>
<xs:documentation>
Intended for use as the type of user-declared elements to make them
extended links.
Note that the elements referenced in the content model are all abstract.
The intention is that by simply declaring elements with these as their
substitutionGroup, all the right things will happen.
</xs:documentation>
</xs:annotation>
<xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/>
<xs:attributeGroup ref="xlink:extendedAttrs"/>
</xs:complexType>

<xs:element name="title" type="xlink:titleEltType" abstract="true"/>

<xs:attributeGroup name="titleAttrs">
<xs:attribute ref="xlink:type" fixed="title" use="required"/>
<xs:attribute ref="xml:lang">
<xs:annotation>
<xs:documentation>
xml:lang is not required, but provides much of the
motivation for title elements in addition to attributes, and so
is provided here for convenience.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:group name="titleModel">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType mixed="true" name="titleEltType">
<xs:group ref="xlink:titleModel"/>
<xs:attributeGroup ref="xlink:titleAttrs"/>
</xs:complexType>

<xs:element name="resource" type="xlink:resourceType" abstract="true"/>

<xs:attributeGroup name="resourceAttrs">
<xs:attribute ref="xlink:type" fixed="resource" use="required"/>
<xs:attribute ref="xlink:role"/>
<xs:attribute ref="xlink:title"/>
<xs:attribute ref="xlink:label"/>
</xs:attributeGroup>

<xs:group name="resourceModel">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType mixed="true" name="resourceType">
<xs:group ref="xlink:resourceModel"/>
<xs:attributeGroup ref="xlink:resourceAttrs"/>
</xs:complexType>

<xs:element name="locator" type="xlink:locatorType" abstract="true"/>

<xs:attributeGroup name="locatorAttrs">
<xs:attribute ref="xlink:type" fixed="locator" use="required"/>
<xs:attribute ref="xlink:href" use="required"/>
<xs:attribute ref="xlink:role"/>
<xs:attribute ref="xlink:title"/>
<xs:attribute ref="xlink:label">
<xs:annotation>
<xs:documentation>
label is not required, but locators have no particular
XLink function if they are not labeled.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:group name="locatorModel">
<xs:sequence>
<xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType name="locatorType">
<xs:group ref="xlink:locatorModel"/>
<xs:attributeGroup ref="xlink:locatorAttrs"/>
</xs:complexType>

<xs:element name="arc" type="xlink:arcType" abstract="true"/>

<xs:attributeGroup name="arcAttrs">
<xs:attribute ref="xlink:type" fixed="arc" use="required"/>
<xs:attribute ref="xlink:arcrole"/>
<xs:attribute ref="xlink:title"/>
<xs:attribute ref="xlink:show"/>
<xs:attribute ref="xlink:actuate"/>
<xs:attribute ref="xlink:from"/>
<xs:attribute ref="xlink:to">
<xs:annotation>
<xs:documentation>
from and to have default behavior when values are missing
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:group name="arcModel">
<xs:sequence>
<xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType name="arcType">
<xs:group ref="xlink:arcModel"/>
<xs:attributeGroup ref="xlink:arcAttrs"/>
</xs:complexType>

</xs:schema>
Loading