Issue with ValidationProblemsFilter
Posted: Fri Jan 07, 2022 6:07 pm
Hello,
We work with the version 24.0.0 of Oxygen sdk.
We need to check the xsd validity of the current document before start an action.
Currently we do it this way :
But sometimes validationProblems.getProblemsList() is null.
How it is possible ? Is it a normal behavior ?
Is there a more efficient way to check the validity of the current document ?
Thanks,
Regards,
Isabelle
We work with the version 24.0.0 of Oxygen sdk.
We need to check the xsd validity of the current document before start an action.
Currently we do it this way :
Code: Select all
final isDocumentXsdValid = false;
authorAccess.getEditorAccess().getParentEditor().addValidationProblemsFilter(new ValidationProblemsFilter() {
public void filterValidationProblems(ValidationProblems validationProblems) {
isDocumentXsdValid = validationProblems.getProblemsList().stream().noneMatch(p -> p.getEngineName().equals("Xerces"));
}
});
authorAccess.getEditorAccess().getParentEditor().checkValid();
How it is possible ? Is it a normal behavior ?
Is there a more efficient way to check the validity of the current document ?
Thanks,
Regards,
Isabelle