Question on schematron or really the new validator system generally.
Can I use both Daffodil's built in "limited" validation AND also use schematron
or other validation, or is it an either or?
I have a need to use both Limited validation AND would still like to also use
schematron.
It has to do with a strategy for error recovery
<choice>
<!-- first branch -->
.... first branch of choice is the data format
<!-- second branch is used for error recovery -->
<xs:element name="malformed" type="tns:invalidByte"/>
</choice>
<simpleType name="invalidByte" dfdl:representation="binary"
dfdl:lengthKind="implicit">
<restriction base="xs:unsignedByte">
<maxExclusive value="0"/> <!-- can never pass. Always will be invalid.
-->
</restriction>
</simpleType>
So if the data format can't be parsed (it's malformed), Daffodil will backtrack
to this malformed element which will consume 1 byte of data. And an infoset
containing these <malformed>N</malformed> elements will be considered
well-formed, but it will not pass validation checks that check the facet on the
invalidByte type.
So this validation will fail, indicating that the data contains "malformed"
elements explicitly. This validation isn't really about validation at all, it's
being used as part of recognizing malformed data but in a way that we can
recover from the error, and try to parse again, having consumed one byte.
Hence, I want this validation that is used to look for the elements that
indicate the data is malformed, but for "real" data validation I'd like to
also use schematron rules.
That's the motivation anyway.
________________________________
From: John Wass <[email protected]>
Sent: Wednesday, January 20, 2021 7:20 AM
To: apache/incubator-daffodil <[email protected]>
Cc: Beckerle, Mike <[email protected]>; Push
<[email protected]>
Subject: Re: [apache/incubator-daffodil] Embedded Schematron (#463)
@jw3<https://github.com/jw3> pushed 1 commit.
*
dfb3711<https://github.com/apache/incubator-daffodil/commit/dfb3711f1167173e4f31929e589d9d4ea4fce6cf>
Support embedding Schematron rules in DFDL schemas.
—
You are receiving this because you are subscribed to this thread.
View it on
GitHub<https://github.com/apache/incubator-daffodil/pull/463/files/bb6073d979f3334be10188bcc3d0d41cdaa2528f..dfb3711f1167173e4f31929e589d9d4ea4fce6cf>
or
unsubscribe<https://github.com/notifications/unsubscribe-auth/AALUDAZHQFNNJYWEWLHFQXTS23C7RANCNFSM4UBVTVAQ>.