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

added checkers and imports #162

Merged
merged 4 commits into from
Jun 25, 2023
Merged

added checkers and imports #162

merged 4 commits into from
Jun 25, 2023

Conversation

Dragos0000
Copy link
Collaborator

No description provided.

@Dragos0000 Dragos0000 requested a review from costezki June 24, 2023 07:42
Copy link
Collaborator

@costezki costezki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, as a first iteration yet refactoring is needed and some logic revisited.

@@ -37,6 +37,19 @@
<xsl:sequence select="$root//elements/element[@name=$name]"/>
</xsl:function>

<xd:doc>
<xd:desc>fetch the element attribute with a given name</xd:desc>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly, we did not have this before.

don't we check the multiple usage of attributes like we check multipel usage of connectors?
If not then please signal this to Csongor and implement accordingly in the Convention's checking report.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fetcher for the an element type attribute. The logic for multiple usage is in conventions scripts not helper functions.

@@ -89,6 +89,10 @@
<xsl:call-template name="namePlural">
<xsl:with-param name="element" select="."/>
</xsl:call-template>
<xsl:call-template name="elementUniqueName">
<xsl:with-param name="element" select="."/>
<xsl:with-param name="isAttribute" select="fn:true()"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What "isAttribute"? The variable name is not clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A flag to tell if the element is an attribute as the logic is different.

Is the element given as a parameter for the template elementUniqueName an attribute ?

@@ -90,12 +90,13 @@
<xsl:call-template name="nonPublicElement">
<xsl:with-param name="element" select="."/>
</xsl:call-template>
<xsl:call-template name="elementUniqueName">
<xsl:with-param name="element" select="."/>
<xsl:with-param name="isAttribute" select="fn:false()"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@@ -215,7 +216,7 @@



<xd:doc>
<!-- <xd:doc>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this is commented out? What does this mean?

If we do not need this functionality, then delete it. But judging by the documentation, it seems relevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as seen in the changes for this file this functionality was replaced by the new template elementUniqueName. It is commented out and not deleted just in case someone will want to revert the changes made in this pull request

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as seen in the changes for this file this functionality was replaced by the new template elementUniqueName. It is commented out and not deleted just in case someone will want to revert the changes made in this pull request

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted

<xsl:sequence
select="
if (count($connectorsFound) > 0) then
f:generateHtmlError(fn:concat('The connector role name ', $targetRole, ' is used in other connectors.'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not tell where else is the connector name used (Source -> Target Classes)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. TBD

<!-- End of common checkers rules -->
<xsl:call-template name="elementUniqueName">
<xsl:with-param name="element" select="."/>
<xsl:with-param name="isAttribute" select="fn:false()"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"isAttribute" ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing documentation on this checker

<xsl:call-template name="objectUniqueName">

<!-- <xsl:call-template name="objectUniqueName">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete or uncomment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -145,7 +149,7 @@
</xsl:choose>
</xsl:template>

<xd:doc>
<!-- <xd:doc>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -63,6 +63,7 @@
<xsl:for-each select="$namespacePrefixes/*:prefixes/*:prefix/@importURI">
<owl:imports rdf:resource="{.}"/>
</xsl:for-each>
<owl:imports rdf:resource="{$coreArtefactURI}"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we have the correct variable name.
Here however we shall add also the "restrictions layer artefact".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@Dragos0000 Dragos0000 merged commit a8c1904 into master Jun 25, 2023
@Dragos0000 Dragos0000 deleted the feature/fixes branch June 25, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants