I am using an XSL when clause to transform one XML file to another XML file. I need to use something like an "exists" function in my when test.
Here's an example source XML:
<People>
    <Person personid="1" location="US" fullname="John Doe"/>
    <Person personid="2" location="US" fullname="Jane Doe"/>
</People>
<Nicknames>
    <Nickname personid="1" nname="Johnny D"/>
</Nicknames>
Here's my example XSL:
  <xsl:element name="HASNICKNAME">
    <xsl:choose>
        <!-- If nickname exists in source XML, return true -->
      <xsl:when test="boolean exists function"
        <xsl:text>TRUE</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>FALSE</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:element>
Can someone help with the exists part?
 
    