Skip to content

Instantly share code, notes, and snippets.

@jrosebr1
Created April 18, 2012 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrosebr1/2415182 to your computer and use it in GitHub Desktop.
Save jrosebr1/2415182 to your computer and use it in GitHub Desktop.
This XML schema file is used to describe pills.
<?xml version="1.0" encoding="utf-8"?>
<!--
@brief
This XML schema file is used to describe pills.
@author Adrian Rosebrock
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.shiftybits.com">
<!-- define the 'pills' element -->
<xs:element name="pills">
<xs:complexType>
<xs:sequence>
<!-- define the 'pill' element -->
<xs:element name="pill" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<!-- The National Drug Code of the pill. This is a unique identifier. -->
<xs:element name="ndc" type="xs:string"/>
<!-- The name of the drug. Ex. 'Acetaminophen' -->
<xs:element name="name" type="xs:string"/>
<!-- The name of the manufacturer that produced the drug. -->
<xs:element name="manufacturer" type="xs:string"/>
<!-- The first color of the pill. -->
<xs:element name="colorA" type="xs:string"/>
<!-- The second color of the pill (could be empty if there is not a second color). -->
<xs:element name="colorB" type="xs:string"/>
<!-- The shape of the pill. -->
<xs:element name="shape" type="xs:string"/>
<!-- The imprint of the pill. The imprint on the front of the pill is separated from the imprint on the back of the pill via a ';'. -->
<xs:element name="imprint" type="xs:string"/>
<!-- The size of the pill (numeric). -->
<xs:element name="size" type="xs:positiveInteger"/>
<!-- The unit of measurement used to measure the pill -->
<xs:element name="sizeUnit" type="xs:string"/>
<!-- The method that the pill is taken. Ex. oral -->
<xs:element name="route" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment