NASA-PDS / pds4-information-model

The software tools and data necessary for generating the Information Model including PDS4 ontology, data, and information model.
https://nasa-pds.github.io/pds4-information-model/
Other
9 stars 6 forks source link

LDDTool producing invalid XSD for Voyager LDD #744

Closed jordanpadams closed 1 month ago

jordanpadams commented 1 month ago

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

Generated LDD from ldd-vgr repo output invalid XSD

🕵️ Expected behavior

I expected valid XSD

📜 To Reproduce

lddtool -lpJ PDS4_VGR_IngestLDD.xml

Open XSD and notice it is invalid.

The element type "xs:documentation" must be terminated by the matching end-tag "</xs:documentation>".

🖥 Environment Info

Any

📚 Version of Software Used

v14.3.0

🩺 Test Data / Additional context

PDS4_VGR_IngestLDD.xml.txt

🦄 Related requirements

Blocking https://github.com/pds-data-dictionaries/ldd-vgr/pull/14

⚙️ Engineering Details

No response

I&T

TestRail Test ID: T8827949

jshughes commented 1 month ago

@jordanpadams Sorry, but I have not been able to reproduce the error.

The PDS4_VGR_IngestLDD.xml file referenced and downloaded from this issue contains the following definition:

filter_name
        ...
<definition>Optical filter used for the image.
Source Data Product Origin:  Keyword FILTER_NAME</definition>

LDDTool has been re-compiled from both my "main" after a pull, as well as my local JDK17 update branch. The results are consistently:

Optical filter used for the image. Source Data Product Origin: Keyword FILTER_NAME It is not clear where the offending text "For details see the documentation at ..." is coming from.
jordanpadams commented 1 month ago

@jshughes sorry for the confusion. ~That ingest LDD was used to generate the schema (XSD). The generated schema is where the bug is. The IngestLDD is valid.~ misread your original comment.

when you open the XSD in Oxygen, does it validate?

jordanpadams commented 1 month ago

Also, it looks like I was linking to the wrong LDD above. My apologies. The new one is on a branch associated with the pull request this is blocking. Sorry about that.

https://github.com/pds-data-dictionaries/ldd-vgr/blob/v1.0/src/PDS4_VGR_IngestLDD.xml

jshughes commented 1 month ago

@jordanpadams Found the problem. A quick fix is to add a blank after the last URL, before the tag, in the PDS4_VGR_IngestLDD.xml file. I will be fixing the code.

jordanpadams commented 1 month ago

Awesome. Thanks @jshughes . Sorry for the confusion