Skip to content

Commit

Permalink
severity changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos0000 committed Feb 13, 2024
1 parent 9610168 commit 19fa87f
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/html-conventions-lib/association-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
if (fn:matches($multiplicityValue, '^[0-9]..[0-9]$') or fn:matches($multiplicityValue, '^[0-9]..\*$')) then
()
else
f:generateWarningMessage(fn:concat('The connector ', f:getConnectorName($connector),
f:generateErrorMessage(fn:concat('The connector ', f:getConnectorName($connector),
' has source multiplicity invalidly stated. Multiplicity must be specified in the form [min..max].'),
path($connector),
'association-multiplicity-2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
then
if (f:isQNameLowerCasedCamelCase($classAttributeName) = fn:false())
then
f:generateWarningMessage(fn:concat('The attribute name ', $classAttributeName, ' is invalid. The attribute name must start with a lower case.'),
f:generateErrorMessage(fn:concat('The attribute name ', $classAttributeName, ' is invalid. The attribute name must start with a lower case.'),
path($classAttribute),
'class-attribute-name-1',
'CMC-R4',
Expand All @@ -179,7 +179,7 @@
else
if (fn:contains($uppercaseLetters, fn:substring($classAttributeName, 1, 1)))
then
f:generateWarningMessage(fn:concat('The attribute name ', $classAttributeName, ' is invalid. The attribute name must start with a lower case.'),
f:generateErrorMessage(fn:concat('The attribute name ', $classAttributeName, ' is invalid. The attribute name must start with a lower case.'),
path($classAttribute),
'class-attribute-name-1',
'CMC-R4',
Expand Down Expand Up @@ -290,7 +290,7 @@
if ($attributeScope = 'Public') then
()
else
f:generateWarningMessage(fn:concat('The attribute ', $classAttribute/@name, ' is non-public. Attributes shall be public '),
f:generateErrorMessage(fn:concat('The attribute ', $classAttribute/@name, ' is non-public. Attributes shall be public '),
path($classAttribute),
'class-attribute-visibility-5',
'CMC-R13',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
if (f:areStringsEqual($lowerBoundValues) and f:areStringsEqual($upperBoundValues) and $allAttributesHaveMultiplicityValue) then
()
else
f:generateFormattedInfoMessage((fn:concat('The attribute ', $attributeName, ' has different multiplicities in reuse contexts.
f:generateFormattedWarningMessage((fn:concat('The attribute ', $attributeName, ' has different multiplicities in reuse contexts.
When a property is reused in multiple contexts, the multiplicity is expected to be the same. Please see usage below:'
)), $multiplicityUsage,
'//elements/element/attributes',
Expand Down
4 changes: 2 additions & 2 deletions src/html-conventions-lib/class-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
then
if (f:isQNameUpperCasedCamelCase($className) = fn:false())
then
f:generateWarningMessage(fn:concat('The class name ', $className, ' is invalid. The class name must start with a capital case.'),
f:generateErrorMessage(fn:concat('The class name ', $className, ' is invalid. The class name must start with a capital case.'),
path($class),
'class-name-2',
'CMC-R4',
Expand All @@ -232,7 +232,7 @@
then
()
else
f:generateWarningMessage(fn:concat('The class name ', $className, ' is invalid. The class name must start with a capital case.'),
f:generateErrorMessage(fn:concat('The class name ', $className, ' is invalid. The class name must start with a capital case.'),
path($class),
'class-name-2',
'CMC-R4',
Expand Down
12 changes: 6 additions & 6 deletions src/html-conventions-lib/common-elements-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<xsl:if test="f:isValidQname($elementName) = fn:false()">
<xsl:sequence
select="
f:generateWarningMessage(fn:concat('The name ', $elementName, ' does not match the pattern. ',
f:generateErrorMessage(fn:concat('The name ', $elementName, ' does not match the pattern. ',
'The name should respect the syntax prefix:localSegment (similar to the XML QName).'),
path($element),
'common-name-1',
Expand Down Expand Up @@ -81,7 +81,7 @@
<xsl:sequence
select="
if (f:isElementNamePrefixMissing($element)) then
f:generateWarningMessage(fn:concat('The name of element ', $element/@name,
f:generateErrorMessage(fn:concat('The name of element ', $element/@name,
' is missing a prefix. The name should comprise a prefix respecing the syntax prefix:localSegment.'),
path($element),
'common-name-3',
Expand Down Expand Up @@ -153,7 +153,7 @@
<xsl:if test="not(f:isValidNamespace($elementName))">
<xsl:sequence
select="
f:generateWarningMessage(fn:concat('The prefix ', fn:substring-before($elementName, ':'),
f:generateErrorMessage(fn:concat('The prefix ', fn:substring-before($elementName, ':'),
' is not defined. A prefix must be associated to a namespace URI.'),
path($element),
'common-name-6',
Expand Down Expand Up @@ -226,7 +226,7 @@
<xsl:sequence
select="
if (f:isDelimitersInElementLocalSegment($element)) then
f:generateWarningMessage(fn:concat('The local name segment ', f:getLocalSegmentForElements($element),
f:generateErrorMessage(fn:concat('The local name segment ', f:getLocalSegmentForElements($element),
' contains token delimiters. It is best if the names ',
'are camel cased and delimiters removed.'),
path($element),
Expand Down Expand Up @@ -423,7 +423,7 @@
<xsl:sequence
select="
if (fn:ends-with($elementName, 'es') or fn:ends-with($elementName, 's')) then
f:generateWarningMessage(fn:concat('The name (', $elementName,') is possibly in plural grammatical number. Names shall be usually provided in singular number.'),
f:generateInfoMessage(fn:concat('The name (', $elementName,') is possibly in plural grammatical number. Names shall be usually provided in singular number.'),
path($element),
'common-name-16',
'GC-R4',
Expand Down Expand Up @@ -484,7 +484,7 @@
if ($elementScope = 'public') then
()
else
f:generateWarningMessage(fn:concat('The element ', $element/@name, ' is non-public. All elements shall be public '),
f:generateErrorMessage(fn:concat('The element ', $element/@name, ' is non-public. All elements shall be public '),
path($element),
'common-visibility-18',
'CMC-R13',
Expand Down
2 changes: 1 addition & 1 deletion src/html-conventions-lib/connectors-with-same-name.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
if (f:areStringsEqual($multiplicityValues) and $allConnectorsHaveMultiplicityValue) then
()
else
f:generateInfoMessage(
f:generateWarningMessage(
'When a property is reused in multiple contexts the multiplicity is expected to be the same.',
'//connectors',
'connectors-with-same-name-multiplicity-1',
Expand Down
26 changes: 13 additions & 13 deletions src/html-conventions-lib/general-connectors-html-convention.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<xsl:sequence
select="
if (not(f:isValidQname($targetRoleName))) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName, ' does not match the pattern. ',
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName, ' does not match the pattern. ',
'The name should respect the syntax prefix:localSegment (similar to the XML QName).'),
path($connector),
'connector-name-1',
Expand All @@ -48,7 +48,7 @@
<xsl:sequence
select="
if (not(f:isValidQname($targetRoleName)) and not(f:isValidQname($sourceRoleName))) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
' does not match the pattern. ',
'The name should respect the syntax prefix:localSegment (similar to the XML QName).'),
path($connector),
Expand Down Expand Up @@ -78,7 +78,7 @@
<xsl:sequence
select="
if (f:isNamePrefixMissing($targetRoleName)) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName, ' is missing a prefix. ',
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName, ' is missing a prefix. ',
'The name should comprise a prefix respecing the syntax prefix:localSegment.'),
path($connector),
'connector-name-2',
Expand All @@ -93,7 +93,7 @@
<xsl:sequence
select="
if (f:isNamePrefixMissing($targetRoleName) or f:isNamePrefixMissing($sourceRoleName)) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
' is missing a prefix. ',
'The name should comprise a prefix respecing the syntax prefix:localSegment.'),
path($connector),
Expand Down Expand Up @@ -122,7 +122,7 @@
<xsl:sequence
select="
if (f:isNameLocalSegmentMissing($targetRoleName)) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName,
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName,
' is missing a local segment. Please provide one respecing the syntax prefix:localSegment.'),
path($connector),
'connector-name-3',
Expand All @@ -138,7 +138,7 @@
<xsl:sequence
select="
if (f:isNameLocalSegmentMissing($targetRoleName) or f:isNameLocalSegmentMissing($sourceRoleName)) then
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName, ' or source role name ', $sourceRoleName,
' is missing a local segment. Please provide one respecing the syntax prefix:localSegment.'),
path($connector),
'connector-name-3',
Expand Down Expand Up @@ -214,7 +214,7 @@
if (f:isValidNamespace($targetRoleName)) then
()
else
f:generateWarningMessage(fn:concat('The target role name ', $targetRoleName,
f:generateErrorMessage(fn:concat('The target role name ', $targetRoleName,
' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'connector-name-5',
Expand All @@ -231,7 +231,7 @@
if (f:isValidNamespace($targetRoleName) and f:isValidNamespace($sourceRoleName)) then
()
else
f:generateWarningMessage(fn:concat('The target role name prefix ', $targetRoleName, ' or source role name prefix ', $sourceRoleName,
f:generateErrorMessage(fn:concat('The target role name prefix ', $targetRoleName, ' or source role name prefix ', $sourceRoleName,
' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'common-name-5',
Expand Down Expand Up @@ -425,7 +425,7 @@
select="
if ($hasStereotype)
then
f:generateInfoMessage(fn:concat('The ', $hasStereotype,
f:generateWarningMessage(fn:concat('The ', $hasStereotype,
' stareotype is applied to ', f:getConnectorName($connector),
'. Stereotypes are discouraged in the current practice with some exceptions. '),
path($connector),
Expand Down Expand Up @@ -537,7 +537,7 @@
if ((f:isValidNamespace($tag/@name)) or (fn:substring-before($tag/@name, ':') = '')) then
()
else
f:generateWarningMessage(
f:generateErrorMessage(
fn:concat('The prefix for source role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'connector-tag-prefix-13',
Expand All @@ -548,7 +548,7 @@
)
else
f:generateWarningMessage(fn:concat('The prefix for source role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
f:generateErrorMessage(fn:concat('The prefix for source role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'connector-tag-prefix-13',
'CMC-R3',
Expand All @@ -565,7 +565,7 @@
if ((f:isValidNamespace($tag/@name)) or (fn:substring-before($tag/@name, ':') = '')) then
()
else
f:generateWarningMessage(fn:concat('The prefix for target role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
f:generateErrorMessage(fn:concat('The prefix for target role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'connector-tag-prefix-13',
'CMC-R3',
Expand All @@ -574,7 +574,7 @@
&lt;a href=&quot;https://semiceu.github.io/style-guide/1.0.0/gc-conceptual-model-conventions.html#sec:cmc-r6&quot; target=&quot;_blank&quot;&gt;CMC-R6&lt;/a&gt;'
)
else
f:generateWarningMessage(fn:concat('The prefix for target role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
f:generateErrorMessage(fn:concat('The prefix for target role ', $tag/@name, ' is not defined. A prefix must be associated to a namespace URI.'),
path($connector),
'connector-tag-prefix-13',
'CMC-R3',
Expand Down
2 changes: 1 addition & 1 deletion src/html-conventions-lib/packages-html-conventions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
if (fn:matches($packageName, '^[a-zA-Z0-9 ]*$')) then
()
else
f:generateWarningMessage(fn:concat('The package name ', $packageName, ' contains invalid characters. Package name shall be a short ',
f:generateErrorMessage(fn:concat('The package name ', $packageName, ' contains invalid characters. Package name shall be a short ',
'alphanumeric string representing an acronym or a short name.'),
path($package),
'package-name-1',
Expand Down

0 comments on commit 19fa87f

Please sign in to comment.