public class XMLSchemaRule extends Object implements EncodingRule
Validate hl7 version 2 messages encoded according to the HL7 XML Encoding Syntax against xml schemas provided by hl7.org
| Constructor and Description |
|---|
XMLSchemaRule()
Creates a new instance of XMLSchemaValidator
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns a text description of the rule.
|
String |
getSectionReference()
A string indicating the section of the HL7 standard from which this rule
is derived (if applicable).
|
ValidationException[] |
test(String msg)
Test/validate a given xml document against a hl7 v2.xml schema.
|
public XMLSchemaRule()
public ValidationException[] test(String msg)
Test/validate a given xml document against a hl7 v2.xml schema.
Before the schema is applied, the namespace is verified because otherwise schema validation fails anyway.
If a schema file is specified in the xml message and the file can be located on the disk this one is used. If no schema has been specified, or the file can't be located, a system property ca.uhn.hl7v2.validation.xmlschemavalidator.schemalocation. + version can be used to assign a default schema location.
test in interface EncodingRulemsg - the xml message (as string) to be validated.public String getDescription()
RulegetDescription in interface RuleRule.getDescription()public String getSectionReference()
RulegetSectionReference in interface RuleRule.getSectionReference()Copyright © 2001-2012 University Health Network. All Rights Reserved.