Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept alternative URIs of the supported UML versions #217

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/html-conventions-report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<xsl:call-template name="head"/>
<xsl:choose>
<xsl:when
test="fn:namespace-uri(//*:Model) = 'http://www.omg.org/spec/UML/20131001' and
test="fn:namespace-uri(//*:Model) = $supportedUmlVersions and
fn:namespace-uri(//*:XMI) = 'http://www.omg.org/spec/XMI/20131001'">
<body>
<xsl:call-template name="title-header"/>
Expand Down Expand Up @@ -92,11 +92,11 @@
<i class="fa fa-times-circle error" style="font-size: 60px;"/>
<h1 class="counter-skip">Wrong model version detected. </h1>
<br/>
<p>Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.1.</p>
<p>Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.x (either 2.5 or 2.5.1).</p>
<p>The namespaces to check:</p>
<ul>
<li>xmi="http://www.omg.org/spec/XMI/20131001"</li>
<li>uml="http://www.omg.org/spec/UML/20131001"</li>
<li>uml="<xsl:sequence select='fn:string-join($supportedUmlVersions, " | ")'/>"</li>
</ul>
</div>
</xsl:otherwise>
Expand Down
6 changes: 3 additions & 3 deletions src/html-model-glossary.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<xsl:call-template name="head"/>
<xsl:choose>
<xsl:when
test="fn:namespace-uri(//*:Model) = 'http://www.omg.org/spec/UML/20131001' and
test="fn:namespace-uri(//*:Model) = $supportedUmlVersions and
fn:namespace-uri(//*:XMI) = 'http://www.omg.org/spec/XMI/20131001'">
<body>
<main class="container-fluid">
Expand All @@ -49,11 +49,11 @@
<i class="fa fa-times-circle error" style="font-size: 60px;"/>
<h1 class="counter-skip">Wrong model version detected. </h1>
<br/>
<p>Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.1.</p>
<p>Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.x (either 2.5 or 2.5.1).</p>
<p>The namespaces to check:</p>
<ul>
<li>xmi="http://www.omg.org/spec/XMI/20131001"</li>
<li>uml="http://www.omg.org/spec/UML/20131001"</li>
<li>uml="<xsl:sequence select='fn:string-join($supportedUmlVersions, " | ")'/>'"</li>
</ul>
</div>
</xsl:otherwise>
Expand Down
8 changes: 4 additions & 4 deletions src/svrl-conventions-report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<xsl:choose>
<xsl:when
test="fn:namespace-uri(//*:Model) = 'http://www.omg.org/spec/UML/20131001' and
test="fn:namespace-uri(//*:Model) = $supportedUmlVersions and
fn:namespace-uri(//*:XMI) = 'http://www.omg.org/spec/XMI/20131001'">

<xsl:apply-templates/>
Expand All @@ -47,9 +47,9 @@
</xsl:when>
<xsl:otherwise>
<svrl:fired-rule context="/" />
<svrl:failed-assert test="/*/namespace::xmi = http://www.omg.org/spec/XMI/20131001 and /*/namespace::uml = http://www.omg.org/spec/UML/20131001">
<svrl:text>Wrong model version detected.Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.1.
The namespaces to check: uml="http://www.omg.org/spec/UML/20131001" and xmi="http://www.omg.org/spec/XMI/20131001"</svrl:text>
<svrl:failed-assert test="/*/namespace::xmi = http://www.omg.org/spec/XMI/20131001 and /*/namespace::uml = $supportedUmlVersions">
<svrl:text>Wrong model version detected.Please make sure that the XMI file uses XMI version 2.5.1 and UML version 2.5.x (either 2.5 or 2.5.1).
The namespaces to check: uml="<xsl:sequence select='fn:string-join($supportedUmlVersions, " | ")'/>" and xmi="http://www.omg.org/spec/XMI/20131001"</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down
9 changes: 8 additions & 1 deletion test/ePO-default-config/config-parameters.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@
<xsl:variable name="conventionReportAuthorLocation" select="'Luxembourg'"/>
<xsl:variable name="conventionReportAuthorWebsite" select="'https://op.europa.eu'"/>
<xsl:variable name="conventionReportUMLModelName" select="'eProcurement'"/>

<!-- URIs list of UML versions supported by model2owl -->
<xsl:variable name="supportedUmlVersions"
select="('http://www.omg.org/spec/UML/20131001',
'https://www.omg.org/spec/UML/20131001',
'http://www.omg.org/spec/UML/20161101',
'https://www.omg.org/spec/UML/20161101'
)"/>

<!-- _______________________________________________________________________ -->
<!-- METADATA SECTION -->
<!-- _______________________________________________________________________ -->
Expand Down
Loading