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

turn lsp4xml cache on by default #67

Closed
fbricon opened this issue Oct 28, 2018 · 5 comments
Closed

turn lsp4xml cache on by default #67

fbricon opened this issue Oct 28, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fbricon
Copy link
Collaborator

fbricon commented Oct 28, 2018

Need to set "xml.useCache":true in the extension preferences. See eclipse-lemminx/lemminx#159

@fbricon fbricon added the enhancement New feature or request label Oct 28, 2018
@fbricon fbricon added this to the 0.2.0 milestone Oct 28, 2018
@angelozerr
Copy link
Contributor

@fridex I have set it as default in server side, see eclipse-lemminx/lemminx@db41997

@fridex
Copy link

fridex commented Oct 28, 2018

@angelozerr wrong nick? :)

@angelozerr
Copy link
Contributor

Sorry @fridex -( with my mistake.

@fbricon I have set it as default in server side, see eclipse-lemminx/lemminx@db41997

@fbricon
Copy link
Collaborator Author

fbricon commented Oct 29, 2018

@angelozerr I don't see anything downloaded/cached when opening an actual schema:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="property">
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="value" type="xs:string" />
    </xs:complexType>

    <xs:complexType name="resource">
        <xs:sequence>
            <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required" />
    </xs:complexType>

    <xs:element name="resources">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="resource" type="resource" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="variant" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
</xs:schema>

@angelozerr
Copy link
Contributor

@angelozerr I don't see anything downloaded/cached when opening an actual schema:

Yes it's normal. The cache download is done when Xerces XMLEntityResolver#resolveEntity is done.

This resolveEntity method is called when:

  • XML Schema uses import (not in your case of resource.xsd)
  • XML declares use of XML Schema with xsi:schemaLocation or xsi:noNamespaceSchemaLocation which have uri which start with http or ftp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants