Restricted Subset of XHTML

 

Contents

 

1      Introduction. 1

1.1       Purpose. 1

2      Specification. 2

2.1       Mapping to HL7 CDA.. 2

2.2       Support for non-browser interfaces. 2

2.3       Requirement for well-formed XHTML. 2

2.4       Permitted tags and attributes. 2

2.5       Common Attributes. 4

3      xHTML subset DTD.. 4

 

 


 

Change History

In Version

Author

Date

Amendment Details

1.0

Core Technical Team

10/05/2004

First release

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

1                                Introduction

1.1                         Purpose

This document specifies a restricted set of XHTML tags that may be used in the narrative text representation of patient records within the GP2GP Project messages from communication between GP systems.

This restricted set of tags is specified to prevent the following:

 

2                                Specification

2.1                         Mapping to HL7 CDA

There is a mapping provided in the table below which indicates how this constrained xHTML maps to the HL7 CDA body structures. The structures defined here are more constrained than CDA, but will map to a true subset of that document definition.

2.2                         Support for non-browser interfaces

It is assumed that some applications will want to display the received text within an existing user interface, rather than directly in a browser, and this informs the assumptions about what it is reasonable for a receiving system to be able to process.  Were the narrative text always going to be viewed with a browser (or browser component), then we need only constrain to the point of a reasonable baseline browser conformance.  However if this data may be displayed within non-browser user interfaces, then style and layout markup should be kept to a minimum.  

 

This specification defines a minimum set of markup that all receivers must be able to process, and allows further markup that the receiver can ignore if they wish to display the data within an existing user interface template.

 

2.3                         Requirement for well-formed XHTML

The document must be well-formed according to XML rules.

 

The main implications of this compared to conventional HTML are:

2.4                         Permitted tags and attributes

Tag

Description

Permitted attributes

Mapping to HL7 CDA

<html>

Top level element containing an instance of <head> and an instance of <body>.

 

 

<head>

One instance only in the <html> element.

 

Restriction: This may only contain two sub-elements <title> and <style>.

 

 

<style>

One instance only in the <head> element.  This element may be ignored by receiving systems that do not use a browser component to display the narrative text.  It is the senders responsibility to ensure that this does not alter the semantic meaning.  

 

 

<title>

One instance only in <head> element.

 

This provides a document title.

 

caption

<body>

One instance only in the <html> element following the <head> and containing the remainder of the document.

 

 

<h1>
<h2>
<h3>
<h4>
<h5>
<h6>

Heading levels.

 

Restriction: These are not permitted to contain any sub-elements.

 

 

<p>

Paragraph

 

paragraph

<ol>
<ul>

Outline list numbered and unnumbered.

 

list

<li>

List item

 

item

<table>

Table

width, cellpadding, cellspacing, border

table

<thead>

Table header

valign

thead

<tfoot>

Table footer

valign

tfoot

<tr>

Table row

valign

tr

<td>

Table cell

rowspan, colspan, nowrap, width, height

td

<pre>

Preformatted text -- this has been included to represent fixed width fonts where layout is controlled by whitespace, as for the pathology result messages.

 

Restriction: The sending system should convert any tabs to spaces when sending a message to avoid misaligned text.

 

 

<a>

Internal links

 

Restriction: The href URL for an internal link must start with #, indicating that it is a pointer into the current document. 

name, href="#...."

link_html

 

 

2.5                         Common Attributes

Class and style are permitted attributes but maybe ignored by receiving applications.  It is the senders responsibility to ensure information is represented safely and appropriately whether or not these additional attributes are processed.  

 

3                                xHTML subset DTD

 

<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY % common

"style NMTOKEN #IMPLIED

class NMTOKEN #IMPLIED">

<!ENTITY % valign

"valign (top | middle | baseline | bottom) #IMPLIED">

 

<!ELEMENT html (head | body)*>

<!ELEMENT head (title | style)*>

<!ELEMENT style (#PCDATA)>

<!ELEMENT title (#PCDATA)>

<!ELEMENT body (h1| h2 | h3 | h4 | h5 | h6 | p | ol | ul | table | a | pre)*>

 

<!ELEMENT h1 (#PCDATA)>

<!ATTLIST h1 %common;>

<!ELEMENT h2 (#PCDATA)>

<!ATTLIST h2 %common;>

<!ELEMENT h3 (#PCDATA)>

<!ATTLIST h3 %common;>

<!ELEMENT h4 (#PCDATA)>

<!ATTLIST h4 %common;>

<!ELEMENT h5 (#PCDATA)>

<!ATTLIST h5 %common;>

<!ELEMENT h6 (#PCDATA)>

<!ATTLIST h6 %common;>

 

<!ELEMENT p (#PCDATA | h1| h2| h3| h4| h5| h6| p| ol| ul| table| a| pre)*>

 

<!ELEMENT ol (li+)>

<!ELEMENT ul (li+)>

<!ELEMENT li (#PCDATA)>

<!ELEMENT table (thead?, tfoot?, tr+)>

<!ATTLIST table

width NMTOKEN #IMPLIED

cellpadding NMTOKEN #IMPLIED

cellspacing NMTOKEN #IMPLIED

border CDATA #IMPLIED>

<!ELEMENT tr (td)>

<!ATTLIST tr

%valign;>

 

<!ELEMENT td (#PCDATA | h1| h2| h3 | h4 | h5 | h6 | p | ol | ul | table | a | pre)*>

<!ATTLIST td

rowspan CDATA #IMPLIED

colspan CDATA #IMPLIED

nowrap (yes | no) #IMPLIED

width CDATA #IMPLIED

height CDATA #IMPLIED>

 

<!ELEMENT thead (tr)+>

<!ELEMENT tfoot (tr)+>

<!ATTLIST tfoot

%valign;>

 

<!ELEMENT pre (#PCDATA)>

<!ELEMENT a (#PCDATA)>

<!ATTLIST a

name NMTOKEN #IMPLIED

href NMTOKEN #IMPLIED>