README /2006/07/

Author: PHARMAC <TeXSchedule@pharmac.govt.nz>
Updated:2006-10-26 15:25

Contents

Schedule XML Schema

The Schedule XML Schema can be used to validate the XML Pharmaceutical Schedule distributed by PHARMAC.

From Schedule.xsd:

Pharmaceutical Schedule XML Schema

Copyright (c) 2002-2006  PHARMAC

This schema can be considered the authoritive Pharmaceutical
Schedule XML Schema as of July 2006, see the ChangeLog annotation
for revision details.

Changes to the Schedule XML Schema

The current Schedule XML Schema is available here:

http://www.pharmac.govt.nz/2006/07/Schedule.xsd

Revision history is kept within, near the top of the schema (xpath: //xs:appinfo/schedule:ChangeLog).

Changes will only be made to this schema that are backwards compatible with previously distributed XML Schedules released under this schema. These changes will be announced in the proofing and distribution list emails.

When a schema change is necessary that would break backwards compatibility a new schema location is made based on the date of schema change, ie:

http://www.pharmac.govt.nz/2007/01/Schedule.xsd

Proofing and distribution lists would be alerted of this incompatible change ahead of the first distribution released under the updated schema.

Note

These procedures are meant as a stopgap measure and do not constitute changes to existing change consultation procedure.

MathML

A subset of MathML is used for Special Authority form criteria, more information about MathML can be found at the MathML homepage:

http://www.w3.org/Math/

The MathML XML Schema is available here:

http://www.w3.org/Math/XMLSchema/

The following changes were made to the MathML schema to enable it to work with the libxml2 XML C parser and toolkit:

Index: mathml2/content/constructs.xsd
===================================================================
--- mathml2/content/constructs.xsd      (revision 946)
+++ mathml2/content/constructs.xsd      (working copy)
@@ -190,12 +190,21 @@
   </xs:sequence>
 </xs:group>

-<xs:complexType name="piecewise.type">
+<!-- ericson  2006-04-12
+     libxml2 complains:
+
+       complex type 'piecewise.type': The content model is not
+       determinist.
+
+     Rather than try to fix something that I don't really understand
+     I'm going to just comment stuff out and see what happens... -->
+
+<!-- <xs:complexType name="piecewise.type">
   <xs:group ref="piecewise.content"/>
   <xs:attributeGroup ref="piecewise.attlist"/>
 </xs:complexType>

-<xs:element name="piecewise" type="piecewise.type"/>
+<xs:element name="piecewise" type="piecewise.type"/> -->

 <!-- "bvar" -->

@@ -245,7 +254,8 @@
     <xs:element ref="condition"/>
     <xs:element ref="declare"/>
     <xs:element ref="lambda"/>
-    <xs:element ref="piecewise"/>
+    <!-- ericson  2006-04-12 -->
+    <!-- <xs:element ref="piecewise"/> -->
     <xs:element ref="bvar"/>
     <xs:element ref="degree"/>
   </xs:choice>

Note

These changes aren't modifying the MathML schema per se, they disable certain MathML features that libxml2 considers "not determinist", and which we don't use anyway.

MathML bundles its own subset of xlink so we modify mathml2/common/common-attribs.xsd to refer to our one instead:

@@ -16,7 +16,7 @@
 </xs:annotation>


-<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink-href.xsd"/>
+<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="../../xlink.xsd"/>
 <xs:import/> <!-- import any foreign namespace -->

XHTML

We use XHTML-1.0-Strict for notes and guidelines, for more information see the XHTML 1.0 homepage:

http://www.w3.org/TR/xhtml1/

The XML Schema xhtml1-strict.xsd is imported by Schedule.xsd from a copy in the same directory, the original is available here:

http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd

This schema depends on the XML Schema xml.xsd copied from:

http://www.w3.org/2001/xml.xsd

To enable the importation of the relative xml.xsd by xhtml1-strict.xsd the following change was made to xhtml1-strict.xsd:

33c33
<       schemaLocation="http://www.w3.org/2001/xml.xsd"/>
---
>       schemaLocation="xml.xsd"/>

We also add the following to allow xlink attributes to occur wherever and allow validation:

@@ -3,6 +3,7 @@
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://www.w3.org/1999/xhtml"
     xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     elementFormDefault="qualified">

@@ -32,6 +33,9 @@
   <xs:import namespace="http://www.w3.org/XML/1998/namespace"
       schemaLocation="xml.xsd"/>

+  <xs:import namespace="http://www.w3.org/1999/xlink"
+      schemaLocation="xlink.xsd"/>
+
   <xs:annotation>
     <xs:documentation>
     ================ Character mnemonic entities =========================
@@ -290,7 +294,7 @@
     <xs:attribute name="title" type="Text"/>
     <!-- see mathml2/common/common-attribs.xsd -->
     <!-- allow attributes from foreign namespaces, and don't check them -->
+    <xs:anyAttribute namespace="http://www.w3.org/1999/xlink"/>
   </xs:attributeGroup>

   <xs:attributeGroup name="i18n">

XLink

We use XLink attributes to reference parts of the schedule, for more information see:

http://www.w3.org/TR/xlink/

The XML Schema xlink.xsd is imported by Schedule.xsd from a copy in the same directory, the original was obtained from:

http://dev.w3.org/cvsweb/~checkout~/2002/issues/schema/xlink.xsd?rev=1.2&content-type=text/plain