-
Notifications
You must be signed in to change notification settings - Fork 93
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
Highlight error for bad xsd file in xsi:schemaLocation with the xsd file range #782
Comments
I am interested on working on this. |
I couldn't recreate the issue with the provided example. In order to get the error message to show up, I had to explicitly reference an element from the second schema, and the element had to be in a valid location.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="https://www.w3schools.com"
xmlns="https://www.w3schools.com"
elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema> <note:note xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:note="https://www.w3schools.com"
xmlns:other="http://example.org/other"
xsi:schemaLocation="https://www.w3schools.com note.xsd http://example.org/other other.xsd">
<note:to></note:to>
<note:from></note:from>
<note:heading></note:heading>
<note:body>
<other:content></other:content>
</note:body>
</note:note> |
@datho7561 you are right my sample was bad, I updated it. |
datho7561
added a commit
to datho7561/lemminx
that referenced
this issue
Jun 22, 2020
When non-existent schemas are referenced using `xs:schemaLocation`, the location hint is now highlighted instead of the entire attribute value. Fixes eclipse-lemminx#782 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/lemminx
that referenced
this issue
Jun 23, 2020
When non-existent schemas are referenced using `xs:schemaLocation`, the location hint is now highlighted instead of the entire attribute value. Fixes eclipse-lemminx#782 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/lemminx
that referenced
this issue
Jun 23, 2020
When non-existent schemas are referenced using `xs:schemaLocation`, the location hint is now highlighted instead of the entire attribute value. Fixes eclipse-lemminx#782 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/lemminx
that referenced
this issue
Jun 23, 2020
When non-existent schemas are referenced using `xs:schemaLocation`, the location hint is now highlighted instead of the entire attribute value. Fixes eclipse-lemminx#782 Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr
pushed a commit
that referenced
this issue
Jun 23, 2020
When non-existent schemas are referenced using `xs:schemaLocation`, the location hint is now highlighted instead of the entire attribute value. Fixes #782 Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given this XML :
The
XXXXXXXXX.xsd
from xsi:schemaLocation="https://www.w3schools.com XXXXXXXXX.xsd" must be a highlighted as an error instead of the full attribute value.Pay attention that xsi:schemaLocation can contain several xsd .
@datho7561 are you interested to work on that since you have fixed #666
The text was updated successfully, but these errors were encountered: