Skip to content

Commit

Permalink
bugfix/parse-missing-wavelength
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianWhitneyAI committed Dec 13, 2024
1 parent 621a051 commit d7e7f3c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions xslt/Instrument.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,22 @@ ome/ome.xsd: 979 # # This means that for more details on how this section of the
<xsl:template match="LightSources">
<xsl:for-each select="LightSource">
<xsl:choose>
<xsl:when test="LightSourceType/Laser">
<xsl:element name="ome:Laser">
<xsl:attribute name="ID">
<xsl:value-of select="@Id"/>
</xsl:attribute>
<xsl:when test="LightSourceType/Laser">
<xsl:element name="ome:Laser">
<xsl:attribute name="ID">
<xsl:text>LightSource:</xsl:text>
<xsl:value-of select="@Id"/>
</xsl:attribute>

<!-- Add Wavelength only if it's not empty -->
<xsl:if test="string(LightSourceType/Laser/Wavelength) != ''">
<xsl:attribute name="Wavelength">
<xsl:value-of select="LightSourceType/Laser/Wavelength"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsl:otherwise>
</xsl:if>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="ome:Filament">
<xsl:attribute name="ID">
<xsl:value-of select="@Id"/>
Expand Down

0 comments on commit d7e7f3c

Please sign in to comment.