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

XML attribute associated to wrong type from XSD #126998

Closed
Nerpson opened this issue Jun 23, 2021 · 3 comments
Closed

XML attribute associated to wrong type from XSD #126998

Nerpson opened this issue Jun 23, 2021 · 3 comments
Assignees

Comments

@Nerpson
Copy link

Nerpson commented Jun 23, 2021

Issue Type: Bug

I created an XML schema containing a complexElement with two attributes. The first one is just a simple string, the second one has a custom simpleType inheriting from string but having an additional minLength=1 restriction.

When trying this schema, the first attribute is wrongly associated to the second's custom type.

You can easily reproduce this issue with the linked ZIP archive. It contains a simple schema and an XML file using it and having the described issue.

VSCode_XSD_Bug.zip

In test.xml you'll see that two errors are highlighted where only one should exist, on the Some_Restricted_Value attribute.
image

The helper popup even tells the wrong type.
image

When writing a value in the restricted attribute, both of the errors disappear.
image

VS Code version: Code 1.57.1 (507ce72, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.82GB (16.19GB free)
Process Argv --crash-reporter-id 911c2726-6c6e-4a5a-ae4b-433ecadb690e
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30311713
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255cf:30323309
vscorehov:30309549
vscod805:30301674
pythonvspyt200:30324779
binariesv615cf:30323120
vsccppwt:30322536

@aeschli
Copy link
Contributor

aeschli commented Jun 24, 2021

The XML validation must come from an extension, as we don't provide that out-of-the-box.

Are you sure you have no extensions installed?

Maybe https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml ?

@aeschli aeschli closed this as completed Jun 24, 2021
@Nerpson
Copy link
Author

Nerpson commented Jun 24, 2021

Indeed, I disabled every extension to test it out but the "Reload required" was not shown to me for some reason. I'll redirect the issue to Red Hat.

@Nerpson
Copy link
Author

Nerpson commented Jun 24, 2021

See redhat-developer/vscode-xml#524 for people interested in this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants