XML Schema Documentation

From HL7Wiki
Jump to: navigation, search

Scope

There was a plan to write a schema requirements document, but no solid requirements for the requirements document emerged. We now plan to add schema implementation issues as appendixes in the XML data types and, if necessary, the XML structures document.

This document is a place to record requirements and draft the content that fills the requirement. The document is divided into 2 parts, issues to address, and then the actual content in response.

If you have issues you would like the document to discuss, please record them in the first section by editing the document.

Issues to Address

Todo: add generic template description in section B.2

Draft Content (XML Data Types)

The schema representations are provided for convenience, as the XML schema is a compact and specific way to describe the XML representation. However the schema is not in itself a normative part of this specification. While HL7 publishes schema for the HL7 data types, other schemas could be proposed that describes the same XML representation, and these schemas are no less valid, though they may differ in their usefulness for a given task. It is the XML representation of the data type that is normative.

This schema defines a complex type for each data type described in this specification as having an Element form (e.g., ED and CD), the name of the complex type is the value of the "Symbol" column for the type as given in Table 1.

Contains unresolved references: "This schema", "Symbol column" and "Table 1". Rene spronk 01:07, 8 Nov 2005 (CST)


This schema also defines a simple type for each data type described in this specification as having an Attribute form (e.g., ST and CS), the name of the simple type is the lower-case version of the "Symbol" column for the type as given in Table 1.

Contains unresolved references: "This schema", "Symbol column" and "Table 1". Rene spronk 01:07, 8 Nov 2005 (CST)


For some data types, one or more Schematron [1] patterns are defined as xs:appinfo annotations in either the complex type or simple type defintion. These patterns define additional validation rules that go above-and-beyond what can be expressed in XML Schema. The most common rule checks the condition that an instance of a type can have either an nullFlavor or some combination of others but not both. Please refer to the Schematron specification [2] for further information.

This schema does not completely represent all constraints for every data type as specified in the Data Types Abstract Specification. For example, the distinction between SET, BAG and LIST (unique/unordered, non-unique/unordered and non-unique/ordered) are not enforced by this schema. The Schematron rules described in above can be used to check some, but not all, of these additional contraints. This has the implication that an instance which validates against the schema may still not be a valid HL7 instance.

Contains unresolved references: "This schema". From the context it seems this refers to the current data type schema as produced by the current XML ITS. Request that this be added somewhere. Rene spronk 01:07, 8 Nov 2005 (CST)


The data type schema are contained in two separate schema documents, one for the base data types and a smaller one for instantiations of generic data types. Note: at present, definitions for generic data types that´are used as the type of data type components are defined in the schema document for the base types.

Draft Content (XML Structures)

(none)

Copyright © Health Level Seven International ® ALL RIGHTS RESERVED. The reproduction of this material in any form is strictly forbidden without the written permission of the publisher.