Thanks, the muenchian method solved my problem.
<xsl:for-each select="INSURANCE_ITEMS/VEHICLE/XMLDOC_VEHICLE[count(. | key('cars-by-driver', REGULAR_DRIVER_DETAILS/DRIVER_NAME)[1]) = 2 and not(REGULAR_DRIVER_DETAILS/DRIVER_NAME = following-sibling::XMLDOC_VEHICLE/REGULAR_DRIVER_DETAILS/DRIVER_NAME )]">
<xsl:if test="position() != 1">
<xsl:value-of select="'; and '"/>
</xsl:if>
<xsl:if test="position() = 1">
<xsl:value-of select="'We note that '"/>
</xsl:if>
<xsl:value-of select="REGULAR_DRIVER_DETAILS/DRIVER_NAME"/>
<xsl:value-of select="' is noted as the regular driver on more than one vehicle: '"/>
<xsl:for-each select="key('cars-by-driver', REGULAR_DRIVER_DETAILS/DRIVER_NAME)">
<xsl:value-of select="VEH"/>
<xsl:choose>
<xsl:when test="position() < last() - 1">
<xsl:value-of select="', '"/>
</xsl:when>
<xsl:when test="position() = last() - 1">
<xsl:value-of select="' and '"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
<xsl:if test="position() = last()">
<xsl:value-of select="'. Remember: it is imperative that you supply the details of the correct regular driver, which is the individual who will be driving the vehicle most often in any monthly period, as the premium is calculated on the profile of that person.'"/>
</xsl:if>
</xsl:for-each>
using XML:
<INSURANCE_ITEMS>
<VEHICLE>
<XMLDOC_VEHICLE>
<VEH>POLO</VEH>
<REGULAR_DRIVER_DETAILS>
<DRIVER_NAME>SANNIE</DRIVER_NAME>
</REGULAR_DRIVER_DETAILS>
</XMLDOC_VEHICLE>
<XMLDOC_VEHICLE>
<VEH>HYUNDAI</VEH>
<REGULAR_DRIVER_DETAILS>
<DRIVER_NAME>SAREL</DRIVER_NAME>
</REGULAR_DRIVER_DETAILS>
</XMLDOC_VEHICLE>
<XMLDOC_VEHICLE>
<VEH>GOLF</VEH>
<REGULAR_DRIVER_DETAILS>
<DRIVER_NAME>SAM</DRIVER_NAME>
</REGULAR_DRIVER_DETAILS>
</XMLDOC_VEHICLE>
<XMLDOC_VEHICLE>
<VEH>MAZDA</VEH>
<REGULAR_DRIVER_DETAILS>
<DRIVER_NAME>SAM</DRIVER_NAME>
</REGULAR_DRIVER_DETAILS>
</XMLDOC_VEHICLE>
<XMLDOC_VEHICLE>
<VEH>BAKKIE</VEH>
<REGULAR_DRIVER_DETAILS>
<DRIVER_NAME>SAREL</DRIVER_NAME>
</REGULAR_DRIVER_DETAILS>
</XMLDOC_VEHICLE>
</VEHICLE>
</INSURANCE_ITEMS>
THE OUTPUT:
We note that SAM is noted as the regular driver on more than one vehicle: GOLF and MAZDA; and SAREL is noted as the regular driver on more than one vehicle: HYUNDAI and BAKKIE. Remember: it is imperative that you supply the details of the correct regular driver, which is the individual who will be driving the vehicle most often in any monthly period, as the premium is calculated on the profile of that person.