Schematron support in the hl7 adapter – Sun Microsystems Sun Adapter IP HL 7 User Manual

Page 25

Advertising
background image

<web-app>

...

...

<!--

Default monitoring period used in monitoring the

external system connection

-->

<context-param>

<param-name>monitorperiod</param-name>

<param-value>2000</param-value>

</context-param>

...

</web-app>

Schematron Support in the HL7 Adapter

Schematron is supported for HL7 V3 Message Libraries. The Schematron uses the concept of
finding tree patterns in the parsed document rather than the grammar. This approach allows
representation of numerous structures that are inconvenient and difficult in grammar-based
schema languages.

For example, the following file defines a Person element that includes a Name field and a
Gender field:

<?xml version=

"1.0" encoding="UTF-8"?>

<Person>

<Name>Eddie</Name>

<Gender>Male</Gender>

<Person>

The above XML document can be validated against the below schematron, which defines a test
for a Title field, a test for Name and Gender, and a test for the order of fields:

<?xml version=

"1.0" encoding="UTF-8"?>

<sch:schema xmlns:sch=

"http://www.ascc.net/xml/schematron">

<sch:pattern name=

"Check structure">

<sch:rule context=

"Person">

<sch:assert test=

"@Title">The element Person must have a Title attribute<sch:assert>

<sch:assert test=

"count(*) = 2 and count(Name) = 1 and count(Gender) = 1">The element

Person should have the child elements Name and Gender.<sch:assert>

<sch:assert test=

"*[1] = Name">The element Name must appear before element

Gender.</sch:assert>

</sch:rule>

</sch:pattern>

</sch:schema>

Sun Adapter for TCP/IP HL7 Overview

Sun Adapter for TCP/IP HL7 User's Guide

25

Advertising
This manual is related to the following products: