functions with QName argument(s) in XPath

Parag Tijare <[email protected]> Tue, 30 Aug 2005 14:09:19 -0700
Newsgroups gmane.comp.web.query-languages
Message-ID <OFCF14B397.2C31454C-ON8825706D.006D35A6-8825706D.007435D7@us.ibm.com>



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