<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2007, Oracle. All rights reserved.     NAME     ordcmmp.xsd - XML schema for DICOM mapping documents   MODIFIED   (MM/DD/YY)   dolin       06/06/07 -    myalavar    06/06/07 - review comments   fechen      05/08/07 - fix the comments    myalavar    04/10/07 - copyright   myalavar    04/09/07 - add major_minor version   dguo        08/01/06 - Beta release 1   dguo        04/03/05 - Created-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.oracle.com/ord/dicom/mapping_1_0" xmlns:dt="http://xmlns.oracle.com/ord/dicom/datatype_1_0" targetNamespace="http://xmlns.oracle.com/ord/dicom/mapping_1_0" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="8499" oraxdb:schemaURL="http://xmlns.oracle.com/ord/dicom/mapping_1_0" oraxdb:schemaOwner="ORDSYS" oraxdb:numProps="15">
  <xs:import namespace="http://xmlns.oracle.com/ord/dicom/datatype_1_0" schemaLocation="http://xmlns.oracle.com/ord/dicom/datatype_1_0"/>
  <xs:annotation>
    <xs:documentation>      This schema defines the DICOM (XML) mapping document.      It defines how each DICOM attribute maps to an element of the       DICOM metadata document.            The mapping document is used by the metadata encoder to produce       a DICOM metadata document. Each DICOM attribute is identified by       a 4-byte hexadecimal attribute tag. Each DICOM attribute is mapped       to an element of the XML metadata document designated by the PATH       element. By default, a DICOM attribute can be null and is optional.            XML_MAPPING_DOCUMENT        Question mark &quot;?&quot; means optional items.        Plus &quot;+&quot; means one or more items.        Asterisk &quot;*&quot; means zero or more items.      DOCUMENT_HEADER?        DOCUMENT_CHANGE_LOG*         DOCUMENT_MODIFIER         DOCUMENT_MODIFICATION_DATE         DOCUMENT_VERSION?         MODIFICATION_COMMENT?         BASE_DOCUMENT?         BASE_DOCUMENT_RELEASE_DATE?         BASE_DOCUMENT_DESCRIPTION?      NAMESPACE?      ROOT_ELEM_TAG      UNMAPPED_ELEM      MAPPED_ELEM      MAPPED_PATH+ (occurs?, notEmpty?, writeTag?, writeDefiner?, writeName?, writeRawValue)         {ATTRIBUTE_TAG(definer), PATH}+           </xs:documentation>
  </xs:annotation>
  <xs:element name="XML_MAPPING_DOCUMENT" oraxdb:propNumber="3473" oraxdb:global="true" oraxdb:SQLName="XML_MAPPING_DOCUMENT" oraxdb:SQLType="XML_MAPPING_DOCUMENT536_T" oraxdb:SQLSchema="ORDSYS" oraxdb:memType="258">
    <xs:complexType oraxdb:SQLType="XML_MAPPING_DOCUMENT536_T" oraxdb:SQLSchema="ORDSYS">
      <xs:sequence>
        <xs:element name="DOCUMENT_HEADER" type="dt:DOCUMENT_HEADER_T" minOccurs="0" oraxdb:propNumber="3459" oraxdb:global="false" oraxdb:SQLName="DOCUMENT_HEADER" oraxdb:SQLType="DOCUMENT_HEADER_T343_T" oraxdb:SQLSchema="ORDSYS" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
        <xs:element name="NAMESPACE" type="dt:SHORT_TEXT_T" oraxdb:propNumber="3460" oraxdb:global="false" oraxdb:SQLName="NAMESPACE" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true">
          <xs:annotation>
            <xs:documentation>              The namespace of the XML metadata schema on which a mapping               document is based. Metadata from a DICOM object can be              mapped into an XML document constrained by this XML              metadata schema. If the value of this element is an empty string,              the extracted XML metadata document is not               associated with an XML schema.              The order of the MAPPED_PATH elements              MUST match the sequence of the corresponding XML               elements in this namespace.                            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="ROOT_ELEM_TAG" type="dt:SHORT_STRING_T" oraxdb:propNumber="3461" oraxdb:global="false" oraxdb:SQLName="ROOT_ELEM_TAG" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true">
          <xs:annotation>
            <xs:documentation>              This element specifies the root element tag of               an XML metadata document.            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="UNMAPPED_ELEM" type="dt:SHORT_STRING_T" nillable="true" minOccurs="0" oraxdb:propNumber="3462" oraxdb:global="false" oraxdb:SQLName="UNMAPPED_ELEM" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true">
          <xs:annotation>
            <xs:documentation>            This element specifies the XML path (appended to             ROOT_ELEM_TAG) for unmapped attributes, that is, the set            of DICOM attributes that are present in a DICOM object,             but whose mappings have not been defined by the            MAPPED_PATH elements of an XML mapping document.            This element is optional. If this element is omitted or empty,             the unmapped attributes are appended to ROOT_ELEM_TAG.             If an XML schema is used to constrain the metadata document,            the XML schema element pointed to by this element should            be of type dt:DATASET_T. See the DICOM data type definition            schema &quot;http://xmlns.oracle.com/ord/dicom/datatype_1_0&quot;            and dt:DATASET_T for more information.            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="MAPPED_ELEM" type="dt:SHORT_STRING_T" nillable="true" minOccurs="0" oraxdb:propNumber="3463" oraxdb:global="false" oraxdb:SQLName="MAPPED_ELEM" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true">
          <xs:annotation>
            <xs:documentation>            This element specifies the XML path for all mapped             attributes, that is,  the set of DICOM attributes that are             present in a DICOM object, and whose mappings            are defined by the MAPPED_XPATH elements             of an XML mapping document. This element            specifies a relative path from ROOT_ELEM_TAG.            For example, to map a DICOM attribute (0010,0010) to            the XML element at &quot;/DICOM_METADATA/PATIENT/NAME&quot;,            specify the following             The ROOT_ELEM_TAG element value is &quot;DICOM_METADATA&quot;.            The MAPPED_ELEM element value is &quot;PATIENT&quot; and             The MAPPED_PATH/PATH element value should be &quot;NAME&quot;.            Alternatively,             if the value of element MAPPED_ELEM is an empty string,            then the value of the element MAPPED_PATH/PATH            should be &quot;PATIENT/NAME&quot;.            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="MAPPED_PATH" minOccurs="0" maxOccurs="unbounded" oraxdb:propNumber="3472" oraxdb:global="false" oraxdb:SQLName="MAPPED_PATH" oraxdb:SQLType="MAPPED_PATH537_T" oraxdb:SQLSchema="ORDSYS" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="MAPPED_PATH538_COLL" oraxdb:SQLCollSchema="ORDSYS">
          <xs:complexType oraxdb:SQLType="MAPPED_PATH537_T" oraxdb:SQLSchema="ORDSYS">
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>                  A MAPPED_PATH element contains attribute tag and                  path pairs.                  An attribute tag uniquely identifies an attribute within the                  data dictionary. Wildcards are not allowed in an attribute                  tag specification in this release.                  The path consists of slash &quot;/&quot;-concatenated element names.                  A path specifies the destination of an attribute in the                   DICOM XML metadata document. The mapped path                  is the relative path from ROOT_ELEM_TAG and                  MAPPED_ELEM. The absolute path is:                  &quot;${ROOT_ELEM_TAG} / ${MAPPED_ELEM} /                   ${MAPPED_PATH}&quot;.                  The optional attribute &quot;occurs&quot; specifies whether the                  attribute must exist in the original DICOM content.                  (The attribute tag must exist, but the attribute value                  can be an empty string, for example, a DICOM  type 2                   attribute.)                  The optional attribute &quot;notEmpty&quot; specifies                   whether the attribute must have a value in                   the original DICOM content (type 1 in DICOM terms).                  Depending on the run-time preferences, if the                   above &quot;occurs&apos; or &quot;notEmpty&quot; condition is not                   met, an error may be thrown at run-time.                  The optional attribute &quot;writeTag&quot; specifies whether to                  add the attribute &quot;tag&quot; when writing the element.                  The tag attribute is of type &quot;dt:AT&quot;. The value of this                  attribute is the DICOM attribute tag in little-endian                   encoding.                  The optional attribute &quot;writeDefiner&quot; specifies whether                  to add the attribute &quot;definer&quot; when writing the element.                  The definer attribute is of type &quot;dt:LO&quot;. The value of                  this attribute is the same as the definer attribute of                  ATTRIBUTE_TAG element of the mapping document.                  The optional attribute &quot;writeName&quot; specifies whether                  to add the attribute &quot;name&quot; when writing the element.                  The name attribute is of type &quot;dt:SHORT_STRING_T&quot;.                  The value of this element is the attribute name                  defined by the data dictionary.                  The optional attribute &quot;writeRawValue&quot; specifies whether                  to add the attribute &quot;rawValue&quot; when writing the element.                  The raw value attribute is of type &quot;xs:hexBinary&quot;.                  This attribute only occurs when there is a parsing error                  for this attribute and no XML value can be extracted for                  the element. The value of this attribute is the                   hexadecimal dump of the original byte stream.                </xs:documentation>
              </xs:annotation>
              <xs:element name="ATTRIBUTE_TAG" type="dt:VALUE_LOCATOR_T" oraxdb:propNumber="3470" oraxdb:global="false" oraxdb:SQLName="ATTRIBUTE_TAG" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true"/>
              <xs:element name="PATH" type="dt:SHORT_TEXT_T" oraxdb:propNumber="3471" oraxdb:global="false" oraxdb:SQLName="PATH" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true"/>
            </xs:sequence>
            <xs:attribute name="occurs" type="xs:boolean" default="false" oraxdb:propNumber="3464" oraxdb:global="false" oraxdb:SQLName="occurs" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
            <xs:attribute name="notEmpty" type="xs:boolean" default="false" oraxdb:propNumber="3465" oraxdb:global="false" oraxdb:SQLName="notEmpty" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
            <xs:attribute name="writeTag" type="xs:boolean" default="false" oraxdb:propNumber="3466" oraxdb:global="false" oraxdb:SQLName="writeTag" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
            <xs:attribute name="writeDefiner" type="xs:boolean" default="false" oraxdb:propNumber="3467" oraxdb:global="false" oraxdb:SQLName="writeDefiner" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
            <xs:attribute name="writeName" type="xs:boolean" default="false" oraxdb:propNumber="3468" oraxdb:global="false" oraxdb:SQLName="writeName" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
            <xs:attribute name="writeRawValue" type="xs:boolean" default="false" oraxdb:propNumber="3469" oraxdb:global="false" oraxdb:SQLName="writeRawValue" oraxdb:SQLType="RAW" oraxdb:memType="252"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
