Re: WD-xpath-functions-20030502: casting xs:QName

On Friday, November 7, 2003, at 01:19 PM, Kay, Michael wrote:

> > > This is certainly a good use case. However, it's
> > interesting that the
> > > argument to the xs:QName constructor is a string literal.
> > But actually
> > > any expression that yields a string can be used here.
> >
> > is there any difference in the capability offered by a function which
> > took the iri and local part as two distinct string data.
>
> I think there are two differences
>
> (a) there is an indirection: the binding of the prefix to the URI can 
> be changed at any time, in one place

i thought it was possible to define variables in these languages.

>
> (b) there is a convenience; the syntactic notation of 
> prefix:local-name is familiar and people are comfortable with it.

for forms which appear in encoded documents it makes perfect sense. for 
forms which are intended to be interpreted in a dynamic context that 
notation _makes _no_ sense_.

> >
> > there should be _no_ formal difference in terms of expressiveness
> > between binding an iri to a prefix and binding an iri to a variable.
> >
> I agree with that. We aren't talking about expressive power here, we 
> are talking about usability considerations.

i am glad to see that we now have that stated explicitly.

next question: how usable is an operator which does not close over the 
intended model?

>
> Michael Kay
>

Received on Sunday, 9 November 2003 19:23:13 UTC