Hi Noah,
You wrote:
> If someone wrote in XQuery a function that required an argument of type
> "xs:string:", then static type checking could be used to prove that
> passing the (value of) a Publisher element would be ok.
Isn't static type checking done on the <Publisher> element in the XML instance document? Consider this XML instance:
<Publisher>Wrox Press</Publisher>
Static type checking determines whether the value in the <Publisher> element (Wrox Press) falls within its set of allowable values as specified by the associated XML Schema.
In XML Schema 1.1 the determination of the set of allowable values for <Publisher> may require looking in multiple places, e.g.,
<element name="Publisher" type="string" />
<assert test="string-length(.//Publisher) le 140" />
Thus, static type checking involves checking that the value of <Publisher> is not longer that 140 characters.
In other words, the data type of <Publisher> is not a string; it is a string that is constrained to less than or equal to 140 characters in length.
Yes?
/Roger