Build: #172 was successful Changes by Steve Lawrence

Build result summary

Details

Completed
Queue duration
< 1 second
Duration
25 minutes
Labels
None
Revision
c845e4cf62a5161fbae7a2d7ec34bd36b506537f
Total tests
3605
Successful since
#168 ()

Tests

  • 0 New failures
  • 0 Existing failures
  • 0 Fixed

Code commits

Author Commit Message Commit date
Steve Lawrence Steve Lawrence c845e4cf62a5161fbae7a2d7ec34bd36b506537f Write infosets with namespaces that the unparser expects
Before this change, some tests with complex namespaces would result in
an infoset that did not match what the unparse expected. These changes
fix that issue:

- Modify how minimized scope is calculated. The existing code was mostly
  correct, but missed some edge cases where the same namespace prefix
  was changed to a different namespaces by a child element. This
  happened most often with the default namespace (i.e. xmlns="foo").
  This patch adds support for detecting when these namesspace prefix
  changes happen (including default namespace changes) resulting in a
  correct minimized scope.

- Modify the toWriter methods of the InfosetImpl to perform pretty
  printing. This does not add whitespace inside of simple elements.
  It only adds indentation and newlines where it does not affect the
  data. Also replace uses of the PrettyPrinter in the debugger and
  runtime with the toWriter method. The PrettyPrinter tried to do some
  complex work to hide namespaces that were not necessary to show, but
  it didn't have all the necessary information (like parent namespace)
  and would sometimes create invalid namespaces. The InfosetImpl has
  all the necessary information, so it is much easier for it to just
  pretty print the infoset. Additionally, if someone wants a pretty
  string, this avoids create a Scala NodeSeq and then using a pretty
  printer to convert to a string.

- Remove the uniqueScope namespace binding variable. This didn't
  actually result in the correct namespace for the examples mentioned.
  Instead, a new method is added to create a string for the unique
  scope, based on the current scope and the parent scope. Unique scopes
  are just those that are in the current scope but not in the parent

DFDL-1555

Jira issues

IssueDescriptionStatus
Unknown Issue TypeDFDL-1555Could not obtain issue details from Jira