functions with QName argument(s) in XPath

Is it possible to define an XPath function that takes type name or node
name as arguments, something along the lines of "Element Test" (which is a
built-in construct) in XPath.

If yes, wouldn't there be a conflict in interpreting the argument?

e.g. consider a hypothetical function "foo" that is intended to take a type
name as its second argument.
in /A/B/foo(C, myapp:Type1), would XPath semantics require that the second
argument be interpreted as being the child node of /A/B rather than a type
name?
I wonder if "Element Test" is designed as a built-in construct rather than
a function for this reason.

Any ideas?

Thanks,
Parag Tijare

Received on Tuesday, 30 August 2005 21:11:31 UTC