This service allows you to assess the conformance of a UML Model with the SEMIC Style Guide. For each UML guideline in the style guide, a set of rules have been implemented, which asses whether a UML model convention is respected. These rules specify constraints on the structure, relationships, and properties within the model. The set of rules employed during validation are documented here.
The content to validate can be provided as a file or a URI reference. Documentation on using the Interoperability Test Bed's XML validator is available here.
This validator has 2 options available: basic and advanced. The difference between the two is the number of configuration files. In the basic mode, only the namespaces are to be defined, while in advanced mode, multiple configuration files must be defined. For easy use, choose the basic mode, download the boilerplates for the necessary config and change them accordingly.
Boilerplate templates for the configuration files related to validator options are available as follows:
The validator utilizes an input file and several configuration files, all of which must adhere to specific conventions for proper functionality. The majority of files used in this validator are XML files (e.g., my-file.xml
) that includes the input file. There is only one configuration file, which is an XSLT file that holds variables used by the system.
Config Parameters File: config-parameters.xsl
Namespaces File: namespaces.xml
XSD and RDF Datatypes File: xsdAndRdfDataTypes.xml
For the input file there is no naming convention, but it should be an XML/XMI file that follow the conventions presented below
This file must be an XML/XMI file, and make sure that uses XMI version 2.5.1 and UML version 2.5.1. The namespaces to check in the file are: uml="http://www.omg.org/spec/UML/20131001"
and xmi="http://www.omg.org/spec/XMI/20131001"
.
<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:umldi="http://www.omg.org/spec/UML/20131001/UMLDI" xmlns:dc="http://www.omg.org/spec/UML/20131001/UMLDC" xmlns:thecustomprofile="http://www.sparxsystems.com/profiles/thecustomprofile/1.0">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5" exporterID="1559"/>
This should be controlled when the export process is done from your modeling tool used.
As presented above, this validator will use a maximum of three configuration files depending on the UML model validation option you have selected (check the Validator Options section).
This is an XSLT file that contains a set of variables used by the system when the model validation is executed. Some variables can be changed, while others should not be altered as they are preconfigured. A boilerplate for config parameters can be found here. The boilerplate includes comments that instruct what can and cannot be changed.
<!-- Types of elements and names for attribute types that are acceptable to produce object properties -->
<xsl:variable name="acceptableTypesForObjectProperties" select="('epo:Identifier', 'rdfs:Literal')"/>
<!-- Acceptable stereotypes -->
<xsl:variable name="stereotypeValidOnAttributes" select="()"/>
<!-- ... other variables ... -->
<!-- Allowed characters for a normalized string (characters allowed in a QName) -->
<xsl:variable name="allowedStrings" select="'^[\w\d-_:]+$'"/>
There are two types of data that you can pass in the variables: a list or a string. For lists, the variable value should always be surrounded by quotes (""
), and the actual values should be enclosed in single quotes (''
). For strings, the principle remains the same:
<xsl:variable name="my-variable" select="'my string value'"/>
empty string variable
<xsl:variable name="my-variable" select="''"/>
empty list variable
<xsl:variable name="stereotypeValidOnAttributes" select="()"/>
This file will hold the namespace values and names used in the model that will be validated. A boilerplate for config parameters can be found here.
<?xml version="1.0" encoding="UTF-8"?>
<prefixes xmlns="http://publications.europa.eu/ns/">
<prefix name="" value="http://data.europa.eu/a4g/ontology#"/>
<!-- ... other prefixes ... -->
</prefixes>
This file holds declarations of XSD and RDF datatypes. A boilerplate for this file can be found here.
<?xml version="1.0" encoding="UTF-8"?>
<datatypes xmlns="http://publications.europa.eu/ns/">
<datatype namespace="xsd" qname="xsd:anyURI"/>
<datatype namespace="xsd" qname="xsd:base64Binary"/>
<datatype namespace="xsd" qname="xsd:boolean"/>
<datatype namespace="xsd" qname="xsd:byte"/>
<datatype namespace="xsd" qname="xsd:date"/>
<datatype namespace="xsd" qname="xsd:dateTime"/>
<datatype namespace="rdfs" qname="rdfs:Literal"/>
</datatypes>
The file should include the XML declaration as shown in the sample (<?xml version="1.0" encoding="UTF-8"?>
).