Validation error message blank

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
rdx2426
Posts: 1
Joined: Tue Apr 29, 2025 6:57 pm

Validation error message blank

Post by rdx2426 »

Schematron validation in validation scenario acting very weird in Oxygen Web server. This is not a problem in Oxygen Web add-on test server in Oxygen XML editor.

Pre-requisite:
Define framework that contains XSD, two Schematron files and validation scenario with auto-validation for both Schematron files. Open/edit XML file that validates successfully.

On open of XML, if we modify the XML and only violate a warning rule in the first Schematron file listed in the validation scenario, a warning and <assert> message is displayed in the Validation panel.

If we modify the XML and only violate an error rule in the second Schematron file listed in the validation scenario, a placeholder for the error is displayed in the Validation panel but the <assert> message is not display. Refresh UI does not resolve. Same behavior in MS Edge and Firefox.
image.jpeg

If we modify the XML and violate the rules in both Schematron files, a placeholder for both the warning and error are displayed in the Validation panel but the <assert> message for both are not displayed. Refresh UI partially resolves problem - <assert> message for the warning now appears but <assert> message for the error is still not displayed.
refreshimage.jpeg

If we fix and re-violate the rules and take it back to the state where only the warning rule in the first Schematron file is violated, a placeholder for the error (not warning) is displayed in the Validation panel with no <assert> message. Keep in mind, the error is not violated. If we modify the content at the location of the error rule (which is currently valid) and keep it valid, the Validation panel updates and now shows the warning with its <assert> message. The error is no longer listed.

Any ideas on how to resolve this?
You do not have the required permissions to view the files attached to this post.
cosminef
Site Admin
Posts: 253
Joined: Wed Aug 30, 2023 2:33 pm

Re: Validation error message blank

Post by cosminef »

Hello,

Thank you for reaching out.
Can you help us reproduce the issue? It would be helpful if you could send us the framework you're using, a sample file, and the steps to reproduce those validation errors.
We can continue the discussion via email at: support@oxygenxml.com

Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
kdolan09
Posts: 11
Joined: Mon Apr 28, 2025 7:11 pm

Re: Validation error message blank

Post by kdolan09 »

As we try to create a sample that we can send you to reproduce the problem (other priorities seem to get in the way), we have discovered some differences when it comes to the environment in which Oxygen Web Author is installed and accessed. Not sure if this is just coincidence or a key detail.

* Oxygen Web Author installed on Azure VMs (Windows or Linux): Accessed from browser on another machine - problem exists
* Oxygen Web Author installed on local Windows laptop: Accessed from local browser - no problem
* Oxygen Web Author installed on local Windows laptop: Accessed from browser on another machine - no problem
* Oxygen Web Author launched from Oxygen XML Editor - no problem
* Oxygen XML Editor - no problem (although I thought I may have seen the problem in this scenario)

In all cases, Oxygen Web Author is using the same copy of the framework and accessed with Edge. In the first three cases, Oxygen Web Author is configured to point to the same Alfresco instance acting as a CMS. Most times, the validation messages are blank as soon as the XML document is opened in Oxygen or an edit has been made which results in a validation error, but some times, the validation messages are okay and a refresh (e.g., F5, an edit that alters the list of validation errors) clobbers them. The messages impacted seem to be Schematron validation errors, warnings, etc. not XML Schema validation errors.

We have seen a case where the message type (e.g., error, warning) is incorrect as well. For example, if we expect 3 Schematron validation issues where 2 are errors (red) and 1 is a warning (yellow), we do see 3 issues in the validation pane, all/most of the messages are blank, but all of our boxes are red (errors) instead of two red and one yellow box.

We did a quick inspection of browser network traffic. We found a response that includes error messages and for the ones that are blank, we see something like this:

Code: Select all

{
            "errorMessage": "",
            "severity": "error",
            "startPosition": "0,true,0",
            "endPosition": "1,false,0",
            "nodeIds": [
                1
            ],
            "docTypeName": "Tech Pubs for Boeing Commercial Aircraft",
            "scenarioName": "Tech Pubs for Boeing Commercial Aircraft",
            "quickFixes": [],
            "additionalInfo": null
        }
Until we are able to provide you with a sample framework that demonstrates this problem , is there anything else we may be able to inspect? Since the browser seems to get an empty message from the server, is there a way to inspect the server - e.g., log file/level to see how the validation action progresses?

Thanks, Kelly (Rohit co-worker)
cosminef
Site Admin
Posts: 253
Joined: Wed Aug 30, 2023 2:33 pm

Re: Validation error message blank

Post by cosminef »

Hello,

Thank you for your reply.

We tried to reproduce the issue you described in a framework in Web Author that contains two .sch files, one of which includes a warning (and is the first listed in the validation scenario):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        queryBinding="xslt2">

  <pattern id="title-length-check">
    <rule context="topic/title">
      <assert test="string-length(normalize-space(.)) &gt;= 5" role="warning">
        The title must contain 5 characters.
      </assert>
    </rule>
  </pattern>
</schema>
and the second file, which contains an error (listed second in the validation scenario):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        queryBinding="xslt2">

  <pattern id="shortdesc-required">
    <rule context="topic">
      <assert test="shortdesc and normalize-space(string(shortdesc))" role="error">
        The "shortdesc" element is required and cannot be empty.
      </assert>
    </rule>
  </pattern>
</schema>
On open of XML, if we modify the XML and only violate a warning rule in the first Schematron file listed in the validation scenario, a warning and <assert> message is displayed in the Validation panel.

If we modify the XML and only violate an error rule in the second Schematron file listed in the validation scenario, a placeholder for the error is displayed in the Validation panel but the <assert> message is not display. Refresh UI does not resolve. Same behavior in MS Edge and Firefox.
If we modify the sample file we're testing according to the description above, we are not able to reproduce the issue you encountered.

In your framework, in the validation scenario, do you have a specific "Validation engine" selected, or is it set to "<Default engine>"?
Oxygen Web Author installed on Azure VMs (Windows or Linux): Accessed from browser on another machine - problem exists
Should we understand that the issue is reproduced only in this environment and that it is indeed the scenario you need?

You can try using the filterValidationProblems() method from the ro.sync.exml.workspace.api.editor.validation.ValidationProblemsFilter class [1] to intercept validation errors when they occur.
ro.sync.exml.workspace.api.editor.validation.ValidationProblems
ro.sync.document.DocumentPositionedInfo
Each validation issue is represented by a DocumentPositionedInfo object, which is part of the ValidationProblems structure.
We recommend printing out as much information as possible from each DocumentPositionedInfo instance—this might help identify the source of the error. In particular, check the detailedExceptionInfo field if available, as it could provide more insight into the cause.

Best,
Cosmin

[1] https://mirror.oxygenxml.com/InstData/E ... ilter.html
Cosmin Eftenie
www.oxygenxml.com
Post Reply