Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-563

Namespace scope issues when a custom type shares a name with a built-in type.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: s10
    • Component/s: None
    • Labels:
      None

      Description

      I have a base schema (with targetNamespace) that includes Schema A (no namespace). Schema A imports the namespace "http://foo.com" from Schema B, and defines the prefix "foo" for use with that namespace.

      In Schema B, I define two simpleTypes. Both have the "xs:int" restriction base; one is named "string" and the other is named "stringy". Schema A defines two elements: "notAString" and "notAStringy". They are of type "foo:string" and "foo:stringy", respectively. The base Schema defines "root3" and "root4". root3 is a sequence of notAString elements, and root4 is a sequence of notAStringy elements.

      tests:
      namespace_ultra_uniqueness_03 (root3 as root)
      namespace_ultra_uniqueness_04 (root4 as root)

      The document in both tests is a non-numeric string and should fail.
      However, the test that uses "foo:string" is passing. It seems to think "foo:string" is the same as "xs:string". Nowhere do I assign the prefix "foo" to "http://www.w3.org/2001/XMLSchema", so I'm not sure what's happening.

      Tests are in the following files:

      1. new file: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_A_11_nons.dfdl.xsd
      2. new file: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_11.dfdl.xsd
      3. new file: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_base_11.dfdl.xsd
      4. modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/namespaces.tdml
      5. modified: daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section06/namespaces/TestNamespacesDebug.scala
      6. modified: daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section06/namespaces/TestNamespaces.scala

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jchab Jessie Chab
              Reporter:
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks