When I use setQuery(QUrl(file.xsl))
, then it works. But if I load the file into a QString
and call setQuery(theString)
, then subsequent evaluateTo()
fails (bool exception and empty result).
What can be wrong here?
Remarkable is that setFocus()
does work both with QUrl(file.xml)
and with QString
loaded from the file.
The reason is:
document('')
expression, with empty URL, to refer to the xsl itself;setQuery()
call;Except this case,
setQuery(QString)
is generally ok itself.