<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:saxon="http://saxon.sf.net/"
    xmlns:my="myFunctions"
    extension-element-prefixes="saxon my"
    >
    <xsl:function name="my:merge"><xsl:param name="a"/><xsl:value-of select="$a"/></xsl:function>
    <xsl:template match="/">
    <results>
    <xsl:for-each select="//div[@class=' offer']">
        <search-result>
            <company><xsl:value-of select=".//div[@class='info']/span/a"/></company>
            <url><xsl:value-of select=".//div[@class='info']/span/a/@href"/></url>
            <verify><xsl:value-of select=".//div[@class='info']/span[2]"/></verify>
            <description><xsl:value-of select=".//div[@class='info']/span[3]"/></description>
            <type><xsl:value-of select=".//div[@class='info']/text()[string-length(normalize-space(.))>0]"/></type>
            <business><xsl:value-of select=".//div[@class='info']/span[4]"/></business>
        </search-result>
    </xsl:for-each>
    </results>
</xsl:template>
</xsl:stylesheet>
