Refactored is-chunk template as EXSLT function.