CIRDLES / Squid

Squid3 is being developed by the Cyber Infrastructure Research and Development Lab for the Earth Sciences (CIRDLES.org) at the College of Charleston, Charleston, SC and Geoscience Australia as a re-implementation in Java of Ken Ludwig's Squid 2.5. - please contribute your expertise!
http://cirdles.org/projects/squid/
Apache License 2.0
12 stars 24 forks source link

Loading XML file issue #754

Closed AllenKennedy closed 1 year ago

AllenKennedy commented 1 year ago

The latest SHRIMP software produces an XML file with additional variables. SQUID 3 gives an error

Screen Shot 2023-10-23 at 12 29 36 pm

There is extra data in the XML file for each run...such as

AllenKennedy commented 1 year ago

PS The OP file works in SQUID3

bowring commented 1 year ago

Yes! If possible supply a copy of the new SHRIMP schema file - it ends in “.xsd”

sbodorkos commented 1 year ago

Hi Jim @bowring it seems the SHRIMP control software doesn't write .XSD alongside .XML, I think this is one of the reasons XML-versions have been such a persistent problem. Not sure what to suggest, other than the parser ignoring fields it doesn't understand...

peter-lanc commented 1 year ago

Sorry I have had no need for XSD. Do you have one at the moment that you use with SQUID3?

peter-lanc commented 1 year ago

Found it here, I can see it has gone through some revision for SHRIMP software updates in the past. Last being 4 years ago. Is this the way forward? Revise the schema file when we add new data to the SHRIMP XML data file? Is this something you'd like me to do or maintain another XSD file together with the .XML coming from the SHRIMP? Or will as you have until now maintain/revise the XSD Jim?

peter-lanc commented 1 year ago

I have now modified your XSD to validate against the latest SHRIMP data file. Attached. Note I have simplified the namespace definitions to be validated from: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://raw.githubusercontent.com" xmlns="https://raw.githubusercontent.com">

to: Also had to change the SHRIMP XML datafile schema definition as shrimp.anu.edu.au does not exist anymore. I will make those changes to SHRIMP data file permanent in the SHRIMP software. SHRIMP SW v4.0 SHR SI In any case, after those header changes and adding the missing data definitions to the XSD, the data file passes validation against attached schema. [SHRIMP_PRAWN mod Peter Lanc 2023-10-25.zip](https://github.com/CIRDLES/Squid/files/13129855/SHRIMP_PRAWN.mod.Peter.Lanc.2023-10-25.zip)
bowring commented 1 year ago

@peter-lanc - Great! Thanks for contributing. - @bowring