You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Adams, Joshua" <ja...@tresys.com> on 2019/04/30 19:10:50 UTC

Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Sloane, Brandon" <bs...@tresys.com>.
In general, it is not possible to know at compile time if a choiceDispatchKey will evaluate to an empty string, so we do not have much choice but to accept processing error as "correct" for an empty string here.


Having said that, if we can prove at compile time that the choiceDispatchKey necessarily returns the empty string, I don't see any reason not to fail at compile time with an SDE.

________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10:50 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Beckerle, Mike" <mb...@tresys.com>.
Correct. Runtime SDE, same thing is true for delimiters. If they are "" at runtime that is an SDE.



________________________________
From: Sloane, Brandon <bs...@tresys.com>
Sent: Monday, May 20, 2019 11:11:58 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

The issue I am dealing with now is choiceDispathcKey="../branch", where ../branch is a valid path that that happens to contain the value of an empty-string at runtime. At a minimum, this needs to be a runtime schema definition error.

________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Monday, May 20, 2019 11:06:54 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Nevermind that response. I thought we were still on the changes for a default branch.


As for clarification that choiceDispatchKey="" is an SDE, I think that we should just assume this is SDE. That is the conservative design choice.

________________________________
From: Beckerle, Mike
Sent: Monday, May 20, 2019 11:04:39 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey


We are certainly not waiting for the DFDL Workgroup.


This would get consideration in a month or two once I write it up. There's lots of other proposals in flux as well.

________________________________
From: Sloane, Brandon <bs...@tresys.com>
Sent: Monday, May 20, 2019 10:41:19 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Ressurecting this thread, as this seems to be triggering a regression in the enum support PR.


Has the DFDL workgroup responded?



________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Tuesday, April 30, 2019 3:16:54 PM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Sloane, Brandon" <bs...@tresys.com>.
The issue I am dealing with now is choiceDispathcKey="../branch", where ../branch is a valid path that that happens to contain the value of an empty-string at runtime. At a minimum, this needs to be a runtime schema definition error.

________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Monday, May 20, 2019 11:06:54 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Nevermind that response. I thought we were still on the changes for a default branch.


As for clarification that choiceDispatchKey="" is an SDE, I think that we should just assume this is SDE. That is the conservative design choice.

________________________________
From: Beckerle, Mike
Sent: Monday, May 20, 2019 11:04:39 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey


We are certainly not waiting for the DFDL Workgroup.


This would get consideration in a month or two once I write it up. There's lots of other proposals in flux as well.

________________________________
From: Sloane, Brandon <bs...@tresys.com>
Sent: Monday, May 20, 2019 10:41:19 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Ressurecting this thread, as this seems to be triggering a regression in the enum support PR.


Has the DFDL workgroup responded?



________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Tuesday, April 30, 2019 3:16:54 PM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Beckerle, Mike" <mb...@tresys.com>.
Nevermind that response. I thought we were still on the changes for a default branch.


As for clarification that choiceDispatchKey="" is an SDE, I think that we should just assume this is SDE. That is the conservative design choice.

________________________________
From: Beckerle, Mike
Sent: Monday, May 20, 2019 11:04:39 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey


We are certainly not waiting for the DFDL Workgroup.


This would get consideration in a month or two once I write it up. There's lots of other proposals in flux as well.

________________________________
From: Sloane, Brandon <bs...@tresys.com>
Sent: Monday, May 20, 2019 10:41:19 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Ressurecting this thread, as this seems to be triggering a regression in the enum support PR.


Has the DFDL workgroup responded?



________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Tuesday, April 30, 2019 3:16:54 PM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Beckerle, Mike" <mb...@tresys.com>.
We are certainly not waiting for the DFDL Workgroup.


This would get consideration in a month or two once I write it up. There's lots of other proposals in flux as well.

________________________________
From: Sloane, Brandon <bs...@tresys.com>
Sent: Monday, May 20, 2019 10:41:19 AM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Ressurecting this thread, as this seems to be triggering a regression in the enum support PR.


Has the DFDL workgroup responded?



________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Tuesday, April 30, 2019 3:16:54 PM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Sloane, Brandon" <bs...@tresys.com>.
Ressurecting this thread, as this seems to be triggering a regression in the enum support PR.


Has the DFDL workgroup responded?



________________________________
From: Beckerle, Mike <mb...@tresys.com>
Sent: Tuesday, April 30, 2019 3:16:54 PM
To: dev@daffodil.apache.org
Subject: Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh

Re: Schema Definition Error vs Processing Error for empty choiceDispatchKey

Posted by "Beckerle, Mike" <mb...@tresys.com>.
I think a choiceDispatchKey that evaluates to an empty string should be an SDE, same as for a delimiter.

I raised this to the DFDL workgroup mailing list for clarification in the DFDL Spec.

...mikeb
________________________________
From: Adams, Joshua <ja...@tresys.com>
Sent: Tuesday, April 30, 2019 3:10 PM
To: dev@daffodil.apache.org
Subject: Schema Definition Error vs Processing Error for empty choiceDispatchKey

In working on DAFFODIL-2083 with empty string in delimiters, I made some changes that also effect choiceDispatchKey.  For delimiters it is a Schema Definition Error if an expression evaluates to an empty string.  We had originally been creating a Parse Error (although it was getting masked by an Assert check) and in changing it to produce an SDE it changed the error type for choiceDispatchKey.
The spec for choiceDispatchKey says "The expression must evaluate to an xs:string which must not be the empty string." but it doesn't say what kind of error an empty string should produce.  It later says that if the choiceDispatchkey does not one of the choiceBranchKeys it is a processing error.  So is it correct to do a processing error for a choiceDispatchKey that evaluates to an empty string?

Josh