April 25, 2017 at 9:59 pm #17134GuyPaddockParticipant
I was just running across some confusing results in a local branch off of OpenDJ, and was hoping that someone on the OpenDJ team can shed some light on a few things.
First, it looks like in OPENDJ-2774, several new XML files were added under
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config. But, if I am understanding things correctly, these new files do not validate properly against the schema defined by
opendj-maven-plugin/src/main/resources/config/stylesheets/admin.xsd. For example, if you open
opendj-maven-plugin/config/xml/org/forgerock/opendj/server/config/HTTPBasicAuthorizationMechanismConfiguration.xml(at revision 4c0475f), you’ll see that
adm:property-override, but according to the schema it’s supposed to sit between
adm:profile. This isn’t the only file with these issues — there’s at least a handful — which leads me to believe that the copy of the schema included in the repo is out-of-date or is no longer being followed.
Second, I noticed that in OpenDJ 3.0.0 the build included a step to validate the admin XML against the schema, but I don’t see any such step in the build after revision 2094606. What was the “legacy config”, and how does it relate to these new XML files? Is there a schema that these XML files are validated against? If not, what observable side effect is there if the XML is not valid (i.e. what feature(s) are affected at run-time?)?
April 26, 2017 at 12:37 pm #17144LudoModerator
- This topic was modified 4 years, 7 months ago by GuyPaddock. Reason: This post was "lost" by the forums and could not be reposted in entirety
Actually the XML schema validation was mostly removed when we introduced the opendj-maven-plugin module (and then fully removed with the commit you mention, but already most of the build was skipping the schema validation).
AFAIK, the XSLT parsing is more relaxed than schema validation and will work even though elements are not in the right order. The XML files are just used to generate code for the configuration framework (for client side and server side).
So there should be no impact on the features at runtime.
I hope this helps.
LudoApril 26, 2017 at 2:37 pm #17147GuyPaddockParticipant
Excellent, Ludo! Thanks.
Shame about the schema not really being applied now; it’s helpful when drafting XML for complex documents because the editor (Eclipse, IntelliJ, etc) can assist in making sure it’s valid.April 26, 2017 at 3:13 pm #17149LudoModerator
Schema is applied… but manually when editing in the IDE.
It seems that some of the coders that use Eclipse don’t have the schema validation enabled though.
I’ve scanned all XML files, and there are very few issues, mostly out of order. It’s trivial to fix them manually.
I’ll check with my colleagues if there’s a way to reenable schema validation at build time, but as I said, it’s not strictly needed.
You must be logged in to reply to this topic.