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

Infoset Elements have target namespace prefix even if they are local elements with no namespace

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.0.0
    • s15
    • Middle "End"
    • None

      A schema with elementFormDefault="unqualified" (which is the default), the local elements have no namespace.

      Right now, every element in the infoset gets converted to XML having a namespace prefix for the target namespace, but this is not correct. For many elements (all local element decls when "unqualified"), they should not have a prefix, as they are in no namespace.

      The bug is that we are producing this:

      <tns:matrix>
          <tns:row><tns:col>5</tns:col></tns:row>
      </tns:matrix>

      when we should be producing this:

      <tns:matrix>
          <row><col>5</col></row>
      </tns:matrix>

      The fix to this is to carry not just the targetNamespace on the ElementRuntimeData, but the element's namespace, which is the namedQName.namespace.

      Also carry the element's namespace prefix.

      Then use these in the Infoset when creating XML, not the target namespace.

              efinnegan Elizabeth Finnegan
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: