Opened 11 years ago

Last modified 9 years ago

#48 assigned defect

Make XML files require schema to validate

Reported by: ibboard Owned by:
Priority: minor Milestone: WarFoundry API 0.2
Component: WarFoundry-API Version: Unknown or N/A
Keywords: Cc:
Blocked By: Blocking:


If an XML schema is missing then the first file load currently fails because of the exception, even if it doesn't need the schema that is missing. Subsequent file loads that require the missing schema then load without a problem, despite missing one or more schemas.

How to recreate: Run the application without race.xsd. If the GameSystem file is loaded first then race.xsd won't be found and the GameSystem loading will be killed by an exception. The Race file will then load without a problem, despite it being the race.xsd that is missing.

What we should do:

  • Force the existence of schemas for namespaces (if possible)
  • Warn rather than exception when we have problems with loading a schema

Change History (7)

comment:1 Changed 11 years ago by ibboard

Status: newaccepted

comment:2 Changed 11 years ago by ibboard

(In r76) Re #48 - Require schemas to validate

  • Restructure schema caching so that it warns instead of exceptioning - allows a missing schema to not kill an unrelated file load
  • Fix exception handling for GameSystems while working out where exceptions were being caught

Current situation: Missing Race/System schema stops file loading but missing cat/core schema doesn't

comment:3 Changed 11 years ago by ibboard

If a proper solution can't be found then the next best thing may be to check handle each schema individually and exception if the core and cats schemas don't exist, then exception again each time we try to use them.

comment:4 Changed 11 years ago by ibboard

Milestone: WarFoundry 0.1WarFoundry 0.2

Postponing to WarFoundry 0.2 as it isn't an important issue as long as people have valid data.

comment:5 Changed 10 years ago by ibboard

Owner: ibboard deleted
Status: acceptedassigned

Releasing to queue as it isn't for the first milestone.

comment:6 Changed 9 years ago by ibboard

Milestone: WarFoundry 0.2WarFoundry API 0.2

Separate API milestone from UI milestone

comment:7 Changed 9 years ago by ibboard

Priority: majorminor
Version: Unknown or N/A

Lowering priority - people are unlikely to lose the schemas, and if they do then we just bail in more interesting and less structured ways if they have invalid files.

Note: See TracTickets for help on using tickets.