The dfdlParse function returns the XML infoset as a string and then uses the parse-xml() function to convert that to a node that the XSLT can work on. Rather than returning a string, the dfdlParse funtion should just directly return a node to avoid this string-to-node conversion.