<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<!--
    FILE INFORMATION

    Description
       Guidelines for the handling and usage for XSD (Schema) SUPporting files

    OMA Permanent Document
       File: OMA-INF-HTM_SupportFiles_XSD-20100414-I
       Type: Text

    Private Reachable Information
       Path: http://www.openmobilealliance.org/ftp/REL/Procs
       Name: SupportFiles_XSD-v1_0.htm

    NORMATIVE INFORMATION

    This File provides guidance on XSD SUP files.  There is no 
    associated normative material.
	
    LEGAL DISCLAIMER

    Use of this document is subject to all of the terms and conditions
    of the Use Agreement located at
	http://www.openmobilealliance.org/UseAgreement.html

    You may use this document or any part of the document for internal
    or educational purposes only, provided you do not modify, edit or
    take out of context the information in this document in any manner.
    Information contained in this document may be used, at your sole
    risk, for any purposes.

    You may not use this document in any other manner without the prior
    written permission of the Open Mobile Alliance.  The Open Mobile
    Alliance authorizes you to copy this document, provided that you
    retain all copyright and other proprietary notices contained in the
    original materials on any copies of the materials and that you
    comply strictly with these terms.  This copyright permission does
    not constitute an endorsement of the products or services.  The
    Open Mobile Alliance assumes no responsibility for errors or
    omissions in this document.

    Each Open Mobile Alliance member has agreed to use reasonable
    endeavors to inform the Open Mobile Alliance in a timely manner of
    Essential IPR as it becomes aware that the Essential IPR is related
    to the prepared or published specification.  However, the members
    do not have an obligation to conduct IPR searches.  The declared
    Essential IPR is publicly available to members and non-members of
    the Open Mobile Alliance and may be found on the "OMA IPR
    Declarations" list at http://www.openmobilealliance.org/ipr.html.
    The Open Mobile Alliance has not conducted an independent IPR review
    of this document and the information contained herein, and makes no
    representations or warranties regarding third party IPR, including
    without limitation patents, copyrights or trade secret rights.  This
    document may contain inventions for which you must obtain licenses
    from third parties before making, using or selling the inventions.
    Defined terms above are set forth in the schedule to the Open Mobile
    Alliance Application Form.

    NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
    MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
    OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
    IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
    COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
    NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.

    THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
    DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
    EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
    DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.

    Copyright 2010 Open Mobile Alliance Ltd.  All Rights Reserved.
    Used with the permission of the Open Mobile Alliance Ltd. under the
    terms set forth above.
-->

<head>
	<title>Guidelines for Support Files - XML Schema Document (XSD)</title>
	<meta name="description" content="Guidelines for Support Files - XML Schema Document (XSD)">
	<link rel="stylesheet" href="../../GI_template/accessible_StaticPages.css" type="text/css">
	<link rel="stylesheet" href="ProcStyle.css" type="text/css">
</head>

<body>

<!--  Document Header  -->

<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr>
<td align=left><img src="imgOMAlogo.gif"></td>
<td align=right>
<p class=dochead>Guidelines for Support Files - XML Schema Documents (XSD)</p>
<p class=docfile>OMA-INF-HTM_SupportFiles_XSD-20090917-D</p>
</td>
</tr></table>

<!--  Navigation Bar  -->

<table width=100% cellspacing=0 cellpadding=0>
<tr><td colspan=2><img height=5 width=100% src="imgBitWht.gif"></tr>
<tr><td colspan=2><img height=5 width=100% src="imgBitSep.gif"></tr>
<tr>
<td class=navbar>
<a href="Procs-n-Guides.htm">Procs-n-Guides</a>&nbsp;>>
<a href="SupportFiles.htm">SupportFiles</a>&nbsp;>>
<b>XSD</b>
</td>
<td class=navbar align=right>Updated: 14 Apr 2010</td>
</tr>
<tr><td colspan=2><img height=5 width=100% src="imgBitSep.gif"></tr>
<tr><td colspan=2><img height=5 width=100% src="imgBitWht.gif"></tr>
</table>

<!--  Start of Document  -->

<h1>XML Schema Document (XSD) Files</h1>

<h3>Contents</h3>
<ul>
<li><a href="#desc">Description of XSD Files</a></li>
<li><a href="#namesp">Namespaces in OMA XSD Files</a></li>
<li><a href="#naming">Naming of OMA XSD Files</a></li>
<li><a href="#handling">Handling of XSD Files</a></li>
<li><a href="#package">XSD Files in Enabler Releases</a></li>
<li><a href="#public">Getting XSD Files into Public Directory</a></li>
<li><a href="#header">Embedded Header in OMA XSD Files</a></li>
</ul>

<a name="desc"><h2>Description of XSD Files</h2></a>
XML Schema Document (XSD) files provide an extensible mechanism to declare grammar for XML components.  The XSD files are usually reachable and permit validation of an XML document to the defined grammar.
<p>
For OMA, XSD files are normally loaded and available in a proscribed location.  That location is:
<pre>
<a href="http://www.openmobilealliance.org/tech/profiles/">http://www.openmobilealliance.org/tech/profiles/</a>
</pre>
An exception to this convention exists for the schema files associated with UAProf and those are located at:
<pre>
<a href="http://www.openmobilealliance.org/tech/profiles/UAPROF/">http://www.openmobilealliance.org/tech/profiles/UAPROF/</a>
</pre>

<a name="namesp"><h2>Namespaces in OMA XSD Files</h2>
Schema files are made extensible by the use of namespaces associated with the elements.  Each Schema declares the relationship  between elements and the associated schema files where the elements are defined.
<p>
To avoid conflict between names in different schema files, unique namespaces are used.  In OMA, the namespaces for XML schemas is maintained in OMNA.  This registry can be located at
<pre>
<a href="http://www.openmobilealliance.org/tech/omna/omna-schema-namespaces.aspx">http://www.openmobilealliance.org/tech/omna/omna-schema-namespaces.aspx</a>
</pre>
<h3>Format of the Namespace URN</h3>
The format of these namespaces is
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;<b>urn:oma:xml:</b><i>{SchemaDomain}</i><b>:</b><i>{SchemaLabel}</i><b>:</b><i>{SchemaVersion}</i>
</pre>
Example namespaces are:
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;<b>urn:oma:xml:<font color=red>prs</font>:<font color=blue>presrules</font>:<font color=purple>1.0</font></b>
&nbsp;&nbsp;&nbsp;&nbsp;<b>urn:oma:xml:<font color=red>xdm</font>:<font color=blue>ocap</font>:<font color=purple>1.1</font></b>
</pre>
<h3>Using the Namespace URN</h3>
The &lt;schema&gt; element includes information that declares sources for elements and attributes it uses.  The namespace URN would be used to declare the local namespace as well as the targetNamespace.
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:tst="<font color=blue>urn:oma:xml:enb:test:1.0</font>"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;targetNamespace="<font color=blue>urn:oma:xml:enb:test:1.0</font>"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elementFormDefault="qualified"&gt;
</pre>

<a name="naming"><h2>Naming of XSD Files</h2>
The public readable XSD file names are generally shorter and simpler than OMA permanent documents.  There is generally no need to have superfluous text in the file names and they usually avoid constructs like date strings and document status.  As a consequence, the following file name construction scheme is used for the 'SUP' files in the permanent document area and public file names.
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;Perm Doc - <b>OMA-SUP-XSD_</b><i>{publicNamePart}</i><b>-V</b><i>{versionNumbers}</i><b>-{DateStr}-{State}.txt</b>
&nbsp;&nbsp;&nbsp;&nbsp;Public   - <i>{publicNamePart}</i><b>-v</b><i>{versionNumbers}</i><b>.xsd</b>
</pre>
Where possible, the {publicNamePart} is derived from the specific parts of the namespace.
The following is an example of the desired relationship.
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;namespace  - <b>urn:oma:xml:<font color=red>foo:barcode:1.0</font></b>
&nbsp;&nbsp;&nbsp;&nbsp;perm doc   - <b>OMA-SUP-XSD_<font color=red>foo_barcode</font>-V<font color=red>1_0</font>-20060123-C.txt</font></b>
&nbsp;&nbsp;&nbsp;&nbsp;public doc - <b><font color=red>foo_barcode</font>-v<font color=red>1_0</font>.xsd</b>
</pre>
<p>
Name conversion would be based on URN translation scheme.  This would basically take the colons (':') as points for underscores ('_') in filename and if a dash occurs ('-') in the URN the segmented fields would be jammed together (as dashes have reserved usage in PD names) while removing superfluous 'oma' or repeated text with some compression (abbreviation) to avoid excessive file name lengths.  The following are examples:
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;<b>    URN for the Schema                             Public Reachable File Name</b>
&nbsp;&nbsp;&nbsp;&nbsp;urn:oma:xml:<font color=red>poc</font>:<font color=blue>group-advertisement</font>:<font color=purple>1.0</font>        ==> <font color=red>poc</font>_<font color=blue>groupAdvertisement</font>-v<font color=purple>1_0</font>.xsd 
&nbsp;&nbsp;&nbsp;&nbsp;urn:oma:xml:<font color=red>prs</font>:<font color=blue>pres-rules</font>:<font color=purple>1.1</font>                 ==> <font color=red>prs</font>_<font color=blue>presRules</font>-v<font color=purple>1_1</font>.xsd
&nbsp;&nbsp;&nbsp;&nbsp;urn:oma:xml:<font color=red>bcast</font>:<font color=blue>sg</font>:<font color=green>fragments</font>:<font color=purple>2.0</font>             ==> <font color=red>bcast</font>_<font color=blue>sg</font>_<font color=green>fragments</font>-v<font color=purple>2_0</font>.xsd
&nbsp;&nbsp;&nbsp;&nbsp;urn:oma:xml:<font color=red>xdm</font>:<font color=blue>resource-list</font>:<font color=green>oma-uriusage</font>:<font color=purple>1.0</font> ==> <font color=red>xdm</font>_<font color=blue>rsrclst</font>_<font color=green>uriusage</font>-v<font color=purple>1_0</font>.xsd
</pre>

<a name="handling"><h2>Handling of XSD Files</h3>
The XSD SUP file is maintained in the OMA Portal Permanent Document area as with the specifications in the enabler.  It is subject to revision using the normal CR process.  Application of CRs to a XSD SUP file will result in an updated file with the appropriate date associated.
<p>
The XSD SUP file should be treated as if it has the ".txt" file extension while in the permanent doc area.  Though it will be stored in zip format, it will simplify usage and edit.
<p>
References to OMA defined XSDs in specifications should be done <i><font color=blue>(This needs to be aligned with the Referencing Policy)</font></i> to the developed SUP file.  This will permit easy reference and retrieval of current or past versions using the normal PD file mechanisms.  An example reference would look like:
<center>
<table border=1>
<tr><td><font size=1><b>[FOO_XSD]</b>&nbsp;&nbsp;&nbsp;</font></td><td><font size=1>Schema for FOO Messages, Version 1.0, Open Mobile Alliance,<br>OMA-SUP-XSD_foo_barcode-V1_0, URL:http://www.openmobilealliance.org/&nbsp;&nbsp;&nbsp;&nbsp;</font></td></tr>
</table>
</center>
<p>
Examples in specifications which show schema file usage should utilize the public reachable file.  For example, the following show the usage of the schema XSD file.
<center><table border=1>
<tr><td bgcolor=#FFFFDD>
<font style=bold size=2 color=#0000FF><pre>

&lt!-- permit import of the specific schema, if needed -->
&lt;import namespace="urn:oma:xml:foo:barcode:1.0"
        schemaLocation="http://www.openmobilealliance.org/tech/profiles/foo_barcode-v1_0.xsd"/>&nbsp;&nbsp;&nbsp;&nbsp;
</pre></font></td></tr></table></center>
<p>

<a name="package"><h2>XSD Files in Enabler Releases</h3>
As with Specifications, Schemas are normally components of an Enabler Release.
So, similar to how Specifications are released, Schema files are packaged in the Enabler Release Package to be made available.
This packaging also includes appropriate linkages in the ERELD.
<p>
The following is an example Schema entry in the ERELD:
<center>
<table border=1>
<tr bgcolor=cyan>
  <td colspan=3><b><font size=1>Supporting Files</font></b></td>
</tr>
<tr>
  <td><font size=1><b>[FOO_Schema]</b>&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
  <td><font size=1>OMA-SUP-XSD_foo_barcode-V1_0-20060123-C&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
  <td><font size=1>
This Schema describes the barcode messages for the<br>
FOO Enabler.<br>
Working file in Schema directory:<br>
&nbsp;&nbsp;&nbsp;file: foo_barcode-v1_0.xsd<br>
&nbsp;&nbsp;&nbsp;path: http://www.openmobilealliance.org/tech/profiles/&nbsp;&nbsp;&nbsp;&nbsp;</font>
  </td>
</tr>
</table>
</center>

<a name="public"><h2>Getting XSD Files into Public Directory</h3>
As the public reachable schema files permit parsers to evaluate grammar for an XML document, it is sometimes required to get a copy of the XSD file into the public reachable directory.
<p>
The primary means of publishing the XSD file is the advancement of the enabler release to Candidate.
At that time, the DSO will review the ERELD and for each Schema listed, copy the material in the listed SUP file to the named version of the public XSD schema file.  This will also result in the XSD file being listed in the schema index page.
<p>
The DSO would perform the needed copy action like:
<pre>
Copy from <b>OMA-SUP-XSD_foo_barcode-V1_0-20060123-C.txt</b><br>
       to <b>http://www.openmobilealliance.org/tech/profiles/foo_barcode-v1_0.xsd</b>
</pre>
<p>
In cases where a draft version of the XSD schema file is needed in the public directory, the DSO can perform the copy dependent on the following conditions:
<ul>
<li>The XSD schema file has the proper header which provides name information for both the PD SUP file and the public file name</li>
<li>The draft XSD in the public area would not overlay an existing Candidate or Approved XSD already in the public schema directory</li>
<li>The schema directory will not be updated to show the XSD (done for Candidate) so users will need to know the URL by other means</li>
</ul>

<a name="header"><h2>Embedded Header in OMA XSD Files</h2></a>
The public XSD files are the products of OMA and should properly represent the associated terms and conditions.
This is done by providing information in the file itself that can be viewed by users.
For XSDs, this is done using commented material.
<p>
The following is an example header.

<center>
<table border=1 bgcolor=#DDEEFF><tr><td><pre><font size=-1>&lt;!--
FILE INFORMATION

Description
   This schema provices the barcodes for the FOO enabler

Version: 1.0  (1.0.1)
Date:    23 Jan 2006

OMA Permanent Document
   File: OMA-SUP-XSD_<font color=red>foo_barcode-V1_0</font>_1-20060123-C
   Type: Text

Public Reachable Information
   Path: http://www.openmobilealliance.org/tech/profiles
   Name: <font color=red>foo_barcode-v1_0</font>.xsd

NORMATIVE INFORMATION

Information about this file can be found in the latest revision of the specification
<font color=red>OMA-TS-FOO_BAR-V1_0</font> available at
   http://www.openmobilealliance.org/

Send comments to technical-comments@mail.openmobilealliance.org
	
LEGAL DISCLAIMER

Use of this document is subject to all of the terms and conditions
of the Use Agreement located at
http://www.openmobilealliance.org/UseAgreement.html

You may use this document or any part of the document for internal
or educational purposes only, provided you do not modify, edit or
take out of context the information in this document in any manner.
Information contained in this document may be used, at your sole
risk, for any purposes.

You may not use this document in any other manner without the prior
written permission of the Open Mobile Alliance.  The Open Mobile
Alliance authorizes you to copy this document, provided that you
retain all copyright and other proprietary notices contained in the
original materials on any copies of the materials and that you
comply strictly with these terms.  This copyright permission does
not constitute an endorsement of the products or services.  The
Open Mobile Alliance assumes no responsibility for errors or
omissions in this document.

Each Open Mobile Alliance member has agreed to use reasonable
endeavors to inform the Open Mobile Alliance in a timely manner of
Essential IPR as it becomes aware that the Essential IPR is related
to the prepared or published specification.  However, the members
do not have an obligation to conduct IPR searches.  The declared
Essential IPR is publicly available to members and non-members of
the Open Mobile Alliance and may be found on the "OMA IPR
Declarations" list at http://www.openmobilealliance.org/ipr.html.
The Open Mobile Alliance has not conducted an independent IPR review
of this document and the information contained herein, and makes no
representations or warranties regarding third party IPR, including
without limitation patents, copyrights or trade secret rights.  This
document may contain inventions for which you must obtain licenses
from third parties before making, using or selling the inventions.
Defined terms above are set forth in the schedule to the Open Mobile
Alliance Application Form.

NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.

THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.

Copyright 20<font color=red>08</font> Open Mobile Alliance Ltd.  All Rights Reserved.
Used with the permission of the Open Mobile Alliance Ltd. under the
terms set forth above.
--&gt;</font></pre></td></tr></table>
</center>
<p>
This commented header would normally be inserted in the XSD file near the beginning.


<!--  Document Footer  -->

<p>
<table width=100% cellspacing=0 cellpadding=0>
<tr><td colspan=2><img height=5 width=100% src="imgBitWht.gif"></tr>
<tr><td colspan=3><img height=5 width=100% src="imgBitSep.gif"></tr>
<tr>
<td class=footer align=left>&copy; 2010 Open Mobile Alliance, Ltd.<br>All Rights Reserved</td>
<td class=footer align=right>
<a href="http://www.openmobilealliance.org/AboutOMA/useterms.aspx">Website Terms of Use</a>
</td>
</tr>
</table>

</body>
</html>