W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2011

[Bug 12173] Do we need [err:XQST0036] in-scope schema definitions of the importing module?

From: <bugzilla@jessica.w3.org>
Date: Tue, 01 Mar 2011 19:53:22 +0000
To: public-qt-comments@w3.org
Message-Id: <E1PuVdK-0006H7-NL@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12173

Jonathan Robie <jonathan.robie@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from Jonathan Robie <jonathan.robie@redhat.com> 2011-03-01 19:53:21 UTC ---
The following examples replace the paragraph in the <changeme/> of the previous
comment:


A module import does not import schema definitions from the imported
module. In the following query, the type geometry:triangle is not
defined, even if it is known in the imported module, so the variable
declaration raises an error <errorref class="ST" code="0051"/>:

  import module namespace math = "http://example.org/math-functions";
  declare variable $t as geometry:triangle := geometry:make-triangle();

  $t

Without the type declaration for the variable, the variable
declaration succeeds:

  import module namespace math = "http://example.org/math-functions";
  declare variable $t := geometry:make-triangle();

  $t

Importing the schema that defines the type of the variable, the
variable declaration succeeds:

  import schema namespace geo = "http://example.org/math-schema-declarations";
  import module namespace math = "http://example.org/math-functions";
  declare variable $t as geometry:triangle := geometry:make-triangle();

  $t

-- 
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, 1 March 2011 19:53:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:34 UTC