The flag value is "--validate", not "--validation", I'm guessing that's
the issue here.

Also, is it possible you're using an older version of Daffodil? With the
latest version (2.3.0), using --validation show the error message

  [error] Unknown option 'validation'

which is a little more helpful than the older "excess arguments" error.

I don't think we document anywhere the difference between
on/off/limited. We should probably take Mike's description and add it
the https://daffodil.apache.org/cli page

- Steve

On 4/17/19 6:46 AM, Costello, Roger L. wrote:
> Thanks a lot Mike, that is very helpful.
> 
> I have tried all the allowable values for the --validation flag and none of 
> them 
> work. That is, every value yields an “Excess arguments provided” error 
> message. 
> Is the --validation flag currently supported?
> 
> Is there documentation on the three values (on, off, limited) of the 
> --validation flag? I found the cli page, but it doesn’t define the meaning of 
> the three values. Of course, your post provides a good explanation of the 
> meaning of the three values, but I’m wondering if there is official 
> documentation that I can point people to?
> 
> /Roger
> 
> *From:* Beckerle, Mike <[email protected]>
> *Sent:* Tuesday, April 16, 2019 10:58 PM
> *To:* [email protected]
> *Subject:* Re: I can't get the --validation flag to work
> 
> The validation "on" is expensive. It serializes the data to XML then parses 
> the 
> XML using xerces with validation features on. This does full validation.
> 
> Validation limited is probably what you want. Daffodil does it's own facet 
> validation. At end of each element. It also validates max/minoccurs at end of 
> each array. The parser is generated from the schema and so always enforces 
> proper element tree structure.
> 
> Validation off ignores the facets and max/minoccurs for validation. Sometimes 
> parsing uses these, but often they are only for validation.
> 
> The above only applies to parsing.
> 
> Unparsing does no validation currently. But inherently, the schema is being 
> traversed as the info set is provided, so unparsing insures the data conforms 
> with the shape of the element tree, and unparsers need specific types in the 
> info set. So facets aren't validated, but types and element tree are being 
> enforced.
> 
> 
> Get Outlook for Android <https://aka.ms/ghei36>
> 
> --------------------------------------------------------------------------------
> 
> *From:*Costello, Roger L. <[email protected] <mailto:[email protected]>>
> *Sent:* Tuesday, April 16, 2019 9:33:16 AM
> *To:* [email protected] <mailto:[email protected]>
> *Subject:* I can't get the --validation flag to work
> 
> Hello DFDL community,
> 
> Question #1: If the --validation flag is not specified, what is its value 
> (on, 
> off, or limited)?
> 
> Question #2: What does --validation on mean? What does --validation off mean? 
> What does --validation limited mean?
> 
> Question #3: I ran Daffodil using the --validation flag and I got this error 
> message:
> 
> [error] Excess arguments provided: '-s label-message-v2.dfdl.xsd -r input 
> --validate on -o output/label-message-v2-with-erroneous-label.xml 
> input/label-message-with-erroneous-label.txt'
> 
> What am I doing wrong, please?
> 
> /Roger
> 

Reply via email to