I've took example staff and have fun.
I've changed simple.c to see line-column number if schema fails.
Let's see the output:
1. numbers are correct:
<1schema>
<!-- List of employees of the company -->
<document name="employees">
<collection name="employee">
<attribute name="id"/>
<attribute name="managerId"/>
<text name="firstName"/>
<text name="lastName"/>
<text name="email"/>
<text name="position"/>
</collection>
</document>
</schema>
$ ./simple
Error schema (1,3): 26
2. numbers are not correct:
<schema>
<!-- List of employees of the company -->
<document name="employees">
<collection name="employee">
<attribute name="id"/>
<attribute name="managerId"/>
<text name="firstName"/>
<text name="lastName"/>
<text name="email"/>
<text name="position"/>
</collection>
</document>
<document name="ddd"/>
</schema>
$ ./simple
Error schema (-1080045688,134515001): 14
3. numbers are not correct:
<schema>
<!-- List of employees of the company -->
<document name="employees">
<collection name="employee">
<attribute name="id" ignore="foo"/>
<attribute name="managerId"/>
<text name="firstName"/>
<text name="lastName"/>
<text name="email"/>
<text name="position"/>
</collection>
</document>
</schema>
$ ./simple
Error schema (-1078341912,134515001): 18
Error 14 (RC_DOCUMENT_DEFINED):
The example should not display line and column since it has no meaning but I'll fix it by initializing line and column to 1 to prevent this ugly error display.
Error 18 (RC_INVALID_IGNORE):
When the schema is compiled, the line and column are lost because the XML is already parsed. The best I can do is to display the path of the invalid attribute. e.g. "employees.employee.id".