Running xquery against non-document node?

Pascal Heus <[email protected]> Tue, 03 Jul 2012 11:11:06 -0400
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
Am trying to run a simple xquery statement such as
var1.execQuery("count(varCatgry)");
where var1 is a VarType (XmlObject) but am getting the following error
form Saxon:
net.sf.saxon.trans.XPathException: Source object represents a node other
than a document node
Can I only run a execQuery against a document?
This is with xmlbeans-xpath 2.5 and saxon-HE 9.4
thanks
*P