Is the dbchangelog-2.0.xsd regex pattern invalid?

Hi


Using my favourite xml editor to edit my changelog xml file I get the following validation error:


  1. File http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd is not valid.
  2. [$]\{[\w\.]+\}

Am I correct and if so can we fix the xsd?

It does sound like the $ doesn’t need to be escaped. I removed the \ before the $ in the 2.0.xsd and 3.0.xsd locally. The change will be in the next release. Let me know if anyone sees a problem with


<xsd:pattern value="${[\w.]+}"/>


Nathan

I just stumbled on the same problem. While registering the schema in Jdevelopper it did not pass validation.

I also found the “proof” that your correction is valid:
http://www.w3.org/TR/xmlschema-0/#regexAppendix under the title “D regular Expressions” mentions

For this reason, the expression language does not contain the metacharacters ^ and $, although ^ is used to express exception, e.g. [^0-9]x. 

If $ is not a metacharacter (unlike in Perl) then it does not need a backslash.
When I copy the xsd as a file, remove the backslash in front of the dollar sign (line 9 col 37) and then import that, then the xsd is accepted by Jdeveloper.

So I think the simplest correction is
<xsd:pattern value=“${[\w.]+}”/>
There is no need to surround it in block-quotes. By definition [$] should be the same as just $

Does this pass you validator?

Hi,
I still get the validation problem when I use XMLSpy to validate against

http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd

Is there an update to the schema that we should be referencing or are we expected to make a (fixed) local copy of the schema? Nathan you mentioned that this would be fixed in the next release. Did you mean the next major release (i.e. 2.1)?

Thanks
Wilf