Skip to content

Commit

Permalink
Undo node class name changes in validation files
Browse files Browse the repository at this point in the history
  Addressing #658 (comment)
  • Loading branch information
msalihaltun committed Jun 7, 2021
1 parent 42d892c commit 734adfe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/resources/libsbgn-0.3.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@
<xsd:enumeration value="nucleic acid feature multimer"/>
<xsd:enumeration value="complex"/>
<xsd:enumeration value="complex multimer"/>
<xsd:enumeration value="empty set"/>
<xsd:enumeration value="source and sink"/>
<!-- Activities (AF) -->
<!-- perturbation is deprecated in AF as Activity Node in milestone 3. -->
<xsd:enumeration value="perturbation"/>
Expand Down
18 changes: 9 additions & 9 deletions templatelibsbgn.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<axsl:template match="sbgn:arc[@class='consumption']" priority="1000" mode="M8"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:arc[@class='consumption']"/><axsl:variable name="id" select="@id"/><axsl:variable name="source" select="@source"/><axsl:variable name="class" select="//sbgn:glyph[@id=$source]/@class"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test=" $class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='empty set'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='empty set'"><axsl:attribute name="id">pd10101</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class consumption must have source reference to glyph of EPN classes
<axsl:choose><axsl:when test=" $class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='source and sink'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='source and sink'"><axsl:attribute name="id">pd10101</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class consumption must have source reference to glyph of EPN classes
</svrl:text> <svrl:diagnostic-reference diagnostic="id">
<axsl:text/><axsl:value-of select="$id"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="source">
<axsl:text/><axsl:value-of select="$source"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="class">
Expand All @@ -98,10 +98,10 @@


<!--RULE -->
<axsl:template match="sbgn:glyph[@class='empty set']" priority="1000" mode="M10"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:glyph[@class='empty set']"/><axsl:variable name="id" select="@id"/><axsl:variable name="count" select="count(//sbgn:arc[(./@class = 'consumption') and (./@source = $id)])"/>
<axsl:template match="sbgn:glyph[@class='source and sink']" priority="1000" mode="M10"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:glyph[@class='source and sink']"/><axsl:variable name="id" select="@id"/><axsl:variable name="count" select="count(//sbgn:arc[(./@class = 'consumption') and (./@source = $id)])"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test="$count &lt;= 1"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$count &lt;= 1"><axsl:attribute name="id">pd10103</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>The empty set glyph can be connected to at most one consumption glyph
<axsl:choose><axsl:when test="$count &lt;= 1"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$count &lt;= 1"><axsl:attribute name="id">pd10103</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>The source and sink glyph can be connected to at most one consumption glyph
</svrl:text> <svrl:diagnostic-reference diagnostic="id">
<axsl:text/><axsl:value-of select="$id"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="count">
<axsl:text/><axsl:value-of select="$count"/><axsl:text/></svrl:diagnostic-reference></svrl:failed-assert></axsl:otherwise></axsl:choose><axsl:apply-templates select="*" mode="M10"/></axsl:template><axsl:template match="text()" priority="-1" mode="M10"/><axsl:template match="@*|node()" priority="-2" mode="M10"><axsl:apply-templates select="*" mode="M10"/></axsl:template>
Expand Down Expand Up @@ -139,7 +139,7 @@
<axsl:template match="sbgn:arc[@class='production']" priority="1000" mode="M13"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:arc[@class='production']"/><axsl:variable name="id" select="@id"/><axsl:variable name="target" select="@target"/><axsl:variable name="class" select="//sbgn:glyph[@id=$target]/@class"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test=" $class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='empty set'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='empty set'"><axsl:attribute name="id">pd10106</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class production must have target reference to glyph of EPN classes
<axsl:choose><axsl:when test=" $class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='source and sink'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='macromolecule' or $class='macromolecule multimer' or $class='simple chemical' or $class='unspecified entity' or $class='complex multimer' or $class='complex' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='source and sink'"><axsl:attribute name="id">pd10106</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class production must have target reference to glyph of EPN classes
</svrl:text> <svrl:diagnostic-reference diagnostic="id">
<axsl:text/><axsl:value-of select="$id"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="target">
<axsl:text/><axsl:value-of select="$target"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="class">
Expand All @@ -149,10 +149,10 @@


<!--RULE -->
<axsl:template match="sbgn:glyph[@class='empty set']" priority="1000" mode="M14"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:glyph[@class='empty set']"/><axsl:variable name="id" select="@id"/><axsl:variable name="count" select="count(//sbgn:arc[(./@class = 'production') and (./@target = $id)])"/>
<axsl:template match="sbgn:glyph[@class='source and sink']" priority="1000" mode="M14"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:glyph[@class='source and sink']"/><axsl:variable name="id" select="@id"/><axsl:variable name="count" select="count(//sbgn:arc[(./@class = 'production') and (./@target = $id)])"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test="$count &lt;= 1"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$count &lt;= 1"><axsl:attribute name="id">pd10107</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>The empty set glyph can be connected to at most one production glyph
<axsl:choose><axsl:when test="$count &lt;= 1"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$count &lt;= 1"><axsl:attribute name="id">pd10107</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>The source and sink glyph can be connected to at most one production glyph
</svrl:text> <svrl:diagnostic-reference diagnostic="id">
<axsl:text/><axsl:value-of select="$id"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="count">
<axsl:text/><axsl:value-of select="$count"/><axsl:text/></svrl:diagnostic-reference></svrl:failed-assert></axsl:otherwise></axsl:choose><axsl:apply-templates select="*" mode="M14"/></axsl:template><axsl:template match="text()" priority="-1" mode="M14"/><axsl:template match="@*|node()" priority="-2" mode="M14"><axsl:apply-templates select="*" mode="M14"/></axsl:template>
Expand Down Expand Up @@ -214,7 +214,7 @@


<!--RULE -->
<axsl:template match="sbgn:map/sbgn:glyph[(@class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'empty set' or @class = 'perturbing agent')]" priority="1000" mode="M19"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:map/sbgn:glyph[(@class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'empty set' or @class = 'perturbing agent')]"/><axsl:variable name="id" select="@id"/><axsl:variable name="compartment-count" select="count(//sbgn:glyph[@class='compartment'])"/>
<axsl:template match="sbgn:map/sbgn:glyph[(@class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'source and sink' or @class = 'perturbing agent')]" priority="1000" mode="M19"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:map/sbgn:glyph[(@class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'source and sink' or @class = 'perturbing agent')]"/><axsl:variable name="id" select="@id"/><axsl:variable name="compartment-count" select="count(//sbgn:glyph[@class='compartment'])"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test=" (($compartment-count = 0) and not (@compartmentRef)) or (($compartment-count &gt; 0) and @compartmentRef)"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(($compartment-count = 0) and not (@compartmentRef)) or (($compartment-count &gt; 0) and @compartmentRef)"><axsl:attribute name="id">pd10112</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>If there are compartments defined, top-level glyphs must have a compartment reference
Expand Down Expand Up @@ -267,7 +267,7 @@
<axsl:template match="sbgn:arc[@class='equivalence arc']" priority="1000" mode="M23"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="sbgn:arc[@class='equivalence arc']"/><axsl:variable name="id" select="@id"/><axsl:variable name="source" select="@source"/><axsl:variable name="class" select="//sbgn:glyph[@id=$source]/@class"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test=" $class='unspecified entity' or $class='simple chemical' or $class='macromolecule' or $class='macromolecule multimer' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='complex' or $class='complex multimer' or $class='empty set' or $class='perturbing agent'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='unspecified entity' or $class='simple chemical' or $class='macromolecule' or $class='macromolecule multimer' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='complex' or $class='complex multimer' or $class='empty set' or $class='perturbing agent'"><axsl:attribute name="id">pd10127</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class equivalence arc must have source reference to glyph of EPN classes
<axsl:choose><axsl:when test=" $class='unspecified entity' or $class='simple chemical' or $class='macromolecule' or $class='macromolecule multimer' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='complex' or $class='complex multimer' or $class='source and sink' or $class='perturbing agent'"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$class='unspecified entity' or $class='simple chemical' or $class='macromolecule' or $class='macromolecule multimer' or $class='nucleic acid feature' or $class='simple chemical multimer' or $class='nucleic acid feature multimer' or $class='complex' or $class='complex multimer' or $class='source and sink' or $class='perturbing agent'"><axsl:attribute name="id">pd10127</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>Arc with class equivalence arc must have source reference to glyph of EPN classes
</svrl:text> <svrl:diagnostic-reference diagnostic="id">
<axsl:text/><axsl:value-of select="$id"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="source">
<axsl:text/><axsl:value-of select="$source"/><axsl:text/></svrl:diagnostic-reference> <svrl:diagnostic-reference diagnostic="class">
Expand Down Expand Up @@ -301,7 +301,7 @@


<!--RULE -->
<axsl:template match="/sbgn:sbgn/sbgn:map/sbgn:glyph[ @class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'empty set' or @class = 'perturbing agent'] " priority="1000" mode="M27"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/sbgn:sbgn/sbgn:map/sbgn:glyph[ @class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'empty set' or @class = 'perturbing agent'] "/><axsl:variable name="id" select="@id"/><axsl:variable name="class" select="//sbgn:arc[@source = $id or @target = $id]/@class"/>
<axsl:template match="/sbgn:sbgn/sbgn:map/sbgn:glyph[ @class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'source and sink' or @class = 'perturbing agent'] " priority="1000" mode="M27"><svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/sbgn:sbgn/sbgn:map/sbgn:glyph[ @class = 'unspecified entity' or @class = 'simple chemical' or @class = 'macromolecule' or @class = 'nucleic acid feature' or @class = 'simple chemical multimer' or @class = 'macromolecule multimer' or @class = 'nucleic acid feature multimer' or @class = 'complex' or @class = 'complex multimer' or @class = 'source and sink' or @class = 'perturbing agent'] "/><axsl:variable name="id" select="@id"/><axsl:variable name="class" select="//sbgn:arc[@source = $id or @target = $id]/@class"/>

<!--ASSERT error-->
<axsl:choose><axsl:when test="//sbgn:arc[( @class = 'production' or @class = 'consumption' or @class = 'modulation' or @class = 'stimulation' or @class = 'catalysis' or @class = 'inhibition' or @class = 'necessary stimulation' or @class = 'logic arc' or @class = 'equivalence arc' or @class = 'production') and (@source = $id or @target = $id)]"/><axsl:otherwise><svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="//sbgn:arc[( @class = 'production' or @class = 'consumption' or @class = 'modulation' or @class = 'stimulation' or @class = 'catalysis' or @class = 'inhibition' or @class = 'necessary stimulation' or @class = 'logic arc' or @class = 'equivalence arc' or @class = 'production') and (@source = $id or @target = $id)]"><axsl:attribute name="id">pd10131</axsl:attribute><axsl:attribute name="role">error</axsl:attribute><axsl:attribute name="location"><axsl:apply-templates select="." mode="schematron-select-full-path"/></axsl:attribute><svrl:text>EPNs should not be orphaned (i.e. they must be associated with at least one arc)
Expand Down

0 comments on commit 734adfe

Please sign in to comment.