Liquibase XSD prevents custom schema to be fully validated
Description
steps
use custom XML namespace for Liquibase extensions
provide full XSD for your namespace
write valid change declared in your namespace but with an invalid attribute
write a non-existing change using your namespace
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:
steps
use custom XML namespace for Liquibase extensions
provide full XSD for your namespace
write valid change declared in your namespace but with an invalid attribute
write a non-existing change using your namespace
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 havenamespace="##other"
withprocessContents="strict"
.