Internet Engineering Task Force Internet Draft Wu/Schulzrinne/Lennox wu-cpl-schema-01.txt Columbia University November 4, 2002 Expires: May 2003 An Extensible Markup Language Schema for Call Processing Language (CPL) STATUS OF THIS MEMO This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt To view the list Internet-Draft Shadow Directories, see http://www.ietf.org/shadow.html. Abstract This document provides an Extensible Markup Language (XML) Schema for the Call Processing Language (CPL). The original CPL specification only provides a Document Type Declaration (DTD) to describe the structure of the language. Compared with XML DTDs, XML schemas have many advantages such as performing stricter type checking, providing pre-defined data types and being able to derive new data types from existing ones. 1 Introduction The Call Processing Language (CPL) [1] is a language that can be used to describe and control Internet telephony services. It is based on the Extensible Markup Language (XML) [2], a common hierarchical format for describing structured data. Wu/Schulzrinne/Lennox [Page 1] Internet Draft CPL-Schema November 4, 2002 There are two primary formats used to describe the structure of an XML document. The older one, the Document Type Declaration (DTD) is part of the original XML specification; the newer one, the XML schema [3] was defined later. At the time the CPL specification was written, the XML schema specification had not yet been finalized, so the CPL specification only provides a DTD for the CPL. Compared with XML DTDs, XML schemas have many advantages. XML schemas perform stricter type checking and provide many pre-defined data types. Also, XML schemas allow the derivation of new data types from existing ones, making it easier to use XML schemas for CPL extensions. This document therefore defines an XML schema for the CPL. And we recommend that all future extensions of CPL should use schema definitions only. 2 Overview of the schema Most of the data types defined in the CPL DTD can be easily translated to an XML schema. However, two limitations on XML schema make several data types of CPL difficult to define. The first limitation is that several CPL data types are defined as having case-insensitive values, whereas XML schemas cannot easily define case-insensitive strings, so in the CPL schema, we have to use string patterns to define some tokens. For example, we have to use to define the token 'YEAR' in a case-insensitive manner. The second limitation of XML schema is that it only allows white space as a list delimiter. However, the time-switch of CPL follows Internet Calendaring and Scheduling Core Object Specification (iCalendar COS), RFC 2445 [4], which uses comma (,) as its list delimiter. So we cannot use to define some data types, such as the ByDayType, which contains a list of days of the week. We have to use string pattern to define the list. In addition, the time format in iCalendar is different from that provided in XML schema, so we have to use to define the time, instead of using type. 3 The XML schema of the CPL The following is the XML schema of the CPL. We have checked the schema with the examples in the original CPL specification. The namespace URI for elements defined by this specification is a URN [5], using the namespace identifier 'ietf' defined by [6] and extended by [7]. This URN is: urn:ietf:params:xml:ns:cpl Wu/Schulzrinne/Lennox [Page 2] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 3] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 4] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 5] Internet Draft CPL-Schema November 4, 2002 Should be list of YearDayType Wu/Schulzrinne/Lennox [Page 6] Internet Draft CPL-Schema November 4, 2002 Should be list of MonthDayType Should be list of ExtendedDayType Should be list of SecondMinuteType Should be list of HourType Wu/Schulzrinne/Lennox [Page 7] Internet Draft CPL-Schema November 4, 2002 Should be xs:datetime Should be xs:datetime Should be xs:duration Should be xs:datetime Wu/Schulzrinne/Lennox [Page 8] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 9] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 10] Internet Draft CPL-Schema November 4, 2002 Wu/Schulzrinne/Lennox [Page 11] Internet Draft CPL-Schema November 4, 2002 4 Examples Wu/Schulzrinne/Lennox [Page 12] Internet Draft CPL-Schema November 4, 2002 The following scripts are from the original CPL specification, but using the schema in this specification. As indicated from the examples, the complete schema can also be found at http://www.cs.columbia.edu/sip/cpl.xsd. Wu/Schulzrinne/Lennox [Page 13] Internet Draft CPL-Schema November 4, 2002 A Changes from Earlier Version A.1 Changes from Draft -00 * Bug fix, in xs:schema tag, change 'xmlns:tns' to 'xmlns' * Add example CPL scripts with using the schema in this specification B Authors' Addresses Xiaotao Wu Dept. of Computer Science Columbia University 1214 Amsterdam Avenue, MC 0401 New York, NY 10027 USA electronic mail: xiaotaow@cs.columbia.edu Henning Schulzrinne Dept. of Computer Science Columbia University 1214 Amsterdam Avenue, MC 0401 New York, NY 10027 USA electronic mail: schulzrinne@cs.columbia.edu Jonathan Lennox Dept. of Computer Science Columbia University 1214 Amsterdam Avenue, MC 0401 New York, NY 10027 USA electronic mail: lennox@cs.columbia.edu C Bibliography [1] J. Lennox and H. Schulzrinne, "CPL: A language for user control of internet telephony services," Internet Draft, Internet Engineering Task Force, Nov. 2001. Work in progress. [2] C. M. S.-M. E. M. Tim Bray, Jean Paoli, "Extensible markup language (xml) 1.0 (second edition)," W3C Recommendation, World Wide Web Consortium (W3C), 2000. http://www.w3.org/TR/2000/REC-xml- 20001006. [3] D. C. Fallside, "XML schema part 0: Primer," W3C Recommendation, World Wide Web Consortium (W3C), May 2001. http://www.w3.org/TR/xmlschema-0/. Wu/Schulzrinne/Lennox [Page 14] Internet Draft CPL-Schema November 4, 2002 [4] F. Dawson and D. Stenerson, "Internet calendaring and scheduling core object specification (icalendar)," RFC 2445, Internet Engineering Task Force, Nov. 1998. [5] R. Moats, "URN syntax," RFC 2141, Internet Engineering Task Force, May 1997. [6] R. Moats, "A URN namespace for IETF documents," RFC 2648, Internet Engineering Task Force, Aug. 1999. [7] M. Mealling, "The IETF XML registry," Internet Draft, Internet Engineering Task Force, July 2002. Work in progress. Full Copyright Statement Copyright (c) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Table of Contents Wu/Schulzrinne/Lennox [Page 15] Internet Draft CPL-Schema November 4, 2002 1 Introduction ........................................ 1 2 Overview of the schema .............................. 2 3 The XML schema of the CPL ........................... 2 4 Examples ............................................ 12 A Changes from Earlier Version ........................ 14 A.1 Changes from Draft -00 .............................. 14 B Authors' Addresses .................................. 14 C Bibliography ........................................ 14 Wu/Schulzrinne/Lennox [Page 16]