question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disabling schema validation on one specific file/project/workspace?

See original GitHub issue

Hello,

I am trying to edit an Oomphs Setup file using the XML editor rather than Oomphs own editor because it is faster for certain task (like copy/pasting P2 repositories).

The setup file contains more or less the following: notice the namespace and its location http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Workbench.ecore:

<?xml version="1.0" encoding="UTF-8"?>
<setup:Configuration
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    xmlns:workbench="http://www.eclipse.org/oomph/setup/workbench/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/workbench/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Workbench.ecore"
    label="Gael Eclipse Installation"> 
  <installation name="com.github.glhez.eclipse.install" label="Gael Eclipse Installation Installation">
    <setupTask xsi:type="setup.p2:P2Task" label="Oomph Setup Task">
      <requirement name="org.eclipse.oomph.setup.feature.group"/>
      <repository url="${oomph.update.url}"/>
    </setupTask> 
    <!-- a lot of stuff here -->
   </installation>
</setup:Configuration>

The XML Language Server, provided by Wild Web Developer XML tools (0.10.3.202011132012) in my fresh Eclipse 2020.12 (using Oomphs 😃) is reacting to the namespace with this particular error (whose Type is Language Servers in Eclipse Problems view):

schema_reference.4: Failed to read schema document ‘http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Workbench.ecore’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

The *.ecore file is effectively not a schema.

And since Xerces (?) can’t read the schema as a schema, then it fails due to missing types:

cvc-elt.1.a: Cannot find the declaration of element ‘setup:Configuration’. cvc-elt.4.2: Cannot resolve ‘setup:CompoundTask’ to a type definition for element ‘setupTask’.

This gives me 25 errors for one missing schema. And I loathe error in my code!

Disabling the XML Language Server is probably possible, but as far I tested, it does not work without restarting the IDE which is not something that I want:

  • I could have XML file that I want to validate
  • … and other like this one that I can’t validate
  • and beside validation, is the tooling the language server provides (refactor, completion, …)

I very would like a way to disable schema validation on this file, or its project, or when there is a schema validation error, that only one error is reported.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
fbriconcommented, Dec 22, 2020

As for disabling XML validation, "xml.validation.enabled": false is preference supported by LemMinX, but prolly not exposed by Wild Web Developer, which makes it a WWD issue.

0reactions
angelozerrcommented, Mar 26, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable schema validation in Hibernate for certain ...
Quite an old question but I thought this might help. Validation can be filtered by providing a custom org.hibernate.tool.schema.spi.
Read more >
Disable schema detection for certain files · Issue #245
First of all, great extension. It is really useful to have yaml files validated (and auto-completed). However, I have a file in my...
Read more >
Cannot disable JSON validation for single file : IDEA-303593
What steps will reproduce the issue? 1. enable JSON schema validation with schemastore support 2. create messages.json with an array
Read more >
Issue - WSP - Disabling Schema Validations - Forums
1. I have uploaded the WSDL and corresponding XSDs. 2. The WSP is UP and RUNNING. I could process the transactions. 3. We...
Read more >
Schema Validation on Confluent Server
Schema Validation enables the broker to verify that data produced to a Kafka topic is using a valid schema ID in Schema Registry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found