If both xml tags exist I only want the output of the transform to occur once. Is that possible?
xsl
<xsl:template match="latitude | longitude">
<generate_once>for both tags below</generate_once>
</xsl:template>
xml
<doc>
<latitude /><longitude />
</doc>
Will this template do the trick...?
<xsl:template match="latitude | longitude[not(../latitude)]">
<generate_once>for both tags below</generate_once>
</xsl:template>
This works by matching latitude
if it exists (regardless of whether there is a longitude
or not). It will only match longitude
if there is no latitude
though. So, in the case of both being present, only the latitude
is matched.