private boolean validateNamespace(Document domDocumentToValidate, List<ValidationException> validationErrors) {
// start by verifying the default namespace if this isn't correct the rest will fail anyway
if (domDocumentToValidate.getDocumentElement().getNamespaceURI() == null)
{
ValidationException e = new ValidationException("The default namespace of the xml document is not specified - should be urn:hl7-org:v2xml");
validationErrors.add(e);
log.error("The default namespace of the xml document is not specified - should be urn:hl7-org:v2xml");
}
else
{
if (! domDocumentToValidate.getDocumentElement().getNamespaceURI().equals("urn:hl7-org:v2xml"))
{
ValidationException e = new ValidationException("The default namespace of the xml document (" + domDocumentToValidate.getDocumentElement().getNamespaceURI() + ") is incorrect - should be urn:hl7-org:v2xml");
validationErrors.add(e);
log.error("The default namespace of the xml document (" + domDocumentToValidate.getDocumentElement().getNamespaceURI() + ") is incorrect - should be urn:hl7-org:v2xml");
}
else
{