📄 rfc 3863 presence information data format (pidf).htm
字号:
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<impp:presence xmlns:impp="urn:ietf:params:xml:ns:pidf"
xmlns:myex="http://id.example.com/presence/"
entity="pres:someone@example.com">
<impp:tuple id="ck38g9">
<impp:status>
<impp:basic>open</impp:basic>
</impp:status>
<myex:mytupletag>Extended value in tuple</myex:mytupletag>
<impp:contact priority="0.65">tel:+09012345678</impp:contact>
</impp:tuple>
<impp:tuple id="md66je">
<impp:status>
<impp:basic>open</impp:basic>
</impp:status>
<impp:contact priority="1.0">
im:someone@mobilecarrier.net</impp:contact>
</impp:tuple>
<myex:mytag>My extended presentity information</myex:mytag>
</impp:presence>
<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>
<?xml version="1.0" encoding="UTF-8"?>
<impp:presence xmlns:impp="urn:ietf:params:xml:ns:pidf"
xmlns:myex="http://id.mycompany.com/presence/"
entity="pres:someone@example.com">
<impp:tuple id="tj25ds">
<impp:status>
<impp:basic>open</impp:basic>
</impp:status>
<myex:complexExtension>
<myex:ex1 impp:mustUnderstand="1">val1</myex:ex1>
<myex:ex2>val2</myex:ex2>
</myex:complexExtension>
<impp:contact priority="0.725">tel:+09012345678</impp:contact>
</impp:tuple>
<myex:mytag>My extended presentity information</myex:mytag>
</impp:presence>
Here, <myex:ex1> must be understood and, if it is not recognized,
<myex:complexExtension> MUST be ignored. <myex:mytag> and
<myex:ex2> 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.
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!-- This import brings in the XML language attribute xml:lang-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:element name="presence" type="tns:presence"/>
<xs:complexType name="presence">
<xs:sequence>
<xs:element name="tuple" type="tns:tuple" minOccurs="0"
maxOccurs="unbounded"/>
<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>
<xs:element name="note" type="tns:note" minOccurs="0"
maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="entity" type="xs:anyURI" use="required"/>
</xs:complexType>
<xs:complexType name="tuple">
<xs:sequence>
<xs:element name="status" type="tns:status"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="contact" type="tns:contact" minOccurs="0"/>
<xs:element name="note" type="tns:note" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
<xs:complexType name="status">
<xs:sequence>
<xs:element name="basic" type="tns:basic" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="basic">
<xs:restriction base="xs:string">
<xs:enumeration value="open"/>
<xs:enumeration value="closed"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="contact">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="priority" type="tns:qvalue"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="note">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="xml:lang"/>
</xs:extension>
<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>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="qvalue">
<xs:restriction base="xs:decimal">
<xs:pattern value="0(.[<A href="http://tools.ietf.org/html/rfc3863#ref-0-9">0-9</A>]{0,3})?"/>
<xs:pattern value="1(.0{0,3})?"/>
</xs:restriction>
</xs:simpleType>
<!-- Global Attributes -->
<xs:attribute name="mustUnderstand" type="xs:boolean" default="0">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:schema>
<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 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 + -