xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> select="document('')/*/xsl:template//element()[2]" /> Output: