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

CLI: xmlns not properly minimized

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • CLI, Unparsing
    • None

      For file formats of interest, the infoset created from parse via the CLI does not match the expected infoset for unparse due to namespces. For example, the output infoset looks something like:

      <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="example.com">
          <child xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="example.com">
              <child xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="example.com">
                  ...
              </child>
          </child>
      </root>

      But unparse expects the infoset to look like

      <ex:root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ex="example.com">
          <child xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <child xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                  ...
              </child>
          </child>
      </ex:root>

      So all the child elements are in the example.com namespace, but unparse expects them all to not have a namespace. It is unclear if parse is outputing the wrong thing or if unparse is expecting the wrong thing.

      Also note that it seems unnessary to duplicate the xmlns:xsi attribute.

              dthompson David Thompson
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: