Closed NEKolev closed 2 years ago
@JustAGabriel FYI
@JustAGabriel @veler is a correction planned in the near future?
Hi @NikolayEKolev I will look into this!
Alright, I am done with the investigation - the xsd<>xml validation logic is working fine.
The general thing missing in my opinion is a better logging/display of a warning for namespace inconsistencies.
Exemplary scenario: trying to validate a xsd that explicitly defines a namespace with a xml that is missing the namespace. Desired result: warning that the xml is missing a reference/define the according namespace and the validation result therefore will always be true.
I am currently working on a solution. Though the solution does not aim to implement a option to automatically adjust/add namespaces within the validation scope.
PR will be created mid/end of next week.
I am currently working on a solution. Though the solution does not aim to implement a option to automatically adjust/add namespaces within the validation scope.
Is there an option to implement an automatic mechanism for namespace inconsistencies with a warning that the original file will be changed?
In general for sure. But I simply don't see the need nor the demand for it.
Create a feature request, get some up votes and prove me wrong 🙂
In general for sure. But I simply don't see the need nor the demand for it.
Create a feature request, get some up votes and prove me wrong 🙂
I guess the question is whether to ask to modify the file. If this is what you are talking about, there is no need to create a new FR. I think in XMLSpy it asks that's why I wrote it :)
I can prepare another schematic and file for testing.
Description
XML Validator doesn't work (xml is always valid) if you don't add the path to the xsd schema in the xml file. A program like XMLSpy when validating against a schema asks if it should modify the xml file and adds the path to the xsd schema in the xml file itself.
Steps To Reproduce
Go to the XML Validator When the check doesn't work
<cpFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nhif.bg/xsd/hosp/cp file:///E:\TestXML/Schema.xsd" xmlns="http://nhif.bg/xsd/hosp/cp">
It is now apparent that the xml is not validating according to the schema.
Expected behavior
Changing the xml file is done automatically for the check to work properly.
DevToys Version
Version 1.0.9.0 | X64 | RELEASE | 8bcfa60 | 8bcfa60
Relevant Assets/Logs
TestXML.zip