Xerces ID validation

Are you missing a feature? Request its implementation here.
Mutzel
Posts: 10
Joined: Fri Oct 14, 2011 12:11 pm

Xerces ID validation

Post by Mutzel »

Hello,

while validating an XML document against a DTD, I get an error message saying that an "identifier with the name xyz must appear in the document". After I've corrected the mistake it goes to the next mistake and so on.
The problem is that I don't get a overview of how many IDs are wrong all over the document.
Can the behaviour of the validator be changed? (We use Oxygen 13.2.)

Thanks for your help!
Regards,
Mutzel
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Xerces ID validation

Post by adrian »

Hello,

Xerces only shows the last invalid ID reference, this behavior cannot be changed.
You could use LIBXML that shows you all the broken ID references. You can wither invoke LIBXML manually from the Custom Validation Engines toolbar(the rightmost combo box from the first toolbar row, Saxon-EE appears selected be default). Select LIBXML from that combo and you will be prompted to save the file to be validated.
Note that this only lists the errors in the results panel, there are no error highlights in the editor from this operation.


Alternatively, you could also configure a validation scenario: Document > Validate > Configure Validation Scenario which integrates better with the editor. In the Configure Validation Scenario dialog:
- Press New and choose a name for the scenario
- In the New scenario dialog leave the URL of the file to validate unchanged(${currentFileURL}) and the File type to XML Document so you can use the scenario for various XML files.
- Click on the Validation engine cell(<Default engine>) and choose LIBXML
- Close all dialogs with OK.

Now when you validate: Document > Validate > Validate, you will be prompted to save the file if you haven't already and you will get the list of errors in the results panel and the corresponding highlights in the editor.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Mutzel
Posts: 10
Joined: Fri Oct 14, 2011 12:11 pm

Re: Xerces ID validation

Post by Mutzel »

Hi Adrian,

thanks for the quick reply. LIBXML works fine.

Regards,
Andrea
Post Reply