Giter Club home page Giter Club logo

Comments (8)

iuriemaxim avatar iuriemaxim commented on July 28, 2024

Actually the XML is considered Valid if the so called ”main schema” is the last one in the xsi:schemaLocation enumeration. For example if the first element is wfs:......., then Notepad++ will consider hat the main schema is http://www.opengis.net/wfs/2.0 as xmlns:wfs="http://www.opengis.net/wfs/2.0".

Notepad++ will consider the file being valid either:

  1. if the xsi:schemaLocation="http://www.opengis.net/wfs/2.0"
  2. or if the xsi:schemaLocation has http://www.opengis.net/wfs/2.0 at the end of the list, such as for example xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/ef/4.0 http://inspire.ec.europa.eu/schemas/ef/4.0/EnvironmentalMonitoringFacilities.xsd http://www.opengis.net/wfs/2.0".

This is quite sure odd and incorrect because:

  1. the location of the xsd schema for wfs was not supplied in the schema location list, as correct would be to provide the link to the xsd schema as well, such as for example: xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"
  2. there is no requirement to provide the location of the xsd schemas in a certain order, for example having the location of the wfs schema first or last. Both xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/ef/4.0 http://inspire.ec.europa.eu/schemas/ef/4.0/EnvironmentalMonitoringFacilities.xsd http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd" and xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://inspire.ec.europa.eu/schemas/ef/4.0 http://inspire.ec.europa.eu/schemas/ef/4.0/EnvironmentalMonitoringFacilities.xsd" are correct and the XML file should be valid if it validates against both XSD schemas and by those schemas that are imported by these two schemas.

Therefore, as currently implemented, Notepad++ can't be used to correctly validate an XML file.

from xmltools.

mostafa901 avatar mostafa901 commented on July 28, 2024

any luck with one, facing same issue too

from xmltools.

morbac avatar morbac commented on July 28, 2024

Hi,
Please can you just tell which version you're using ?
Is this better with xmltools 3 (MSXML-based) ?

from xmltools.

iuriemaxim avatar iuriemaxim commented on July 28, 2024

Hi,

This is the version used for the XML Tools Plugin.

image

This is the latest. No updates exist from October 2016 till now.
https://sourceforge.net/projects/npp-plugins/files/XML%20Tools/Xml%20Tools%202.4.9%20Unicode/

I did not tested with XML Tools 3 (https://github.com/morbac/xmltools/releases/tag/3.0.0), but thank you for sharing this information, as your release is quite new (27 days ago).

from xmltools.

morbac avatar morbac commented on July 28, 2024

Actually the sourceforge repo is outdated.
Please check for updates on the current github project.
Latest release is here: https://github.com/morbac/xmltools/releases/tag/3.0.3.2
This version will be available via Plugin Admin on next NPP release.

from xmltools.

iuriemaxim avatar iuriemaxim commented on July 28, 2024

Hi,

These were some error messages in XML Tools version 2.4.9.2 (October 2016), for a metadata file, each error being triggered depending on the order of the XSD schemas in the xsi:schemaLocation element.

If last is gmd.xsd (xsi:schemaLocation="http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd">) then the error is:
image

If last is srv.xsd (xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd">) then the error is

image

And this is the actual message in XML Tools version 3.0.3.2 (February 2020) as it does not depend on the schema order in the xsi:schemaLocation element.

image

Well done morbac!

from xmltools.

iuriemaxim avatar iuriemaxim commented on July 28, 2024

For another file, XML Tools version 2.4.9.2 provides the following error message if the last XSD schema in the xsi:schemaLocation element is not wfs.xsd

image

and no error is triggered in XML Tools version 2.4.9.2 if the last XSD schema in the xsi:schemaLocation element is wfs.xsd.
image

No error is triggered by XML Tools version 3.0.3.2 as it does not depends the order of the XSD schemas in the xsi:schemaLocation element.

image

from xmltools.

iuriemaxim avatar iuriemaxim commented on July 28, 2024

I think that this issue can be closed now.

from xmltools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.