[Bug 1928] New: [XQuery] Recursive imports and fowards references

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1928

           Summary: [XQuery] Recursive imports and fowards references
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Transferred at the request of the WG from 1848:

It would be useful to clarify whether a module that imports
its own namespace is allowed to contain forwards references to its own global
variables. You can read the spec either way on this: on the one hand it says
forwards references to global variables aren't allowed; on the other hand it
says you can access all the global variables declared in a namespace that you've
imported.

It's a little odd if it isn't allowed: if cyclic references to variables are
allowed across modules, why not allow them within a module? It's also difficult
to explain (and implement!) that a module has access to all the global variables
in an imported namespace except those that are declared in the same module and
after the variable reference.

Proposal: if a module imports its own namespace, then all variables in that
namespace are in scope throughout the module, including within the entire module
where the variable is declared.

Michael Kay

Received on Wednesday, 31 August 2005 21:41:18 UTC