Skip to content

Conversation

@robyngit
Copy link
Member

This PR fixes the setSchema method in EML211. It now correctly sets (or appends) the xsi:schemaLocation in the eml doc to the editorSchemaLocation in AppModel. It was previously setting it to editorSchemaLocation PLUS editorSerializationFormat, resulting in 3 values for xsi:schemaLocation, making it invalid.

I also added unit tests for setSchemaLocation, including the case where an existing invalid schemaLocation already exists.

I also updated the method that creates new EML to use the setSchemaLocation method instead of than hardcoding the schemaLocation.

Fixes #1721

- It now correctly sets or appends the xsi:schemaLocation to the `editorSchemaLocation` in appModel, rather than both `editorSerializationFormat` AND `editorSchemaLocation`
- Add unit tests for setSchemaLocation
- Use setSchemaLocation when making new EML doc rather than hardcoding the schemaLocation

Fixes #1721
@rushirajnenuji rushirajnenuji merged commit 21bcd7d into develop Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

500 error when updating valid EML 2.1.1 documents with missing schemaLocation

3 participants