Le 28/04/15 12:09, Radovan Semancik a écrit : > Hi, > > I'm back to work on the API support for OpenLDAP an other servers. > I've explored the situation a bit. I still do not know what was the > original reason for the relaxed mode (does anyone know?). Yes !!
Let me explain : in Studio, and more specifically in the Schema Editor plugin, you want to let the user build a wrong schema (typically because you want to let them correct the schema on the fly). It's extremelly useful to be able to show the errors while the user is typing the schema, like any semantic editor. This is why we need the relaxed mode. > But it looks like if I make all the exceptions needed for processing > OpenLDAP schema into the relaxed mode then it is just too much. It > breaks the tests and I'm afraid that it may also break existing code > that relies on the API. > > It looks like we need more than just relaxed=true/false. I propose the > change from boolean isRelaxed in Registries (and related places) to > enum with three values: STRICT, RELAXED and LAX. Strict and relaxed > modes will be used as they are used today. The new lax mode will be > used for OpenLDAP and other dirty schemas. Where on OpenLDAP schema do you need a LAX mode ? AFAICT, we are able to parse all the OpenLDAP schemas in Strict mode... Also one clue about the whay the schemaManager processes schemas : - a first pass is done where we simple read all the schema elements, not controling any of the interdependence between them (for instance, if an OC is declared but not the used AT, then we accept the OC). - a second pass now check all the dependencies between all the schema elements. So to speak, this is the STRICT mode. Does it make sense ?
