[Bug 14439] New: [XQuery 3.0] technical: is this a name clash?

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

           Summary: [XQuery 3.0] technical: is this a name clash?
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.0
        AssignedTo: jonathan.robie@gmail.com
        ReportedBy: jmdyck@ibiblio.org
         QAContact: public-qt-comments@w3.org


[Note that this issue could be filed against XQuery 1.0 or 3.0, or against
their respective test suites. Not sure which is best.]

Consider the query:
    main module:
        import module "NEAR";
        declare namespace far = "FAR";
        declare variable $far:v := "foo";
        $far:v

    library module:
        module namespace near = "NEAR";
        import module "FAR";

    library module:
        module namespace far = "FAR";
        declare variable $far:v := 42;
        declare variable $far:x := $far:v;

Note that the global variable name $"FAR":v is declared in two places with two
different values. I know of at least one XQuery implementation that claims this
is a static error (XQST0049), but I believe doing so is non-conformant, because
the two declarations do not "come into contact": there isn't a module that
declares/imports both.

If it doesn't raise an error, then it would be good to add this example to the
test suite(s).

If it does raise an error, then please point out the rules that cause this.

[This is an elaboration of the example in (member-only)
http://lists.w3.org/Archives/Member/w3c-xsl-query/2011Oct/0015.html]

-- 
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 Wednesday, 12 October 2011 20:55:51 UTC