<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2007, 2009, Oracle and/or its affiliates.All rights reserved.    NAME     ordcmpf.xsd - XML Schema for DICOM preference documents.   MODIFIED   (MM/DD/YY)   dnoblet     02/09/09   - add BINARY_SKIP_INVALID_ATTR   rabbott     12/19/08   - add SPECIFIC_CHARACTER_SET   myalavar    11/14/08   - add param SQ_WRITE_LEN   myalavar    11/03/08   - add PARSE_ERR to IGNORE_EXP_LIST   myalavar    10/28/08   - add param MANDATE_ATTR_TAGS_IN_STL   dolin       10/27/08   - add param MAX_RECURSION_DEPTH   dolin       06/06/07   - doc editor comments   dguo        05/18/07   - change product name   myalavar    04/10/07   - Review comments   dguo        03/03/2006 - Created-->
<xs:schema xmlns="http://xmlns.oracle.com/ord/dicom/preference_1_0" xmlns:dt="http://xmlns.oracle.com/ord/dicom/datatype_1_0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://xmlns.oracle.com/ord/dicom/preference_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/preference_1_0" oraxdb:schemaOwner="ORDSYS" oraxdb:numProps="6">
  <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>    Introduction      This schema defines the run-time preference settings for       Oracle Multimedia DICOM features.    Structure Overview      Question mark &quot;?&quot; means optional items.      Plus &quot;+&quot; means one or more items.      Asterisk &quot;*&quot; means zero or more items.      DICOM_RUNTIME_PREFERENCES        DOCUMENT_HEADER?          DOCUMENT_CHANGE_LOG*              DOCUMENT_MODIFIER              DOCUMENT_MODIFICATION_DATE              DOCUMENT_VERSION?              MODIFICATION_COMMENT?              BASE_DOCUMENT?              BASE_DOCUMENT_RELEASE_DATE?              BASE_DOCUMENT_DESCRIPTION?        PREFERENCE_DEF+          PARAMETER          DESCRIPTION          VALUE        The allowed values for the PARAMETER element of a         PREFERENCE_DEF entry and its corresponding         VALUE element are as follows:                PARAMETER: XML_SKIP_ATTR        VALUE: an integer type (default 512,  128~ 32767)        DESCRIPTION: When encoding a DICOM attribute into XML, skip                attributes whose (child) XML element sizes (in bytes) are                larger than XML_SKIP_ATTR.               If an attribute is of simple type, this limit applies to the               whole attribute.               If the attribute type is SQ, this limit applies to its child                items.               For example, if an attribute is of type SQ and it contains                 child items of type OB, the limit applies to                each child instance of type OB.                The smallest value allowed for this parameter is 128.                PARAMETER: AVG_ATTR_NUM        VALUE: an integer type (default 200, 20~2000)        DESCRIPTION: The average number of root-level attributes per         DICOM object. This is a hint to the DICOM implementation.        Finding the optimal value for a database helps improve storage         efficiency and performance. Too large a value may lead to wasted        memory, and too small a value may lead to poor performance. An        ideal value is one where most (suggested 95%) DICOM images        have less than $VALUE number of attributes.        The smallest value allowed for this parameter is 20.        The largest number allowed for this parameter is         the total number of not retired standard attributes defined.                PARAMETER: CONFORMANCE_LEVEL        VALUE: enum { leastConform, ignoreException(default), mostConform}        DESCRIPTION:         The option &quot;leastConform&quot; means that all functions try to         maximize the processing of a DICOM object and ignore        any errors and exceptions.        &quot;ignoreException&quot; means that all functions ignore the        types of exceptions given in the parameter &quot;IGNORED_EXP_LIST&quot;.        The default set of ignored exceptions includes: MISSING_ATTR,         INVALID_LENGTH, MISSING_MAGIC, MISSING_HEADER, INVALID_VR,         INVALID_VM, and PARSE_ERR.        &quot;mostConform&quot; means that all functions throw an exception        if a DICOM object contains nonconformant content. This does        not include backward compatibility cases allowed by         the DICOM standard.        Note: By choosing an option other than &quot;mostConform&quot;,        you risk accepting invalid DICOM objects, possibly getting        incorrect results. In this case, Oracle recommends setting the        LOGGING_LEVEL parameter to &quot;warning&quot; or a more detailed level,         and then examining the log file for possible errors.                PARAMETER: IGNORED_EXP_LIST        VALUE: EmptySpace-separated exception names from the         following list:                {MISSING_MAGIC, MISSING_HEADER, MISSING_ATTR,                FAULTY_VALUE, INVALID_LENGTH,                 INVALID_VM, INVALID_VR, UNSUPPORT_VALUE,                UNDEFINED_VALUE, NOT_AN_IMAGE, PARSE_ERR}                        Default: {MISSING_ATTR INVALID_LENGTH MISSING_MAGIC                 MISSING_HEADER INVALID_VR INVALID_VM PARSE_ERR}.        DESCRIPTION: This parameter is only effective when the value of        the CONFORMANCE_LEVEL parameter is &quot;ignoreException&quot;. If        this is the case, the exceptions in the ignore exception list are        ignored at run time. However, if the LOGGING_LEVEL parameter        is set to &quot;warning&quot; or a more detailed level, the exception is         logged. The program continues and skips the part         of the DICOM object that has triggered an exception.        These exceptions are defined as follows:        MISSING_MAGIC: a DICOM object does not contain the file             magic number &quot;DICM&quot;.        MISSING_HEADER: a DICOM object does not have the file            meta header (not conformant to the DICOM standard part 10).        MISSING_ATTR: a DICOM object does not have the mandatory            attributes (type 1) required by the DICOM standard.        FAULTY_VALUE: a DICOM object has attribute values             that lead to parsing errors.        INVALID_LENGTH: a DICOM object contains a length value that           is not consistent with the DICOM encoding rules or a length           that is not permitted by the DICOM data dictionary.        INVALID_VM: an attribute of a DICOM object has an invalid Value             Multiplicity value (not consistent with the dictionary definition).        INVALID_VR: an attribute of a DICOM object has an invalid Value            Representation value, which can either conflict with the data            dictionary or has not been defined by the data dictionary.        UNSUPPORTED_VALUE: a DICOM object contains attribute            values that are outside of the supported range;             for example, an unsupported pixel representation value.        UNDEFINED_VALUE: a DICOM object contains attribute            values that are not defined by the data model; for example,            an undefined transfer syntax UID, an undefined SOP            class UID, and so on.        NOT_AN_IMAGE: When an image content processing function            is invoked on a DICOM object, if the object&apos;s SOP class UID is            defined but its classification is not &quot;storageClass&quot;, or its            content type is not &quot;image&quot;, an exception is thrown. It may            mean that the UID definition document is not up-to-date. An             administrator can update the document to define the            SOP class UID as a &quot;storageClass&quot; of &quot;image&quot; type.        PARSE_ERR: When a DICOM object contains invalid data, a parse exception           is thrown. This exception is ignored, and the parsing process           continues.                  PARAMETER: OUTPUT_RAW_VALUE        VALUE: an integer value (default to 0, no output) (-1 ~ 32767)        DESCRIPTION: What to output in an XML metadata document        when the parsing of a DICOM object fails. The base64 encoding         of the attribute&apos;s byte value can be returned in the rawValue         attribute of a DICOM XML element. The VALUE element specifies        the maximal length allowed for the rawValue attribute.         If $VALUE == -1, (not recommended), the entire attribute up to 32k        is saved in the rawValue attribute in base64 encoding.        If $VALUE == 0, an empty string is saved in the rawValue         attribute (recommended for production systems).        If $VALUE == N &gt; 0, only the first N bytes of the attribute are        saved in the rawValue attribute.        A nonzero value for this parameter is useful for debugging         purposes. For a production system, do NOT pick a value        larger than 64. The value -1 should never be used outside of        a development environment.                PARAMETER: LOGGING_LEVEL        VALUE: enum {debug, conformance, warning(default), error, none }        DESCRIPTION:   The logging level, if ordered by the level of         detail from the most to the least is: &quot;debug&quot;, &quot;conformance&quot;,         &quot;warning&quot;, &quot;error&quot;, and &quot;none&quot;.         &quot;debug&quot; means extensive logging of all steps; it should         only be used for debugging purposes.          &quot;conformance&quot; means to log all nonstandard conformance         problems that are discovered. In general, nonconformance is very         common for a DICOM object repository containing DICOM         objects from different sources, for example, a hospital or an imaging         center. This logging level may lead to large log files for         most scenarios, and lower performance.          &quot;warning&quot; means to log all recoverable messages that require         operator attention. For example, if a user invokes an         image processing function on a DICOM object and         Oracle does not recognize this DICOM object as an image,         a warning message is logged stating that this DICOM object         is not defined as an image. The processing of the image         content may continue if the CONFORMANCE_LEVEL        parameter is set to ignore &quot;NOT_AN_IMAGE&quot; exception.         &quot;error&quot; means to log only irrecoverable messages.         &quot;none&quot; means that logging is disabled.         Note: Do not use the &quot;debug&quot; option for a deployed system.         It adds significant overhead and slows down all         DICOM related functions.                PARAMETER: VALIDATE_METADATA        VALUE: Boolean{true, false(default)}        DESCRIPTION: The DICOM function extractMetadata takes a         mapping document as an input parameter. A mapping document        contains a namespace parameter (which can be empty). If an        XML schema is registered at this namespace, and the value of        the VALIDATE_METADATA parameter is true, the extractMetadata        function validates the resulting XML document against the        designated schema.        If the value of this parameter is false, the resulting XML document        is not validated.                PARAMETER: EXP_IF_NULL_ATTR_IN_CONSTRAINT        VALUE: Boolean{true(default), false}        DESCRIPTION: A DICOM object may not contain certain attributes        that are used in a constraint predicate. The object may        contain an attribute, but its value is empty. Both cases        result to a null value attribute. So a constraint        predicate involving this attribute has a null         parameter value such as (null== MY_VALUE).         If this preference parameter is set to true,        an exception is thrown if the first occurrence of a         a null-value attribute is not guarded by the &quot;notEmpty&quot;         Boolean function. If this parameter is set to false,         no exception is thrown and the predicate evaluates to         false. To avoid confusion, it is always better to guard an         attribute with &quot;notEmpty&quot; Boolean functions before using        the attribute value in a predicate.                 PARAMETER: MAX_RECURSION_DEPTH        VALUE: an integer type (default 16, 1 ~ 32767)        DESCRIPTION: This parameter restricts the number of levels of         recursions when evaluating a recursive constraint on a DICOM        object. If the recursion level exceeds this number, an exception        is thrown.                  PARAMETER: MANDATE_ATTR_TAGS_IN_STL         VALUE: Boolean{false(default), true}        DESCRIPTION: This parameter is used to enforce that all tags         used by the constraint and mapping documents must be listed in the        STORED_TAG_LIST(STL) document. This rule is not enforced by default.        If this preference parameter is set to true, the rule is enforced.         If an existing STL document does not satisfy this rule,        the preference value cannot be set to true until the        STL document is deleted.         PARAMETER: SQ_WRITE_LEN        VALUE: boolean{true(default), false}        DESCRIPTION: This parameter determines how the DICOM        sequence (SQ) types are encoded by the DICOM function writeMetadata().        If the value of this parameter is true, the SQ types are encoded        with explicit length and without item or sequence delimitors.        This is the default behavior and allows DICOM viewers to skip        the sequence attributes easily.        If the value of this parameter is false, the SQ types are encoded        with variable (or undefined) length and terminated with        sequence delimitors. This allows backward compatibility with some        older DICOM viewers and Dicom applications as they only support        undefined length for SQ types.        PARAMETER: SPECIFIC_CHARACTER_SET        VALUE: enum {ASCII(default), ISO_IR 100, ISO_IR 101, ISO_IR 109,                      ISO_IR 110, ISO_IR 144, ISO_IR 127, ISO_IR 126,                     ISO_IR 138, ISO_IR 148, ISO_IR 13, ISO_IR 166,                     ISO_IR 192, GB18030}        DESCRIPTION: This parameter determines how data elements with value        representations of SH (Short String), LO (Long String), ST (Short Text)        LT (Long Text), PN (Person Name) or UT (Unlimited Text) are decoded        when the Specific Character Set (0008,0005) Attribute is missing.        The DICOM standard states that the default character set         (ISO-IR 6, or ASCII) shall be used for decoding when the Specific        Character Set (0008,0005) Attribute is not specified. This parameter        allows an application to specify a different character set to         use in these cases.        PARAMETER: BINARY_SKIP_INVALID_ATTR        VALUE: boolean{false(default), true}        DESCRIPTION: It is possible that a DICOM object contains one or more        attribute values that do not conform to the DICOM specification. In the         event that such an attribute is present in a DICOM object, this         parameter determines whether or not to &quot;skip&quot; (i.e. not include) the         value of that attribute in the binary output when making a copy of the        object in question. The default behavior, specified by setting this        parameter to &quot;false&quot;, is to not skip these values and to include them        as-is in the coresponding output. When an attribute is skipped, its        value is included in the output truncated to length 0.   </xs:documentation>
  </xs:annotation>
  <xs:element name="DICOM_RUNTIME_PREFERENCES" oraxdb:propNumber="3479" oraxdb:global="true" oraxdb:SQLName="DICOM_RUNTIME_PREFERENCES" oraxdb:SQLType="DICOM_RUNTIME_PREFERENC539_T" oraxdb:SQLSchema="ORDSYS" oraxdb:memType="258">
    <xs:complexType oraxdb:SQLType="DICOM_RUNTIME_PREFERENC539_T" oraxdb:SQLSchema="ORDSYS">
      <xs:sequence>
        <xs:element name="DOCUMENT_HEADER" type="dt:DOCUMENT_HEADER_T" minOccurs="0" oraxdb:propNumber="3474" 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="PREFERENCE_DEF" maxOccurs="unbounded" oraxdb:propNumber="3478" oraxdb:global="false" oraxdb:SQLName="PREFERENCE_DEF" oraxdb:SQLType="PREFERENCE_DEF540_T" oraxdb:SQLSchema="ORDSYS" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="PREFERENCE_DEF541_COLL" oraxdb:SQLCollSchema="ORDSYS">
          <xs:annotation>
            <xs:documentation>                  Each PREFERENCE_DEF entry describes one parameter                  that a repository administrator may modify to adjust the                  run-time behavior of the DICOM functionality.            </xs:documentation>
          </xs:annotation>
          <xs:complexType oraxdb:SQLType="PREFERENCE_DEF540_T" oraxdb:SQLSchema="ORDSYS">
            <xs:sequence>
              <xs:element name="PARAMETER" type="dt:SHORT_ID_T" oraxdb:propNumber="3475" oraxdb:global="false" oraxdb:SQLName="PARAMETER" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true"/>
              <xs:element name="DESCRIPTION" type="dt:SHORT_TEXT_T" minOccurs="0" oraxdb:propNumber="3476" oraxdb:global="false" oraxdb:SQLName="DESCRIPTION" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true"/>
              <xs:element name="VALUE" oraxdb:propNumber="3477" oraxdb:global="false" oraxdb:SQLName="VALUE" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="true" oraxdb:SQLInline="true" oraxdb:JavaInline="true">
                <xs:simpleType>
                  <xs:restriction base="dt:SHORT_TEXT_T">
                    <xs:pattern value="[ 0-9_a-zA-Z]+"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
