-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support completion with xs:any #177
Comments
Please provide sample files reproducing the issue. |
Also on the lower versions no validator is working |
How did you associate the xsd to the xml? file association setting? catalog? |
Ok, I can reproduce with
@NikolasKomonen something you could check? |
So I get completion under the root (most if not all elements), under the ActionBar element (ActionBar.actionItems), nothing under Page or ScrollView. Relates to eclipse-lemminx/lemminx#180 |
Just also noticed that validation works on the first tag/root tag but fails on the inner tags. |
@ehigiepaul could you please give us XML samples which doesn't work with completion and validation because in my case it works:
<Action | <-- here ActionBar is opened) <ActionBar>
| <-- here ActionBar.actionItems is opened
</ActionBar> <ActionBar>
<ActionBar.actionItems>
| <-- here ActionItem is opened
</ActionBar.actionItems>
</ActionBar>
|
For elements, yes it's normal (according XML Schema), there are only attributes for thoses elements (completion on attribute should work). |
Please kinld reverse to version 0.6.0 and run the xsd and see intellisense works well and validations work only on the root element. But on version 0.8.0 all fails. |
Could you please give us the case which doesnt work. Have you tested the
completion and validation case that i have explained below.is it working
for you?
Without a detailled use case it is difficult to reproduce your problem
Le ven. 9 août 2019 16:32, Paul Ehigie <notifications@github.com> a écrit :
… Please kinld reverse to version 0.6.0 and run the xsd and see it all works
well. But on version 0.8.0 all fails.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#177?email_source=notifications&email_token=AAOXXM5IMNKM7GZEENKT5ALQDV5YHA5CNFSM4IKIM6DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3627NA#issuecomment-519942068>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOXXMZBKDQ6RVTICT5ZIGLQDV5YHANCNFSM4IKIM6DA>
.
|
Here is the sample This is what i get on the current version 0.8.0 .
here is what i get on version 0.6.0.
|
Hi, I have the same problem with XML validation. VS Code Version: 1.36.1 XML to validate: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cpr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://www.dgai.de/cpr/schema/ev/cpr-ev-2.0.xsd">
<cprev>
<VERSION>2.0</VERSION>
<DATUM>2019-08-09</DATUM>
<STOKENN>stokenn001</STOKENN>
<EWZ>00000000</EWZ>
<PATID>000000000000000</PATID>
<PROTAR>01</PROTAR>
<GEBDAT>asd</GEBDAT>
<PATALTER>999:9999</PATALTER>
<EOKO>00</EOKO>
<PACER>06</PACER>
<FBSYSTEM>06</FBSYSTEM>
<AUTOCPR>06</AUTOCPR>
<NTECH>02</NTECH>
<ROSC>98</ROSC>
<KHAUF>98</KHAUF>
<KVEN>999</KVEN>
<NACHFNA>02</NACHFNA>
</cprev>
</cpr> There are numerous problems with the above XML:
But the extension does not recognize any of those XML validation errors. Please say if I can be of any further help. |
@ehigiepaul thanks for the demo i can reproduce it @skjardenCode please create à new issue with your xml validation problem |
@ehigiepaul since 0.8.0 completion show possible elements instead of showing all elements. See Your XML Schema is using <xs:complexType name="ContentView">
<xs:complexContent>
<xs:extension base="View">
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attributeGroup ref="contentViewAttributes" />
</xs:extension>
</xs:complexContent>
</xs:complexType> It is this case with xs:any which is not managed. I'm fixing it. For validation, it's because you are using @skjardenCode there is indeed a bug with your XML usecase, please create à new issue and I will fix it as soon as you will create the issue. |
@skjardenCode please see eclipse-lemminx/lemminx#553 for your problem which will be fixed by @NikolasKomonen |
@angelozerr thanks for the processContents fix for validation. Works fine. |
You are welcome!
Yes sure, I will work on that. But I think we should show all XML element declared in XML file when xs:any is used. I mean XML element coming from XML Schema and custom XML Element. For instance, if we have: <Page>
<a />
<ScrollView>
| <-- here completion must show Page, Scrollview, ContentView (from XML Schema) and <a /> (custom XML element) |
@angelozerr version report now after your quick xsd fix This is what i get on the current version 0.8.0 . here is what i get on version 0.6.0. I |
Any hope on the fix |
I'm working on this issue. |
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
See redhat-developer/vscode-xml#177 Signed-off-by: azerr <azerr@redhat.com>
Fixed with eclipse-lemminx/lemminx#559 |
Completion returns duplicates from already inserted elements from the xsd: Using https://github.com/redhat-developer/vscode-xml/files/3482737/sample.zip |
@fbricon good catch. Please review my PR eclipse-lemminx/lemminx#563 which fixes this duplicate issue. |
Fixed with eclipse-lemminx/lemminx#563 |
IMO, schema completion in |
I just noticed that the intellisense is broken in the latest version.
I had to reverse back to version 0.6.0 which works very well and also the validator fails too.
Please kindly review this issue and thanks for this nice extension.
The text was updated successfully, but these errors were encountered: