I'm using the latest version of phive (v11.x) to validate PEPPOL UBL 2.1 invoices.
I execute the validation and get a ValidationResultList, however, for all errors error.getErrorLocation().getLineNumber() always returns -1
How can I get the ValidationResultList to provide actual line numbers for errors when validating PEPPOL UBL XML files using phive?
I've created the IValidationSourceXML like this:
final IValidationSourceXML validationSourceXML = ValidationSourceXML.create(
"memory://invoice.xml", DOMReader.readXMLDOM(xmlContent)
);
I've also tried using:
IReadableResource res = new ReadableResourceString(xmlContent, StandardCharsets.UTF_8);
ValidationSourceXML.create(res);
…but the lineNumber is still -1.