-
Notifications
You must be signed in to change notification settings - Fork 26
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
[BUG] environment tag should be declared as "xs:element" instead of "xs:group" in AAS.xsd #457
Comments
Thanks, @MarcusVonBergen ! @s-heppner can you please double-check, maybe also with other teams? All the XSD engines I tested with (Python, C#) worked with the current schema. |
Hi @MarcusVonBergen, can you please tell me which XSD validator you used so that I can try to reproduce the issue? |
I do not know but perhaps this is also related to admin-shell-io/aas-test-engines#43? I also get an error when validating an xml file with the test engine |
I do not think this is connected to admin-shell-io/aas-test-engines#43, since it seems that the XML schema check passes on these files. |
We are using, for instance, https://www.freeformatter.com/xml-validator-xsd.html and the Visual Studio Code "XML" extension from Red Hat. |
Hi everyone,
I hope I could resolve unclarities. |
Previously we did not define `aas:environment` directly via an `xs:element` tag, rather only provided it directly as `xs:complexType`. This created issues with several XML Schema validator engines. This commit fixes this problem, discovered in #457.
I can confirm that there are XML Schema validators that need the root of an XSD to be an Therefore, I've adapted the XSD Schema file to include an @MarcusVonBergen could you please see if the new XSD schema fixes the problems you have? |
Previously we did not define `aas:environment` directly via an `xs:element` tag, rather only provided it directly as `xs:complexType`. This created issues with several XML Schema validator engines. This commit fixes this problem, discovered in #457.
When validating v3.0 AAS XML files against AAS.xsd I get the error that the tag environment is not declared. Digging deeper
the error is occurring because in the schema file (XSD), the tag "environment" is defined as an "xs:group" instead of "xs:element" which is supposed to be root. The root element of an XML document should always be defined as an "xs:element" in the XSD file like this in our example:
<xs:element name="environment">
Changing the XSD accordingly resolves my validation errors.
I attached the new XSD file (as txt as GitHub does not support xsd) with the ask to adjust the changes in the project.
AAS_xsd.txt
The text was updated successfully, but these errors were encountered: