Exception: Call to a member function xsl() on null