Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML-hul: SaxParseException Info still hidden in subMessage attribute #922

Closed
asciim0 opened this issue Apr 18, 2024 · 4 comments · Fixed by #943
Closed

XML-hul: SaxParseException Info still hidden in subMessage attribute #922

asciim0 opened this issue Apr 18, 2024 · 4 comments · Fixed by #943
Assignees
Labels
bug A product defect that needs fixing
Milestone

Comments

@asciim0
Copy link
Contributor

asciim0 commented Apr 18, 2024

I thought there already was an issue for this, but I can't find it anymore.

Back in JHOVE 1.24 the XML-HUL reported out the actual detail of SaxParser errors within the regular message value, e.g.:
<message subMessage="Line = 94, Column = 58" severity="error" id="XML-HUL-1">SaxParseException: cvc-attribute.3: The value '0017_DEFAULT' of attribute 'ID' on element 'METS:file' is not valid with respect to its type, 'ID'.</message>

With 1.26 this was changed to the detail being added to the subMessage attribute instead of to the value itself, e.g.:
<message subMessage="cvc-attribute.3: The value '0017_DEFAULT' of attribute 'ID' on element 'METS:file' is not valid with respect to its type, 'ID'. Line = 94, Column = 58." severity="error" id="XML-HUL-1">SAXParseException</message>

With 1.30 the behavior of 1.26 and subsequently 1.28 is continued. Is it possible to revert the message reporting back to what it was like in 1.24? The current reporting mechanism prohibits us from using rule-based validation error treatment where the rule in our system is based on the message value and not the subMessage attribute.

@samalloing
Copy link
Collaborator

Hi Micky,

You mean #634 I think

Sam

@asciim0
Copy link
Contributor Author

asciim0 commented Apr 18, 2024

yup. thanks for connecting it. so if it has been merged, why wasn't it rolled back as discussed in that issue?

@samalloing
Copy link
Collaborator

Hi Micky

You are looking for this #850 pull request I think

Sam

@asciim0
Copy link
Contributor Author

asciim0 commented Apr 19, 2024

Whichever it is, i'd love to see for it to be addressed ;-P
It was included in the 1.28 RLs as a fix:
"Reverted reporting of XmlParseExceptions so that exception detail is part of message body. [https://github.com//pull/850]"

@carlwilson - can you give an update on this?

@carlwilson carlwilson added this to the JHOVE 1.32 milestone Jul 11, 2024
@carlwilson carlwilson self-assigned this Aug 19, 2024
@carlwilson carlwilson added the bug A product defect that needs fixing label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A product defect that needs fixing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants