Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Symptom

unable to validate configuration XML files, schema won't load

ERROR Message

Your XML editor or validation tool reports that it's unable to load schemas from a schema location like `xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/displayGroups.xsd"`

Solution

Delay your work and try again a bit later, or temporarily refer to local copies of the schema (see below)

The server serving the schema from a location like http://fews.wldelft.nl/schemas/version1.0/displayGroups.xsd may be temporarily unavailable, specifically during "patch Tuesday" (typically during a CET night on the first Tuesday of the month). Trying again after 30-60 minutes may resolve the issue.

If the work cannot wait, here's a number of ways of temporarily referring to local copies of the schema, for example for `xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/displayGroups.xsd"`:

  • Open `.\bin\Delft_FEWS_schemas.jar` with a .zip file manager (like 7-Zip) and put the schemas in a convenient local location (for example `C:\Temp\FEWS_schemas`) and change the reference to:
    • xsi:schemaLocation="http://www.wldelft.nl/fews file:///C:/Temp/FEWS_schemas/displayGroups.xsd"

      Advantage: may be the least complicated solution for some.
      Disadvantage: the changes to the schemalocation attributes need to be reverted later; some temporary files need to be created and cleaned up later.

  • Alternatively, refer directly to the schema in the jar, in place. For example, if the `Delft_FEWS_schemas.jar` is in `C:\FEWS\bin`:
    • xsi:schemaLocation="http://www.wldelft.nl/fews jar:file:/C:/FEWS/bin/Delft_FEWS_schemas.jar!/displayGroups.xsd"

      Advantage: no temporary files have to be created.
      Disadvantage: the changes to the `schemalocation` attributes need to be reverted later; it can be somewhat cumbersome to find the right XSD in the .jar file.

  • Or, if you have Python installed (or some other tool that allows a simple http server to be started) on a system other than Windows:
    • Unpack `./bin/Delft_FEWS_schemas.jar` to a folder, like in the first option.
    • Open a command prompt in that folder.
    • Run this command:
      • python -m http.server 80
        (Python 3.x)
    • Using a text editor, open `/etc/hosts`
    • Add the following line:
      • 127.0.0.1 fews.wldelft.nl

      NOTE: this blocks current and future access to the actual server at `fews.wldelft.nl` for all users on this machine, until the line added to the `hosts` file has been removed again; make absolutely certain this is not an issue.

      Advantage: all XML can be edited without changing the schemalocation attributes. This makes it a useful solution for changes to configurations on machines not connected to the internet as well.
      Disadvantage: the change to the network is rather radical and needs to be reverted later; some temporary files need to be created and cleaned up later; only works on non-Windows systems, due to limitations on using port 80.