Skip to content

Commit

Permalink
add support true/false in Heta
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Mar 5, 2021
1 parent bc78a12 commit eaa525a
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
51 changes: 51 additions & 0 deletions cases/superexample-l2v4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,57 @@
</eventAssignment>
</listOfEventAssignments>
</event>
<event id="event4"> <!-- event with single true-->
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<true/>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="x1">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn> 12.2 </cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
<event id="event5"> <!-- event with single false -->
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<false/>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="x1">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn> 12.2 </cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
<event id="event5"> <!-- event with and or operators -->
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><and/>
<true/>
<apply><or/>
<apply><gt/>
<ci> S4 </ci>
<ci> S2 </ci>
</apply>
<false/>
</apply>
</apply>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="x1">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn> 12.2 </cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
</listOfEvents>
</model>
</sbml>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sbmlviewer",
"version": "0.2.7",
"version": "0.2.8",
"description": "The collection of transformation from SBML files into human readable formats",
"contributors": [
"Evgeny Metelkin",
Expand Down
10 changes: 10 additions & 0 deletions src/sbml-to-xhtml/sbml2heta.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,16 @@ Project-page: https://sv.insysbio.com, https://hetalang.insysbio.com
<xsl:value-of select="normalize-space(text())"/>
</xsl:template>

<!-- <true/> -->
<xsl:template match="mml:true">
<xsl:text>true</xsl:text>
</xsl:template>

<!-- <false/> -->
<xsl:template match="mml:false">
<xsl:text>false</xsl:text>
</xsl:template>

<!-- <cn> -->
<xsl:template match="mml:cn">
<xsl:value-of select="normalize-space(text()[1])"/>
Expand Down

0 comments on commit eaa525a

Please sign in to comment.