- From: <bugzilla@jessica.w3.org>
- Date: Tue, 27 Apr 2010 18:25:57 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9600 Summary: [XQuery] Importing schema with a simple type conflicting with a function declaration. Product: XPath / XQuery / XSLT Version: Working drafts Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: XQuery 1.1 AssignedTo: jonathan.robie@redhat.com ReportedBy: oliver@cbcl.co.uk QAContact: public-qt-comments@w3.org Consider a schema in namespace "http://www.example.org/" that defines a type example:foo. Consider the following module, also in namespace "http://www.example.org/". declare module namespace example="http://www.example.org/"; declare function example:foo($x as item()) { $x } This function declaration is valid, as the schema has not been imported and there is no conflict with any in scope function. Now consider a query which imports both this module, and the schema: import module namespace example="http://www.example.org/"; import schema namespace example="http://www.example.org/"; example:foo(1) Clearly we have a problem here; does the example:foo function call refer to the constructor or the user defined function. Surely there should have been an error raised when importing the module/schema. The spec makes it quite clear (in section 4.17) that an XQST0034 error should be raised if the function was declared when the schema was in scope, although this is not the case here (as the schema was not imported in the module) The equivalent rules for this error when importing a module (section 4.12) state: It is a static error if the expanded QName and arity of a function declared in an imported module are respectively equal to the expanded QName and arity of a function declared in the importing module or in another imported module (even if the declarations are consistent) [err:XQST0034] Since the schema constructor is not "a function declared in the importing module or in another imported module" this does not hold either. I suggest that the above text should be modified to include also the case where "an imported function has arity 1 and has an expanded QName which is equal to the expanded QName of an atomic type defined in a schema imported by the importing module". -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 27 April 2010 18:26:36 UTC