[Bug 1705] [FS] technical: 5.2 Module Declaration: cyclical imports

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





------- Comment #24 from mike@saxonica.com  2006-10-27 20:57 -------
Could you explain the problem in layman's terms? I can't see how rearranging
the variable declarations within a module can materially affect the static
context for a particular variable declaration. We have:

((DefaultNamespaceDecl | Setter | NamespaceDecl | Import) Separator)* ((VarDecl
| FunctionDecl | OptionDecl) Separator)*

which means that the only effect is that a variable is moved relative to
another variable, function, or option declaration. Option declarations don't
matter because they have no formal semantics. Variables don't matter because
rearranging the order of variables is the whole point. That leaves functions.
Variables can contain forwards references to functions, but functions can't
contain forwards references to variables. So we need to do the rearrangement in
such a way that references from functions to variables are validated before the
variables are rearranged. That seems to be all. I appreciate that it's much
easier to say this in English than in the formal notation of the spec, but it
doesn't look insuperable to me.

Michael Kay

Received on Friday, 27 October 2006 20:57:36 UTC