[oXygen-user] iso schematron reports cause validation failure

Tue Jul 17 15:12:08 CDT 2007

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
I couldn't find a very authoritative source for this, but these two articles
support it:

(The general intent is that /assert/ is used to detect errors, while /report/
can be used to report affirmative qualities of an instance.)

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.


More information about the oXygen-user mailing list