Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#595 closed defect (fixed)

Empty <SASprocess> will cause loading of Cansas XML file to fail

Reported by: smk78 Owned by: krzywon
Priority: critical Milestone: SasView 4.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The presence of either: just <SASprocess/> or <SASprocess></SASprocess> will cause the loading of Cansas xml files to fail. Seems to be SASprocess specific as <SAScollimation/> is handled ok.

Change History (5)

comment:1 Changed 3 years ago by krzywon

  • Resolution set to invalid
  • Status changed from new to closed

An empty SASprocess does not meet the Cansas specification. At least 1 SASprocessnote element must be present. An empty SASprocessnote within a SASprocess element would be valid.

http://www.cansas.org/formats/canSAS1d/1.1/doc/element_SASprocess.html

comment:2 Changed 3 years ago by krzywon

  • Resolution invalid deleted
  • Status changed from closed to reopened

This brings up a question. What should we do with data that doesn't fully meet the spec. I don't think immediately rejecting the data is the right way to go, but a warning or popup of some sort would be useful and continue to attempt to load the data. I am reopening this ticket for now.

comment:3 Changed 3 years ago by krzywon

  • Owner set to krzywon
  • Status changed from reopened to accepted

comment:4 Changed 3 years ago by krzywon

  • Resolution set to fixed
  • Status changed from accepted to closed

I modified the XML reader to attempt to load data that does not exactly match the Cansas v1.x format. If the data does not match the format, an error is thrown explaining where the XML is invalid, but the loader continues to try and load as much of the data as possible.

comment:5 Changed 3 years ago by smk78

This seems to work. I just loaded an XML file with no SAScollimation element and the popup told me so! I ok'ed the box and the data appeared in SasView and plotted.

Note: See TracTickets for help on using tickets.