This is probably a really easy answer, but for the life of me I can't figure it out.
I want to display certain content depending on which child element is being displayed but I don't know how to test for the element I want. I want to see if the start, stop, and note elements exist
<xsl:template match="protocol[@id=$protocolNumber]">
<h4><xsl:value-of select="$sectionNumber"/>.<xsl:value-of select="@id"/> <xsl:value-of select="@title"/></h4>
<p>
<xsl:for-each select="child::*">
<xsl:choose>
<xsl:when test="start">
<span id="start"><xsl:value-of select="start[@level]" /></span>
</xsl:when>
<xsl:when test="stop">
<span id="stop"><xsl:value-of select="stop[@level]" /></span>
</xsl:when>
<xsl:when test="note">
<span id="note"><xsl:value-of select="note[@title]" />: <xsl:value-of select="note/text()" /></span>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()"/><br/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</p>
<protocol id="2" title="Post-Conversion Of VF / VT">
<note title="criteria">Post-conversion treatment of VF or VT should only be started if the patient has regained a pulse of adequate rate, and has a supraventricular rhythm. If not, refer to other cardiac protocols as appropriate. All antiarrhythmics are contraindicated if ventricular escape rhythm is present.</note>
<start level="All Levels"/>
<step>Routine medical care.</step>
<stop level="EMT"/>
<stop level="EMT-I"/>
<start level="EMT-CC & P"/>
<step>
If conversion results from defibrillation without any drug therapy:<br/><br/>
Amiodarone (Cordarone) 150 mg IV/IO Slow IV
</step>
<step>If Amiodarone was the drug resulting in conversion from VF/VT, no additional antiarrhythmic is required.</step>
<step>
If Lidocaine (Xylocaine) was the drug resulting in conversion from VF/VT:<br/><br/>
Repeat Lidocaine bolus 0.75 mg/kg IV/IO every 10 minutes up to a total cumulative dose of 3 mg/kg.
</step>
<step>If more than above listed doses are needed because of length of transport time, contact Medical Control.</step>
</protocol>