1
error list dispalying error by error
Question asked by Patrice Ardouin - 8/31/2021 at 9:31 PM
Answered
Hello,
When I validate an xml file accordind to an xsd schema file, errors appear one by one in the errors list window: I must correct the first error, then the following error is displayed in the error list window ..and so on...
How could I do to have all the errors displayed in the errors list window ?
Thanks !

3 Replies

Reply to Thread
0
Liquid Support Replied
Employee Post Marked As Answer
It depends on the severity of the error as to whether or not the rest of the document can be processed.

E.g. For the following XML document:
<bookstore xmlns="http://www.liquid-technologies.com/sample/bookstore"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.liquid-technologies.com/sample/bookstore .\BookStore.xsd">
    <book publicationdate="2008-10-20" ISBN="978-0747596837">
        <author>
            <first-name>Neil</first-name>
            <last-name>Gaiman</last-name>
        </author>
        <genre>Horror</genre>
    </book>
</bookstore>
You will see 2 errors in the error list:
C:\Example\BookStoreSample.xml (4:6) Error The required attribute 'price' is missing.
C:\Example\BookStoreSample.xml (5:10) Error The element 'book' in namespace 'http://www.liquid-technologies.com/sample/bookstore'; has invalid child element 'author' in namespace 'http://www.liquid-technologies.com/sample/bookstore';. List of possible elements expected: 'title' in namespace 'http://www.liquid-technologies.com/sample/bookstore';.
It also depends on which parser is selected in the drop down menu. The above is displayed when the 'Microsoft .Net (XSD 1.0 aware)' parser is selected. If you select the 'Xerces 2.11.0 (XSD 1.0 aware)' parser the you will only see the first error:
C:\Example\BookStoreSample.xml (4:61) Critical cvc-complex-type.4: Attribute 'price' must appear on element 'book'.


0
Patrice Ardouin Replied
Thank you for your answer.
I'm using 'Xerces 2.11.0 (XSD 1.1 aware) cause xsd schema uses 'assert' and 'alternative" and others..
Do you know if other 'XSD 1.1 parsers' could be used with liquid studio ?... thanks ! 
0
Liquid Support Replied
Employee Post
Sorry no, currently just the Xerces parser is available for XSD 1.1.

Reply to Thread