<xsl:variable name="contactType" select="rt:resource('http://nwalsh.com/rdf/palm#Contact')"/> <xsl:variable name="allContacts" select="rt:twig(rt:find($rdf:type, $contactType),1)/twig:result"/> ... <xsl:for-each select="$allContacts"> <xsl:apply-templates select="rt:leaf(string(@rdf:about))" mode="Contact"/> </xsl:for-each>