The constructor functions, xs:type(string), attempt to construct the typed value from the lexical form provided.
The as attribute asserts that the value must have the required type. It performs simple type promotions but doesn’t, for example, implicitly cast as the requested type.