ZCML can include conditional directives of the form
<configure zcml:condition="installed some.python.package">
(conditional configuration directives)
</configure>
What is the expression syntax for condition? Is 'or' allowed?
(conditional configuration directives) " /> (conditional configuration directives) " /> (conditional configuration directives) "/>
I always have to look this up too. The syntax is very simple, and
oris not part of the syntax, I am afraid.As you can see from the documentation in the zope.configuration source code, the syntax is always of the form
verb arguments, where verb is one ofhave,not-have,installedandnot-installed.haveandnot-havetest for a registered feature. A registered feature is simply an opaque string that has been registered with a<meta:provides feature="something" />tag. Use it to flag that something has been included without tying it to a particular implementation. Example:installedandnot-installedsimply try to import the named package; if the import succeeds so does theinstalledtest. Example: