You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Peter Kostouros <Pe...@awta.com.au> on 2020/07/28 00:21:12 UTC

Behaviour of setTunables and withTunables from V2.6.0 to V2.7.0 and V3.0.0 SNAPSHOT

Hi


I am using the JAVA API provided by Daffodil to process several documents and have found the behaviour of V2.7.0's (and V3.0.0 SNAPSHOT's)

org.apache.daffodil.japi.Compiler's withTunable method results in error with these documents, where V2.7.0's (and V3.0.0 SNAPSHOT's) Compiler's setTunable (deprecated) method worked as it did in V2.6.0.


Here is a snapshot of the JAVA code and errors when running the NACHA DFDLSchema example:


        Daffodil.setLoggingLevel(LogLevel.Info);
        Compiler c = Daffodil.compiler();
        c.setValidateDFDLSchemas(true); // Deprecated since v2.7.0

        c.withTunable("unqualifiedPathStepPolicy", "defaultNamespace");
        c.withTunable("suppressSchemaDefinitionWarnings", "multipleChoiceBranches noEmptyDefault");


Schema Definition Error: No element corresponding to step {}CCDEntryDetailRecord found. Possibilities for this step include: {ach:2013}CCDEntryDetailRecord, {ach:2013}CCDAddendaRecord, {ach:2013}ReturnsAddendaRecord, {ach:2013}DishonoredReturnsAddendaRecord, {ach:2013}ContestedDishonoredReturnsAddendaRecord.
Schema context: element reference {ach:2013}CCDEntry Location line 67 column 38 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Error: No element corresponding to step {}BatchHeaderRecord found. Possibilities for this step include: {ach:2013}BatchHeaderRecord, {ach:2013}CCDEntry, {ach:2013}CTXEntry, {ach:2013}PPDEntry, {ach:2013}ACKEntry, {ach:2013}ATXEntry, {ach:2013}BatchControlRecord.
Schema context: Batch Location line 55 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: sequence[5] Location line 185 column 22 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}IndividualName Location line 316 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Element with no empty representation. XSD default='' can only be used when unparsing.
Schema context: element reference {ach:2013}IndividualName Location line 316 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}DiscretionaryData Location line 318 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Element with no empty representation. XSD default='' can only be used when unparsing.
Schema context: element reference {ach:2013}DiscretionaryData Location line 318 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}CTXEntryDetailRecord Location line 201 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}BatchCount Location line 93 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}BatchControlRecord Location line 114 column 30 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}DishonoredReturnReasonCode Location line 553 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}AddendaRecordIndicator Location line 416 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: sequence[5] Location line 97 column 34 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd


Can anyone advise what I may be able to do to get the NACHA example to work, please?



Peter

This e-mail and any attachment is intended for the party to which it is addressed and may contain confidential information or be subject to professional privilege. Its transmission is not intended to place the contents into the public domain. If you have received this e-mail in error, please notify us immediately and delete the email and all copies. AWTA Ltd does not warrant that this e-mail is virus or error free. By opening this e-mail and any attachment the user assumes all responsibility for any loss or damage resulting from such action, whether or not caused by the negligence of AWTA Ltd. The contents of this e-mail and any attachments are subject to copyright and may not be reproduced, adapted or transmitted without the prior written permission of the copyright owner.

Re: Behaviour of setTunables and withTunables from V2.6.0 to V2.7.0 and V3.0.0 SNAPSHOT

Posted by Peter Kostouros <Pe...@awta.com.au>.
Thanks Claude.



Peter


________________________________
From: Claude Mamo <cl...@gmail.com>
Sent: Tuesday, July 28, 2020 3:27 PM
To: users@daffodil.apache.org
Subject: Re: Behaviour of setTunables and withTunables from V2.6.0 to V2.7.0 and V3.0.0 SNAPSHOT

Hi Peter,

withTunable(...) does a deep copy of Compiler and assigns the tunable to the new copy. Like this it will work:

c = c.withTunable("unqualifiedPathStepPolicy", "defaultNamespace")
c = c.withTunable("suppressSchemaDefinitionWarnings", "multipleChoiceBranches noEmptyDefault");

Claude

On Tue, Jul 28, 2020 at 2:21 AM Peter Kostouros <Pe...@awta.com.au>> wrote:
Hi


I am using the JAVA API provided by Daffodil to process several documents and have found the behaviour of V2.7.0's (and V3.0.0 SNAPSHOT's)

org.apache.daffodil.japi.Compiler's withTunable method results in error with these documents, where V2.7.0's (and V3.0.0 SNAPSHOT's) Compiler's setTunable (deprecated) method worked as it did in V2.6.0.


Here is a snapshot of the JAVA code and errors when running the NACHA DFDLSchema example:


        Daffodil.setLoggingLevel(LogLevel.Info);
        Compiler c = Daffodil.compiler();
        c.setValidateDFDLSchemas(true); // Deprecated since v2.7.0

        c.withTunable("unqualifiedPathStepPolicy", "defaultNamespace");
        c.withTunable("suppressSchemaDefinitionWarnings", "multipleChoiceBranches noEmptyDefault");


Schema Definition Error: No element corresponding to step {}CCDEntryDetailRecord found. Possibilities for this step include: {ach:2013}CCDEntryDetailRecord, {ach:2013}CCDAddendaRecord, {ach:2013}ReturnsAddendaRecord, {ach:2013}DishonoredReturnsAddendaRecord, {ach:2013}ContestedDishonoredReturnsAddendaRecord.
Schema context: element reference {ach:2013}CCDEntry Location line 67 column 38 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Error: No element corresponding to step {}BatchHeaderRecord found. Possibilities for this step include: {ach:2013}BatchHeaderRecord, {ach:2013}CCDEntry, {ach:2013}CTXEntry, {ach:2013}PPDEntry, {ach:2013}ACKEntry, {ach:2013}ATXEntry, {ach:2013}BatchControlRecord.
Schema context: Batch Location line 55 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: sequence[5] Location line 185 column 22 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}IndividualName Location line 316 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Element with no empty representation. XSD default='' can only be used when unparsing.
Schema context: element reference {ach:2013}IndividualName Location line 316 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}DiscretionaryData Location line 318 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Element with no empty representation. XSD default='' can only be used when unparsing.
Schema context: element reference {ach:2013}DiscretionaryData Location line 318 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}CTXEntryDetailRecord Location line 201 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}BatchCount Location line 93 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}BatchControlRecord Location line 114 column 30 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}DishonoredReturnReasonCode Location line 553 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: element reference {ach:2013}AddendaRecordIndicator Location line 416 column 18 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required but not defined, using 'replace' by default.
Schema context: sequence[5] Location line 97 column 34 in file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd


Can anyone advise what I may be able to do to get the NACHA example to work, please?



Peter

This e-mail and any attachment is intended for the party to which it is addressed and may contain confidential information or be subject to professional privilege. Its transmission is not intended to place the contents into the public domain. If you have received this e-mail in error, please notify us immediately and delete the email and all copies. AWTA Ltd does not warrant that this e-mail is virus or error free. By opening this e-mail and any attachment the user assumes all responsibility for any loss or damage resulting from such action, whether or not caused by the negligence of AWTA Ltd. The contents of this e-mail and any attachments are subject to copyright and may not be reproduced, adapted or transmitted without the prior written permission of the copyright owner.
This e-mail and any attachment is intended for the party to which it is addressed and may contain confidential information or be subject to professional privilege. Its transmission is not intended to place the contents into the public domain. If you have received this e-mail in error, please notify us immediately and delete the email and all copies. AWTA Ltd does not warrant that this e-mail is virus or error free. By opening this e-mail and any attachment the user assumes all responsibility for any loss or damage resulting from such action, whether or not caused by the negligence of AWTA Ltd. The contents of this e-mail and any attachments are subject to copyright and may not be reproduced, adapted or transmitted without the prior written permission of the copyright owner.

Re: Behaviour of setTunables and withTunables from V2.6.0 to V2.7.0 and V3.0.0 SNAPSHOT

Posted by Claude Mamo <cl...@gmail.com>.
Hi Peter,

withTunable(...) does a deep copy of Compiler and assigns the tunable to
the new copy. Like this it will work:

c = c.withTunable("unqualifiedPathStepPolicy", "defaultNamespace")
c = c.withTunable("suppressSchemaDefinitionWarnings",
"multipleChoiceBranches noEmptyDefault");

Claude

On Tue, Jul 28, 2020 at 2:21 AM Peter Kostouros <Pe...@awta.com.au>
wrote:

> Hi
>
>
> I am using the JAVA API provided by Daffodil to process several documents
> and have found the behaviour of V2.7.0's (and V3.0.0 SNAPSHOT's)
>
> org.apache.daffodil.japi.Compiler's withTunable method results in error
> with these documents, where V2.7.0's (and V3.0.0 SNAPSHOT's) Compiler's
> setTunable (deprecated) method worked as it did in V2.6.0.
>
>
> Here is a snapshot of the JAVA code and errors when running the NACHA
> DFDLSchema example:
>
>
>         Daffodil.setLoggingLevel(LogLevel.Info);
>         Compiler c = Daffodil.compiler();
>         c.setValidateDFDLSchemas(true); // Deprecated since v2.7.0
>
>         c.withTunable("unqualifiedPathStepPolicy", "defaultNamespace");
>         c.withTunable("suppressSchemaDefinitionWarnings",
> "multipleChoiceBranches noEmptyDefault");
>
>
> Schema Definition Error: No element corresponding to step
> {}CCDEntryDetailRecord found. Possibilities for this step include:
> {ach:2013}CCDEntryDetailRecord, {ach:2013}CCDAddendaRecord,
> {ach:2013}ReturnsAddendaRecord, {ach:2013}DishonoredReturnsAddendaRecord,
> {ach:2013}ContestedDishonoredReturnsAddendaRecord.
> Schema context: element reference {ach:2013}CCDEntry Location line 67
> column 38 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
> Schema Definition Error: No element corresponding to step
> {}BatchHeaderRecord found. Possibilities for this step include:
> {ach:2013}BatchHeaderRecord, {ach:2013}CCDEntry, {ach:2013}CTXEntry,
> {ach:2013}PPDEntry, {ach:2013}ACKEntry, {ach:2013}ATXEntry,
> {ach:2013}BatchControlRecord.
> Schema context: Batch Location line 55 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: sequence[5] Location line 185 column 22 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}IndividualName Location line
> 316 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Element with no empty representation. XSD
> default='' can only be used when unparsing.
> Schema context: element reference {ach:2013}IndividualName Location line
> 316 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}DiscretionaryData Location
> line 318 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Element with no empty representation. XSD
> default='' can only be used when unparsing.
> Schema context: element reference {ach:2013}DiscretionaryData Location
> line 318 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}CTXEntryDetailRecord Location
> line 201 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}BatchCount Location line 93
> column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}BatchControlRecord Location
> line 114 column 30 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}DishonoredReturnReasonCode
> Location line 553 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: element reference {ach:2013}AddendaRecordIndicator
> Location line 416 column 18 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_records.xsd
> Schema Definition Warning: Property 'dfdl:encodingErrorPolicy' is required
> but not defined, using 'replace' by default.
> Schema context: sequence[5] Location line 97 column 34 in
> file:/home/peter/NetBeansProjects/JED/DFDLSchemas/NACHA/2013/nacha_file.xsd
>
>
> Can anyone advise what I may be able to do to get the NACHA example to
> work, please?
>
>
>
> Peter
>
> This e-mail and any attachment is intended for the party to which it is
> addressed and may contain confidential information or be subject to
> professional privilege. Its transmission is not intended to place the
> contents into the public domain. If you have received this e-mail in error,
> please notify us immediately and delete the email and all copies. AWTA Ltd
> does not warrant that this e-mail is virus or error free. By opening this
> e-mail and any attachment the user assumes all responsibility for any loss
> or damage resulting from such action, whether or not caused by the
> negligence of AWTA Ltd. The contents of this e-mail and any attachments are
> subject to copyright and may not be reproduced, adapted or transmitted
> without the prior written permission of the copyright owner.
>