[oXygen-user] iso schematron reports cause validation failure

George Cristian Bina
Mon Jul 23 02:51:34 CDT 2007


Hi Lars,

We added support for reporting report messages as warnings instead of 
errors. Thus if there are only report messages then the message will be 
validation successful instead if there were errors.
I created a patch (that includes also the diagnostics support):
http://www.oxygenxml.com/update/patchSchematronReports.jar

You need to place that in [oxygen]/lib/endorsed
Note that the folder may not exist, in that case you need to create it 
first.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina - http://aboutxml.blogspot.com/
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


lars wrote:
> Hello,
> I'm using Schematron to validate XML documents in Oxygen 8.2.
> 
> My Schematron schema includes "asserts" (as usual) and also "reports." When a
> "report" is triggered, the message is displayed by oxygen (as it should be),
> but Oxygen also says "Validation failed: n errors", which I think is
> incorrect.  My understanding from the Schematron spec is that "asserts" are
> for detecting validation errors, while reports are for giving the user neutral
> information.
> I couldn't find a very authoritative source for this, but these two articles
> support it:
> 
> http://www.xml.com/pub/a/2000/11/22/schematron.html?page=2
> (The general intent is that /assert/ is used to detect errors, while /report/
> can be used to report affirmative qualities of an instance.)
> 
> http://www.ldodds.com/papers/schematron_xsltuk.html#c35e2592b6b3
> While reports and asserts are effectively the inverse of one another, the
> intended uses of the two elements are quite different. An assert is used to
> test whether a document conforms to a particular schema, generating actions if
> deviations are encountered. A report is used to highlight features of the
> underlying data:
> 
> *Example 6. A simple report*
> 
>      <report test="not(roof)">This house does not have a roof</assert>
> 
> The distinction may seem subtle, especially when grapplying with a constraint
> which may be expressed simpler in one way or the other. However Schematron
> itself does not define the action which must be taken on a failed assert, or
> successful report, this is implementation specific. The default behaviour is
> to simply provide the user with the provided message. An implementation may
> choose to handle these two cases differently.
> 
> 
> So, it seems to me that when a "report" is triggered, oxygen should display
> the message but should not say that validation failed unless some "assert"s
> have failed.
> 
> Lars
> 
> 
> 
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list