Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booleans written as "true" are not recognized even though this is valid according to the schema #18

Open
peersch opened this issue Jan 9, 2023 · 3 comments
Assignees

Comments

@peersch
Copy link

peersch commented Jan 9, 2023

According to the schema, for boolean values the type xs:boolean is used. The value space of sx:boolean is "true" and "false" together with "1" for true and "0" for false.
Currently, in parse_boolean, the value is only checked against "1" where it also should be checked against "true".

@fjes fjes self-assigned this Jan 9, 2023
@fjes
Copy link
Contributor

fjes commented Jan 9, 2023

Thank you for your report. According to ETG 2000 v1.0.13 the data type boolean has the allowed values 0 and 1. I will check if this definition is aligned with the xs:boolean definition.

@peersch
Copy link
Author

peersch commented Jan 9, 2023

I know, the v1.0.14 version I have says the values 0 and 1 are to use but then in the descriptive text they often refer to true and false (e.g. for Data/@AdaptAutomatically, there they explicitly show a @AdaptAutomatically = “true”).
In addition I have a couple of example ESI files downloaded from Beckhoff, there they use 'true' for examlple for Device/Mailbox/DataLinkLayer which is a boolean, too.
So for me it looks like are both styles are ok.

@fjes
Copy link
Contributor

fjes commented Jan 9, 2023

I will check with the Conformance Test Tool and some other checkers just to be sure the tools are working properly. The fix will likely be in the next release.

fjes added a commit that referenced this issue Mar 31, 2023
Eventually the conformance test will complain about the use of "true"
and "false" but the XML specification for xs:boolean is also valid. So
we just handle both cases.

Fixes Github Issue #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants