Intent of 'declare function ... external'

Hi everyone,

I'm confused by 'declare function ... external'. A heap of questions:

* When is an 'external' declaration absolute required for achieving something? 
Is it something more than a 'hint' to the compiler? From what I can tell a 
compiler is required to do the same degree of type checking regardless of a 
'declare function ... external' declaration is in the prolog.

* Can someone show a use case for 'external'? XQTS has none, from what I can 
tell.

* Is there a pattern for when an 'external' declaration should be added, or is 
it implementation defined?

* If an 'external' declaration specifies a function that doesn't exist, 
shouldn't an error be raised?

* Is this a query that will evaluate to true?

	declare function subsequence($sourceSeq as item()*,
				     $startingLoc as xs:double) as item()* external;
	1 + 1"

Note, it doesn't define a function in the default namespace, it only declares 
it.


With my currently limited knowledge, my feeling is I would like to see the 
feature go away!


		Frans

Received on Wednesday, 1 March 2006 16:33:31 UTC