[Bug 3818] Static typing of $input-context1/works[1]/employee[1]/empnum[1]

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3818





------- Comment #4 from tim@cbcl.co.uk  2006-11-02 17:45 -------
If not, then a whole bunch of XQTS tests will fail static typing.

My reading of "treat as" is that its purpose is to ensure that its argument
type is at least a subtype of the specified type, i.e. a narrowing of the type
from type T to type S where T is a subtype of S.  Would there ever be any
reason to use "treat as" to broaden a type from type S to type T?

The use as a type narrower adds type information.  Use as a type broadener
throws away type information.  Is that ever helpful?

Received on Thursday, 2 November 2006 17:45:47 UTC