W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2003

RE: ORA-FO-FN-NAMES 1.6, 5.2

From: Michael Rys <mrys@microsoft.com>
Date: Wed, 30 Jul 2003 15:25:31 -0700
Message-ID: <EB0A327048144442AFB15FCE18DC96C7272D67@RED-MSG-31.redmond.corp.microsoft.com>
To: "Ashok Malhotra" <ashokma@microsoft.com>, "Stephen Buxton" <stephen.buxton@oracle.com>, <public-qt-comments@w3.org>


The static context rules clearly states that the constructor functions
are added to the static function environment. And we can only have one
function there of the same name. So it will be caught by the static


This can be inferred from the static processing part of the XQuery
language spec.


Best regards



-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Ashok Malhotra
Sent: Wednesday, July 30, 2003 2:46 PM
To: Stephen Buxton; public-qt-comments@w3.org
Subject: RE: ORA-FO-FN-NAMES 1.6, 5.2



Thank you for your comment:


This is a complicated question and I will try and give you a detailed
reply.  First I will argue that conflicts will not happen.

Then I will spell out what happens if they do.


Derived types are contained in a Schema.  The constructor for the
derived type will be referred to by the prefix for the

schema and the local name of the derived type e.g. mySchema:hatsize.  As
we decided today, functions defined in

the main module will be prefixed with local: and if defined in a module
by the prefix for the module.  So, unless the

user makes an error, it is very unlikely that a Schema and a module will
have the same prefix.


But what if the user does make an error and dynamically binds prefixes
to URIs and creates a my:hatsize constructor

and a my:hatsize function.  I do not know if this will be caught by
static type checking.  I doubt it.  Dynamically, when the

Query encounters my:hatsize, the prefix my: will be bound to some URI
and this will tell it what to execute.


If someone has a better story on how such an error can be caught I would
like to hear it.


All the best, Ashok 


From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Stephen Buxton
Sent: Monday, June 30, 2003 6:30 PM
To: public-qt-comments@w3.org
Subject: ORA-FO-FN-NAMES 1.6, 5.2


Functions and Operators, Section 1.6, 5.2 

Can I have a function of the same name as a derived simple type in the
same namespace? e.g. a hatsize() function? 

What are the override semantics if any?
Received on Wednesday, 30 July 2003 18:25:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:48 UTC