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

Test schemas have errors in use of namespaces

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s4
    • None
    • QA
    • None

      Many (all?) of our test schemas in the AA-BG tests are written in this style:

      <schema xmlns="http://www.ogf.org/dfdl/dfdl-1.0/XMLSchemaSubset"
      targetNamespace="http://example.com">

      <element name="foo" type="bar"/><Unable to render embedded object: File (-- Notice) not found.!! no prefix on name of the type. -->

      <complexType name="bar">
      <sequence/>
      </complexType>

      </schema>

      This is illegal. The "bar" reference should be interpreted as being to the XML schema namespace (actually our subset namespace specifically in the above).

      We aren't getting an error message here from our validator, but there's a separate bug for that.

      This bug is the fixing of the test schemas themselves.

      To fix this, we must edit all the example schemas (e.g., AA.dfdl.xsd - BG.dfdl.xsd) and change them to use a qualfied namespace for all internal references, adding a prefix definition that matches the target namespace.

      <schema xmlns="http://www.ogf.org/dfdl/dfdl-1.0/XMLSchemaSubset"
      targetNamespace="http://example.com"
      xmlns:tns="http://example.com"
      >

      <element name="foo" type="tns:bar"/><!-- Notice tns means "target namespace" -->

      <complexType name="bar">
      <sequence/>
      </complexType>

      </schema>

              pchu Paul Chu (Inactive)
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: