PIDF - examples with latest syntax
"Carr, Wayne" <[email protected]>
| Newsgroups | gmane.ietf.impp |
|---|---|
| Message-ID | <[email protected]> |
I updated the examples to match recent changes discussed in email in order to text the xml schema (remove presentity element, value element named basic). These examples are all valid according to the new xml schema (which I'll send out next). (To validate, if you're tool doesn't let you tell it where the schema is, you add an xsi:schemaLocation attribute to the presence element.) Example 4.2.2a <?xml version="1.0" encoding="UTF-8"?> <impp:presence xmlns:impp="urn:ietf:params:cpim-presence:" entity="pres:[email protected]"> <impp:tuple id="mobile-phone"> <impp:status> <impp:basic>open</impp:basic> </impp:status> <impp:contact priority="9">tel:09012345678</impp:contact> </impp:tuple> </impp:presence> Example 4.2.2b <?xml version="1.0" encoding="UTF-8"?> <presence xmlns="urn:ietf:params:cpim-presence:" entity="pres:[email protected]"> <tuple id="mobile-phone"> <status> <basic>open</basic> </status> <contact priority="9">tel:09012345678</contact> </tuple> </presence> Example 4.3.1 <?xml version="1.0" encoding="UTF-8"?> <presence xmlns="urn:ietf:params:cpim-presence:" xmlns:myex="http://id.mycompany.com/cpim-presence/" entity="pres:[email protected]"> <tuple id="mobile-im"> <status> <basic>open</basic> <myex:in>busy</myex:in> <myex:location>home</myex:location> </status> <contact priority="2">im:[email protected]</contact> <note>Don't Disturb Please!</note> <timestamp>2001-10-27T16:49:29Z</timestamp> </tuple> <tuple id="email"> <status> <basic>open</basic> </status> <contact priority="1">mailto:[email protected]</contact> </tuple> <note>I'll be in Tokyo tomorrow</note> </presence> Example 4.3.2 <?xml version="1.0" encoding="UTF-8"?> <impp:presence xmlns:impp="urn:ietf:params:cpim-presence:" xmlns:myex="http://id.mycompany.com/cpim-presence/" entity="pres:[email protected]"> <impp:tuple id="mobile-phone"> <impp:status> <impp:basic>open</impp:basic> </impp:status> <myex:mytupleelement>Extended value in tuple</myex:mytupleelement> <impp:contact priority="9">tel:09012345678</impp:contact> </impp:tuple> <impp:tuple id="mobile-im"> <impp:status> <impp:basic>open</impp:basic> </impp:status> <impp:contact priority="1">im:[email protected]</impp:contact> </impp:tuple> <!-- example had extension as presence child, not currently allowed <myex:mytag>My extended presentity information</myex:mytag> --> </impp:presence> Example 4.3.3 <?xml version="1.0" encoding="UTF-8"?> <impp:presence xmlns:impp="urn:ietf:params:cpim-presence:" xmlns:myex="http://id.mycompany.com/cpim-presence/" entity="pres:[email protected]"> <impp:tuple id="mobile-phone"> <impp:status> <impp:basic>open</impp:basic> </impp:status> <myex:mandatoryExtension impp:mustUnderstand="1"> <myex:ex1 impp:mustUnderstand="1">val1</myex:ex1> <myex:ex2>val2</myex:ex2> </myex:mandatoryExtension> <impp:contact priority="9">tel:09012345678</impp:contact> </impp:tuple> <!-- example had extension as presence child, not currently allowed <myex:mytag>My extended presentity information</myex:mytag> --> </impp:presence> Example 5.3a <?xml version="1.0" encoding="UTF-8"?> <presence xmlns="urn:ietf:params:cpim-presence:" entity="pres:[email protected]"> <tuple id="pc-im"> <status> <basic>open</basic> <myex:in xmlns:myex="http://id.www.example.com/location">away</myex:in> </status> <contact priority="2">im:[email protected]</contact> <note>Meeting Boss</note> </tuple> <tuple id="email"> <status> <basic>open</basic> </status> <contact priority="1">mailto:[email protected]</contact> </tuple> </presence> Example 5.3b <?xml version="1.0" encoding="UTF-8"?> <presence xmlns="urn:ietf:params:cpim-presence:" entity="pres:[email protected]"> <tuple id="mobile-phone"> <status> <basic>open</basic> </status> <contact priority="9">tel:09012345678</contact> </tuple> <tuple id="mobile-im"> <status> <basic>open</basic> <myex:in xmlns:myex="http://id.www.example.com/location">home</myex:in> </status> <contact priority="2">im:[email protected]</contact> </tuple> </presence> [reminder: [email protected] for non-technical discussions, please]