Thanks for letting us know. That's a bug if the mode argument isn't
optional. I've created DAFFODIL-2477 to track this issue:

https://issues.apache.org/jira/browse/DAFFODIL-2477

On 3/9/21 11:59 AM, Attila Horvath wrote:
> Specifying 'on', 'off', 'limited' works as you said but "--validate" by 
> itself 
> throws error (unless I misunderstood you):...
> 
>  >>> [error] Bad arguments for option 'validate': '' - you should provide 
> exactly one argument for this option
> 
> BTW - I'm using 3.0
> 
> On Tue, Mar 9, 2021 at 11:35 AM Steve Lawrence <slawre...@apache.org 
> <mailto:slawre...@apache.org>> wrote:
> 
>     By default, Daffodil CLI does not perform restriction checking. This can
>     be enabled with the --validate flag, which enables both Daffodil
>     validation during parse and Xerces schema validation when parse
>     completes. If you want just Daffodil's validation and no Xerces, you can
>     set validate to "limited". For example:
> 
>        # Daffodil validation + Xerces schema validation
>        daffodil parse -s input.xsd --validate ...
> 
>        # Daffodil validation only
>        daffodil parse -s input.xsd --validate=limited ...
> 
>     You can also specify "on" or "off" if you want to be explicit about it:
> 
>        # Same as just "--validate"
>        daffodil parse -s input.xsd --validate=on
> 
>        # Same as the daffodil CLI default
>        daffodil parse -s input.xsd --validate=off
> 
> 
> 
> 
>     On 3/9/21 11:25 AM, Attila Horvath wrote:
>      > All
>      >
>      > I'm attempting to invoke regex pattern validation against input file 
> with
>      > invalid content.
>      >
>      > My ~.dfdl.xsd snippet (left) w/ regex pattern on line #82 and invalid 
> input
>      > (right) line #2 where "...xyz..." is invalid data:...
>      > image.png
>      >
>      > I'm invoking daffodil as follows:
>      >
>      >  > daffodil parse -s input.xsd -r csv -DSeparator=\|,header=absent -o
>     out.xml
>      > input.txt
>      >
>      > Why is invalid data not flagged/caught? Daffodil's output as 
> follows:...
>      > image.png
>      >
>      > Thx
> 

Reply via email to