jhove icon indicating copy to clipboard operation
jhove copied to clipboard

XML-hul: SaxParseException Info still hidden in subMessage attribute

Open asciim0 opened this issue 10 months ago • 4 comments

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.

asciim0 avatar Apr 18 '24 13:04 asciim0

Hi Micky,

You mean https://github.com/openpreserve/jhove/pull/634 I think

Sam

samalloing avatar Apr 18 '24 14:04 samalloing

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

asciim0 avatar Apr 18 '24 14:04 asciim0

Hi Micky

You are looking for this https://github.com/openpreserve/jhove/pull/850 pull request I think

Sam

samalloing avatar Apr 18 '24 15:04 samalloing

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/openpreserve/jhove/pull/850]"

@carlwilson - can you give an update on this?

asciim0 avatar Apr 19 '24 13:04 asciim0