Your result does not make sense, unless you used a stylesheet with version="2.0" and run it with an XSLT 1.0 processor or you used a stylesheet with version="1.0" and run it with an XSLT 2.0 processor supporting backwards compatible processing.
When I use Saxon 9, an XSLT 2.0 processor, with the input
Code:
<root>
<first name="level1" title="Small Business" alt="Small Business" link="/small-business.jsp">
<second name="level2" title="Products and Services" link="/products/small-business.jsp">
<three name="level3" title="Pickup" link="/business-commerical-pick-up/index.jsp"/>
<three name="level3" title="Dropoff" link="/dropoff.jsp"/>
</second>
</first>
<first title="Enterprise" link="/enterprise.jsp">
<second title="Solutions" link="/enterprise/index.jsp">
<three title="Constructions" link="/construction/index.jsp">
<forth title="C Solutions" link="/solutions/index.jsp"/>
</three>
<three title="Healthcare" link="/healthcare/index.jsp">
<forth title="Facility" link="/healthcare-facility-solutions/index.jsp"/>
<forth title="Community" link="/community-solutions.jsp"/>
</three>
</second>
</first>
</root>
the stylesheet
Code:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:template match="/">
<xsl:apply-templates select="//*[@title = 'Facility']"/>
</xsl:template>
<xsl:template match="*[@title]">
<xsl:value-of select="ancestor-or-self::*/@title" separator=" - "/>
</xsl:template>
</xsl:stylesheet>
the output is
Code:
Enterprise - Solutions - Healthcare - Facility