Liquibase XSD prevents custom schema to be fully validated

Description

steps
  1. use custom XML namespace for Liquibase extensions

  2. provide full XSD for your namespace

  3. write valid change declared in your namespace but with an invalid attribute

  4. write a non-existing change using your namespace

  5. use Eclipse and configure it so that it locates Liquibase's and your XSD files and correctly validates XML

expected
  • 2 validation errors

    • invalid attribute on a valid tag

    • invalid tag, i.e. a tag that does not existing within your namespace

observed
  • validation error about invalid attribute (good)

  • no validation error when invalid tag is used

notes

This seems to be caused by changes from CORE-898, i.e. the dbchangelog-3.1.xsd contains in several places, including <xsd:group name="changeSetChildren"> a line like this:

changing this to

fixes this issue.

I understand, however, that lines like this were added to support the http://www.liquibase.org/xml/ns/dbchangelog-ext namespace without any validation. Perhaps full solution would be to mention http://www.liquibase.org/xml/ns/dbchangelog-ext namespace with processContents="lax" or "skip" and have namespace="##other" with processContents="strict".

Environment

Eclipse

Activity

Show:
Out of Date

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created January 24, 2015 at 12:40 AM
Updated February 1, 2019 at 10:43 AM
Resolved February 1, 2019 at 10:43 AM