<?xml version="1.0" encoding="UTF-8"?>
<!--
DMTF - Distributed Management Task Force, Inc. - http://www.dmtf.org

Release URLs:
http://schemas.dmtf.org/document/reference/1/dsp8052_1.0.0a.xsd

Document number: DSP8052
Date: 2010-02-15
Version: 1.0.0a
Document status: Work in Progress

Information for Work-in-Progress version:
This document is subject to change at any time without further notice.
It expires on: 2010-07-31.
Provide any comments through the DMTF Feedback Portal: http://www.dmtf.org/standards/feedback

Title: Document Reference XML Schema

Document type: Specification (W3C XML Schema Document)
Document language: E

Abstract:
This document defines an XML schema that is a building block for representing document reference
information (e.g. entries in Normative References and Bibliography).  For more details, see the
annotation description of the schema element.

Contact group: DMTF Profile Infrastructure Working Group, mrprofiles@dmtf.org

Normative references:
* DMTF DSP0004, CIM Infrastructure Specification 2.5,
  http://www.dmtf.org/standards/published_documents/DSP0004_2.5.pdf
* DMTF DSP1001, Management Profile Specification Usage Guide 1.1,
  http://www.dmtf.org/standards/published_documents/DSP1001_1.1.pdf
* DMTF DSP8053, Document Common Types XML Schema 1.0.0a,
  http://schemas.dmtf.org/document/commontypes/1/dsp8053_1.0.0a.xsd
* W3C XHTML 1.0 The Extensible HyperText Markup Language (Second Edition),
  W3C Recommendation 26 January 2000, revised 1 August 2002,
  http://www.w3.org/TR/xhtml1
* ISO/IEC Directives, Part 2:2004, Rules for the structure and drafting of International Standards,
  http://isotc.iso.org/livelink/livelink?func=ll&objId=4230456&objAction=browse

Acknowledgements:
DMTF acknowledges the contributions of the following individuals to this document:
* Andreas Maier, IBM (editor)

Copyright (C) 2010 Distributed Management Task Force, Inc. (DMTF).  All rights reserved.
DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and
systems management and interoperability.  Members and non-members may reproduce DMTF specifications
and documents for uses consistent with this purpose, provided that correct attribution is given.  As
DMTF specifications may be revised from time to time, the particular version and release date should
always be noted.  Implementation of certain elements of this standard or proposed standard may be
subject to third party patent rights, including provisional patent rights (herein "patent rights").
DMTF makes no representations to users of the standard as to the existence of such rights, and is
not responsible to recognize, disclose, or identify any or all such third party patent right, owners
or claimants, nor for any incomplete or inaccurate identification or disclosure of such rights,
owners or claimants.  DMTF shall have no liability to any party, in any manner or circumstance,
under any legal theory whatsoever, for failure to recognize, disclose, or identify any such third
party patent rights, or for such party's reliance on the standard or incorporation thereof in its
product, protocols or testing procedures.  DMTF shall have no liability to any party implementing
such standard, whether such implementation is foreseeable or not, nor to any patent owner or
claimant, and shall have no liability or responsibility for costs or losses incurred if a standard
is withdrawn or modified after publication, and shall be indemnified and held harmless by any party
implementing the standard from any and all claims of infringement by a patent owner for such
implementations.  For information about patents held by third-parties which have notified the DMTF
that, in their opinion, such patent may relate to or impact implementations of DMTF standards, visit
http://www.dmtf.org/about/policies/disclosures.php.

Change log:
1.0.0a - 2010-02-15 - Released as a Work in Progress.
-->
<xsd:schema targetNamespace="http://schemas.dmtf.org/document/reference/1" xmlns:cdr="http://schemas.dmtf.org/document/reference/1" xmlns:ct="http://schemas.dmtf.org/document/commontypes/1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" elementFormDefault="qualified">
    <xsd:annotation>
        <xsd:documentation>This document defines a XML schema that is a building block for
representing common document reference information.  Document reference information covers document
clauses "Normative References" and "Bibliography".  This XML schema is a building block for import
into larger XML schemas, such as machine readable profiles (see DSP8028).
This XML schema uses the "Venetian Blind" design pattern for the most part of it.  In that pattern,
only the XML elements intended to be used as root elements are declared as global elements in the
XML schema, and all relevant XML types are declared as global types, for internal use by the XML
schema.  Any global types are not intended to be used by referencing XML schemas.
This XML schema maintains forward compatibility w.r.t. its XML instance documents as follows:  An
updated minor version of the XML schema (e.g. "m.n+1.*") shall successfully validate XML instance
documents that validated successfully using the original version of the XML schema (e.g. "m.n.*").
An XML instance document that successfully validates against an updated minor version of the XML
schema may or may not validate against the original version of the XML schema.  In other words, the
XML schema may introduce additional functionality as long as it does not break existing XML instance
documents.</xsd:documentation>
    </xsd:annotation>
    <xsd:import namespace="http://schemas.dmtf.org/document/commontypes/1" schemaLocation="http://schemas.dmtf.org/document/commontypes/1/dsp8053_1.0.0a.xsd"/>
    <xsd:element name="NormativeReferences" type="cdr:DocumentReferences_Type">
        <xsd:annotation>
            <xsd:documentation>Document references for the "Normative References" clause.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="Bibliography" type="cdr:DocumentReferences_Type">
        <xsd:annotation>
            <xsd:documentation>Document references for the "Bibliography" annex.</xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="NormativeReferenceLink">
        <xsd:annotation>
            <xsd:documentation>Output formatting element: This element creates a hyperlink to an entry in the "normative references" clause of this profile.
The entry shall be referenced by matching the value of its name attribute with the refName attribute of this element.</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType mixed="true">
            <xsd:complexContent mixed="true">
                <xsd:extension base="ct:XHTML_Type">
                    <xsd:attribute name="refName" type="ct:Identifier_Type" use="required">
                        <xsd:annotation>
                            <xsd:documentation>The value of the name attribute of the normative reference entry that is linked.</xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="BibliographyLink">
        <xsd:annotation>
            <xsd:documentation>Output formatting element: This element creates a hyperlink to an entry in the "bibliography" clause of this profile.
The entry shall be referenced by matching the value of its name attribute with the refName attribute of this element.</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType mixed="true">
            <xsd:complexContent mixed="true">
                <xsd:extension base="ct:XHTML_Type">
                    <xsd:attribute name="refName" type="ct:Identifier_Type" use="required">
                        <xsd:annotation>
                            <xsd:documentation>The value of the name attribute of the bibliography entry that is linked.</xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="DocumentReferences_Type">
        <xsd:annotation>
            <xsd:documentation>Internal type representing document reference information.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Introduction" type="ct:XHTML_Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Introductory text for the following list of document references.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="DocumentReference" type="cdr:DocumentReference_Type" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>A document reference.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="DocumentReference_Type">
        <xsd:annotation>
            <xsd:documentation>Internal type representing a single document reference.</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="OwningEntity" type="cdr:DocumentOwningEntity_Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>A name that identifies the business entity owning the referenced document.
For documents owned by DMTF, the element is required and its value shall be "DMTF".
For documents owned by other business entities, the element is optional. If specified, its value should include a copyrighted, trademarked, or otherwise unique name that is owned by that business entity or that is a registered ID assigned to that business entity by a recognized global authority.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="ID" type="xsd:string" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>An identification of the referenced document, as defined by its owning entity.
For documents owned by DMTF, the element is required and its value shall be the DSP number of the document, in upper case (e.g. "DSP1234").
For documents owned by other business entities, the element is optional. If specified, it shall conform to any additional rules defined by that business entity.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="Title" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>The title of the referenced document.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="Version" type="cdr:ReferencedDocumentVersion_Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The version of the referenced document.
For documents owned by DMTF, the element is required and its value shall conform to the DMTF versioning rules defined in DSP0004 (see the pattern definition for the allowable format), and the value should only specify the major and minor version numbers (e.g. "1.1").
For documents owned by other business entities, the requirement to specify the element and any rules about its value are up to that business entity.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="Date" type="cdr:ReferencedDocumentDate_Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The date of the referenced document.
For documents owned by DMTF, the element shall not be specified.
For documents owned by other business entities, the requirement to specify the element is up to that business entity.
If specified, its value shall be in one of the formats: yyyy-mm-dd, yyyy-mm, yyyy.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>The name of an author of the referenced document.
For documents owned by DMTF, the element shall not be specified.
For documents owned by other business entities, the requirement to specify the element and any rules about its value are up to that business entity.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="Location" type="xsd:anyURI" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>A resolvable URL targeting the referenced document.
For documents owned by DMTF, the element is required and its value shall reference the publicly available version that is stated in the value of the cdr:Version element.
For documents owned by other entities, the element should be specified. If specified, its value shall reference a publicly available version of the document that matches the date or version specified in the other elements.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" use="required">
            <xsd:annotation>
                <xsd:documentation>An identifier for referencing the document reference.
The value shall be unique within the document that contains the document reference.
Since the uniqueness requirement applies to the document, across multiple usages of such name attributes, it is required that values of this attribute begin with "Ref_". Further, it is recommended that values of this attribute comply to the following ABNF rule: "Ref_" OwningEntity "_" ID, where OwningEntity and ID are the value of the like-named element.</xsd:documentation>
            </xsd:annotation>
            <xsd:simpleType>
                <xsd:restriction base="ct:Identifier_Type">
                    <xsd:pattern value="Ref_.*"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:simpleType name="DocumentOwningEntity_Type">
        <xsd:annotation>
            <xsd:documentation>Internal type for a name that identifies the business entity owning a document.</xsd:documentation>
        </xsd:annotation>
        <xsd:union>
            <xsd:simpleType>
                <xsd:annotation>
                    <xsd:documentation>For documents owned by DMTF.</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                    <xsd:pattern value="DMTF"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:annotation>
                    <xsd:documentation>For documents owned by other business entities.</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string"/>
            </xsd:simpleType>
        </xsd:union>
    </xsd:simpleType>
    <xsd:simpleType name="ReferencedDocumentDate_Type">
        <xsd:annotation>
            <xsd:documentation>Internal type for the date of the referenced document.</xsd:documentation>
        </xsd:annotation>
        <xsd:union memberTypes="xsd:date xsd:gYearMonth xsd:gYear"/>
    </xsd:simpleType>
    <xsd:simpleType name="ReferencedDocumentVersion_Type">
        <xsd:annotation>
            <xsd:documentation>Internal type for the version of the referenced document.</xsd:documentation>
        </xsd:annotation>
        <xsd:union>
            <xsd:simpleType>
                <xsd:annotation>
                    <xsd:documentation>For documents owned by DMTF.</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                    <xsd:pattern value="[0-9]+\.[0-9]+(\.[0-9]+[a-z]{0,2})?"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:annotation>
                    <xsd:documentation>For documents owned by other business entities.</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string"/>
            </xsd:simpleType>
        </xsd:union>
    </xsd:simpleType>
</xsd:schema>
