⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc 3863 presence information data format (pidf).htm

📁 有关IMS SIP及Presence应用的RFC文档包
💻 HTM
📖 第 1 页 / 共 5 页
字号:


   <?xml version="1.0" encoding="UTF-8"?>
   <presence xmlns="urn:ietf:params:xml:ns:pidf"
        xmlns:im="urn:ietf:params:xml:ns:pidf:im"
        xmlns:myex="http://id.example.com/presence/"
        entity="pres:someone@example.com">
     <tuple id="bs35r9">
       <status>
         <basic>open</basic>
         <im:im>busy</im:im>
         <myex:location>home</myex:location>
       </status>
       <contact priority="0.8">im:someone@mobilecarrier.net</contact>
       <note xml:lang="en">Don't Disturb Please!</note>
       <note xml:lang="fr">Ne derangez pas, s'il vous plait</note>
       <timestamp>2001-10-27T16:49:29Z</timestamp>
     </tuple>
     <tuple id="eg92n8">
       <status>
         <basic>open</basic>
       </status>
       <contact priority="1.0">mailto:someone@example.com</contact>
     </tuple>
     <note>I'll be in Tokyo next week</note>
   </presence>

<SPAN class=h4><A name=section-4.3.2>4.3.2</A>.  Presence with Other Extension Elements</SPAN>

   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;impp:presence xmlns:impp="urn:ietf:params:xml:ns:pidf"
        xmlns:myex="http://id.example.com/presence/"
        entity="pres:someone@example.com"&gt;
     &lt;impp:tuple id="ck38g9"&gt;
       &lt;impp:status&gt;
         &lt;impp:basic&gt;open&lt;/impp:basic&gt;
       &lt;/impp:status&gt;
       &lt;myex:mytupletag&gt;Extended value in tuple&lt;/myex:mytupletag&gt;
       &lt;impp:contact priority="0.65"&gt;tel:+09012345678&lt;/impp:contact&gt;
     &lt;/impp:tuple&gt;
     &lt;impp:tuple id="md66je"&gt;
       &lt;impp:status&gt;
         &lt;impp:basic&gt;open&lt;/impp:basic&gt;
       &lt;/impp:status&gt;
       &lt;impp:contact priority="1.0"&gt;
          im:someone@mobilecarrier.net&lt;/impp:contact&gt;
     &lt;/impp:tuple&gt;
     &lt;myex:mytag&gt;My extended presentity information&lt;/myex:mytag&gt;
   &lt;/impp:presence&gt;




<SPAN class=grey>Sugano, et al.              Standards Track                    [Page 15]</SPAN>
<A id=page-16 href="http://tools.ietf.org/html/rfc3863#page-16" name=page-16><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc3863">RFC 3863</A>            Presence Information Data Format         August 2004</SPAN>


<SPAN class=h4><A name=section-4.3.3>4.3.3</A>.  Example Mandatory To Understand Elements</SPAN>

   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;impp:presence xmlns:impp="urn:ietf:params:xml:ns:pidf"
        xmlns:myex="http://id.mycompany.com/presence/"
        entity="pres:someone@example.com"&gt;
     &lt;impp:tuple id="tj25ds"&gt;
       &lt;impp:status&gt;
         &lt;impp:basic&gt;open&lt;/impp:basic&gt;
       &lt;/impp:status&gt;
       &lt;myex:complexExtension&gt;
         &lt;myex:ex1 impp:mustUnderstand="1"&gt;val1&lt;/myex:ex1&gt;
         &lt;myex:ex2&gt;val2&lt;/myex:ex2&gt;
       &lt;/myex:complexExtension&gt;
       &lt;impp:contact priority="0.725"&gt;tel:+09012345678&lt;/impp:contact&gt;
     &lt;/impp:tuple&gt;
     &lt;myex:mytag&gt;My extended presentity information&lt;/myex:mytag&gt;
   &lt;/impp:presence&gt;

   Here, &lt;myex:ex1&gt; must be understood and, if it is not recognized,
   &lt;myex:complexExtension&gt; MUST be ignored.   &lt;myex:mytag&gt; and
   &lt;myex:ex2&gt; MAY be ignored if they are not recognized.

<SPAN class=h3><A name=section-4.4>4.4</A>.  XML Schema Definitions</SPAN>

   This section gives the XML Schema Definition [<A title='"XML Schema Part 1: Structures"' href="http://tools.ietf.org/html/rfc3863#ref-XMLSchema1">XMLSchema1</A>] of the
   "application/pidf+xml" format.  This is presented as a formal
   definition of the "application/pidf+xml" format.  Note that the XML
   Schema definition is not intended to be used with on-the-fly
   validation of the presence XML document.

   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf"
        xmlns:tns="urn:ietf:params:xml:ns:pidf"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"&gt;

     &lt;!-- This import brings in the XML language attribute xml:lang--&gt;
     &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
       schemaLocation="http://www.w3.org/2001/xml.xsd"/&gt;

     &lt;xs:element name="presence" type="tns:presence"/&gt;

     &lt;xs:complexType name="presence"&gt;
       &lt;xs:sequence&gt;
         &lt;xs:element name="tuple" type="tns:tuple" minOccurs="0"
            maxOccurs="unbounded"/&gt;



<SPAN class=grey>Sugano, et al.              Standards Track                    [Page 16]</SPAN>
<A id=page-17 href="http://tools.ietf.org/html/rfc3863#page-17" name=page-17><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc3863">RFC 3863</A>            Presence Information Data Format         August 2004</SPAN>


         &lt;xs:element name="note" type="tns:note" minOccurs="0"
            maxOccurs="unbounded"/&gt;
         &lt;xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/&gt;
       &lt;/xs:sequence&gt;
       &lt;xs:attribute name="entity" type="xs:anyURI" use="required"/&gt;
     &lt;/xs:complexType&gt;

     &lt;xs:complexType name="tuple"&gt;
       &lt;xs:sequence&gt;
         &lt;xs:element name="status" type="tns:status"/&gt;
         &lt;xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/&gt;
         &lt;xs:element name="contact" type="tns:contact" minOccurs="0"/&gt;
         &lt;xs:element name="note" type="tns:note" minOccurs="0"
            maxOccurs="unbounded"/&gt;
         &lt;xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/&gt;
       &lt;/xs:sequence&gt;
       &lt;xs:attribute name="id" type="xs:ID" use="required"/&gt;
     &lt;/xs:complexType&gt;

     &lt;xs:complexType name="status"&gt;
       &lt;xs:sequence&gt;
         &lt;xs:element name="basic" type="tns:basic" minOccurs="0"/&gt;
         &lt;xs:any namespace="##other" processContents="lax" minOccurs="0"
            maxOccurs="unbounded"/&gt;
       &lt;/xs:sequence&gt;
     &lt;/xs:complexType&gt;
     &lt;xs:simpleType name="basic"&gt;
       &lt;xs:restriction base="xs:string"&gt;
         &lt;xs:enumeration value="open"/&gt;
         &lt;xs:enumeration value="closed"/&gt;
       &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;

     &lt;xs:complexType name="contact"&gt;
       &lt;xs:simpleContent&gt;
         &lt;xs:extension base="xs:anyURI"&gt;
           &lt;xs:attribute name="priority" type="tns:qvalue"/&gt;
         &lt;/xs:extension&gt;
       &lt;/xs:simpleContent&gt;
     &lt;/xs:complexType&gt;

     &lt;xs:complexType name="note"&gt;
       &lt;xs:simpleContent&gt;
         &lt;xs:extension base="xs:string"&gt;
           &lt;xs:attribute ref="xml:lang"/&gt;
         &lt;/xs:extension&gt;



<SPAN class=grey>Sugano, et al.              Standards Track                    [Page 17]</SPAN>
<A id=page-18 href="http://tools.ietf.org/html/rfc3863#page-18" name=page-18><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc3863">RFC 3863</A>            Presence Information Data Format         August 2004</SPAN>


       &lt;/xs:simpleContent&gt;
     &lt;/xs:complexType&gt;

     &lt;xs:simpleType name="qvalue"&gt;
       &lt;xs:restriction base="xs:decimal"&gt;
         &lt;xs:pattern value="0(.[<A href="http://tools.ietf.org/html/rfc3863#ref-0-9">0-9</A>]{0,3})?"/&gt;
         &lt;xs:pattern value="1(.0{0,3})?"/&gt;
       &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;

     &lt;!-- Global Attributes --&gt;
     &lt;xs:attribute name="mustUnderstand" type="xs:boolean" default="0"&gt;
       &lt;xs:annotation&gt;
         &lt;xs:documentation&gt;
         This attribute may be used on any element within an optional
         PIDF extension to indicate that the corresponding element must
         be understood by the PIDF processor if the enclosing optional
         element is to be handled.
         &lt;/xs:documentation&gt;
       &lt;/xs:annotation&gt;
     &lt;/xs:attribute&gt;
   &lt;/xs:schema&gt;

<SPAN class=h2><A name=section-5>5</A>.  IANA Considerations</SPAN>

   This memo calls for IANA to:

   -  register a new MIME content-type application/pidf+xml, per [<A title='"Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"' href="http://tools.ietf.org/html/rfc3863#ref-MIME">MIME</A>],

   -  register a new XML namespace URN per [<A title='"The IETF XML Registry"' href="http://tools.ietf.org/html/rfc3863#ref-XML-Registry">XML-Registry</A>].

   -  register a new XML namespace URN for status extensions per [XML-
      Registry].

   The registration templates for these are below. For more information
   on status extensions, see <A href="http://tools.ietf.org/html/rfc3863#section-4.2.5">section 4.2.5</A>.

<SPAN class=h3><A name=section-5.1>5.1</A>.  Content-type registration for 'application/pidf+xml'</SPAN>

   To: ietf-types@iana.org
   Subject: Registration of MIME media type application/pidf+xml

   MIME media type name:  application

   MIME subtype name:     pidf+xml

   Required parameters:   (none)




<SPAN class=grey>Sugano, et al.              Standards Track                    [Page 18]</SPAN>
<A id=page-19 href="http://tools.ietf.org/html/rfc3863#page-19" name=page-19><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc3863">RFC 3863</A>            Presence Information Data Format         August 2004</SPAN>


   Optional parameters:   charset
      Indicates the character encoding of enclosed XML.  Default is
      UTF-8.

   Encoding considerations:
      Uses XML, which can employ 8-bit characters, depending on the
      character encoding used.  See <A href="http://tools.ietf.org/html/rfc3023">RFC 3023</A> <A href="http://tools.ietf.org/html/rfc3023#section-3.2">[RFC 3023], section&nbsp;3.2</A>.

   Security considerations:
      This content type is designed to carry presence data, which may be
      considered private information.  Appropriate precautions should be
      adopted to limit disclosure of this information.

   Interoperability considerations:
      This content type provides a common format for exchange of
      presence information across different CPP compliant 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -