1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3758 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2009-12-25 00:41:06 +00:00
parent 96c7b6aea0
commit 2903f90a94

View File

@ -7,7 +7,7 @@
<xep>
<header>
<title>Twas The Night Before Christmas (Jabber Version)</title>
<abstract>The classic Christmas poem annotated with Jabber/XMPP protocols.</abstract>
<abstract>The classic Christmas poem annotated with XMPP protocols.</abstract>
&LEGALNOTICE;
<number>0169</number>
<status>Active</status>
@ -29,6 +29,12 @@
<supersededby/>
<shortname>N/A</shortname>
&stpeter;
<revision>
<version>1.1</version>
<date>2009-12-24</date>
<initials>psa</initials>
<remark><p>Corrected several examples and clarified the architectural assumptions.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2005-12-19</date>
@ -42,21 +48,21 @@
<p>'Twas the night before Christmas,</p>
<code><![CDATA[
<iq type='get'
from='narrator@twas-the-night.lit/home'
<iq from='narrator@twas-the-night.lit/home'
id='time1'
to='twas-the-night.lit'
id='time1'>
<query xmlns='jabber:iq:time'/>
type='get'>
<time xmlns='urn:xmpp:time'/>
</iq>
<iq type='result'
from='twas-the-night.lit'
<iq from='twas-the-night.lit'
id='time1'
to='narrator@twas-the-night.lit/home'
id='time1'>
<query xmlns='jabber:iq:time'>
<utc>18071224T22:58:35</utc>
<tz>EST</tz>
</query>
type='result'>
<time xmlns='urn:xmpp:time'>
<tzo>-05:00</tzo>
<utc>1807-12-25T04:58:35Z</utc>
</time>
</iq>
]]></code>
@ -64,7 +70,7 @@
<p>Not a creature was stirring, not even a mouse:</p>
<code><![CDATA[
<presence from='mouse@twas-the-night.lit/home'>
<presence from='mouse@twas-the-night.lit/house'>
<show>xa</show>
<status>zzz</status>
</presence>
@ -75,13 +81,15 @@
<p>The children were nestled all snug in their beds,</p>
<code><![CDATA[
<message from='child@twas-the-night.lit' to='narrator@twas-the-night.lit'>
<message from='child@twas-the-night.lit'
to='narrator@twas-the-night.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/physloc'>
<item>
<physloc xmlns='http://jabber.org/protocol/physloc' xml:lang='en'>
<room>children's bedroom</room>
</physloc>
<items node='http://jabber.org/protocol/geoloc'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
<room>children&apos;s bedroom</room>
</geoloc>
</item>
</items>
</event>
@ -91,10 +99,12 @@
<p>While visions of sugar-plums danced in their heads.</p>
<code><![CDATA[
<message from='child@twas-the-night.lit' to='narrator@twas-the-night.lit'>
<message from='child@twas-the-night.lit'
to='narrator@twas-the-night.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/activity'>
<item>
<item id='current'>
<activity xmlns='http://jabber.org/protocol/activity'>
<inactive>
<sleeping/>
@ -111,13 +121,15 @@
<p>Had just settled down for a long winter's nap.</p>
<code><![CDATA[
<message from='mama@twas-the-night.lit' to='narrator@twas-the-night.lit'>
<message from='mama@twas-the-night.lit'
to='narrator@twas-the-night.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/physloc'>
<item>
<physloc xmlns='http://jabber.org/protocol/physloc' xml:lang='en'>
<items node='http://jabber.org/protocol/geoloc'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
<room>master bedroom</room>
</physloc>
</geoloc>
</item>
</items>
</event>
@ -134,12 +146,12 @@
<p>But a miniature sleigh, and eight tiny rein-deer,</p>
<code><![CDATA[
<iq type='set'
from='sleigh@northpole.lit/sleigh'
to='info.northpole.lit'
id='geo87361'>
<iq from='sleigh@northpole.lit/sleigh'
id='geo87361'
to='sleigh@northpole.lit'
type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='sleigh/geoloc'>
<publish node='http://jabber.org/protocol/geoloc'>
<item id='87361'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
@ -153,9 +165,11 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='sleigh@northpole.lit'
to='polecom@northpole.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<items node='http://jabber.org/protocol/geoloc'>
<item id='87361'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
@ -174,47 +188,69 @@
<p>And he whistled, and shouted, and called them by name;</p>
<code><![CDATA[
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Now, Dasher!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Now, Dancer!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Now, Prancer and Vixen!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>On, Comet!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>On, Cupid!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>On, Donder and Blitzen!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>To the top of the porch!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>To the top of the wall!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Now dash away!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Dash away!</body>
</message>
<message from='reindeer@chat.northpole.lit/santa' to='reindeer@chat.northpole.lit' type='groupchat'>
<message from='reindeer@chat.northpole.lit/santa'
to='reindeer@chat.northpole.lit'
type='groupchat'>
<body>Dash away all!</body>
</message>
]]></code>
@ -231,7 +267,7 @@
id='geo87361'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='sleigh/geoloc'>
<item>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -244,10 +280,12 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='info.northpole.lit'
to='polecom@northpole.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<item>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -259,7 +297,6 @@
</message>
]]></code>
<p>And then, in a twinkling, I heard on the roof</p>
<p>The prancing and pawing of each little hoof.</p>
<p>As I drew in my hand, and was turning around,</p>
@ -272,7 +309,7 @@
id='geo117362'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='kringle/geoloc'>
<item>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -285,10 +322,10 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<item>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -300,7 +337,6 @@
</message>
]]></code>
<code><![CDATA[
<presence from='saintnick@northpole.lit/pda' to='house@chat.twas-the-night.lit/santa'/>
]]></code>
@ -321,10 +357,12 @@
<p>And I laughed when I saw him in spite of myself;</p>
<code><![CDATA[
<message from='narrator@twas-the-night.lit' to='mama@twas-the-night.lit'>
<message from='narrator@twas-the-night.lit'
to='mama@twas-the-night.lit'
type='headline>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<publish node='narrator/mood'>
<items>
<items node='narrator/mood'>
<item id='current'>
<mood xmlns='http://jabber.org/protocol/mood'>
<nervous/>
</mood>
@ -338,10 +376,12 @@
<p>Soon gave me to know I had nothing to dread.</p>
<code><![CDATA[
<message from='narrator@twas-the-night.lit' to='mama@twas-the-night.lit'>
<message from='narrator@twas-the-night.lit'
to='mama@twas-the-night.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<publish node='narrator/mood'>
<items>
<items node='narrator/mood'>
<item ='current'>
<mood xmlns='http://jabber.org/protocol/mood'>
<relieved/>
</mood>
@ -360,9 +400,10 @@
id='activity9412'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='kringle/activity'>
<item>
<item id='current'>
<activity xmlns='http://jabber.org/protocol/activity'>
<working/>
<text xml:lang='en'>delivering toys</text>
</activity>
</item>
</publish>
@ -371,12 +412,13 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<item>
<items node='kringle/activity'>
<item id='current'>
<activity xmlns='http://jabber.org/protocol/activity'>
<working/>
<text xml:lang='en'>delivering toys</text>
</activity>
</item>
</items>
@ -384,7 +426,6 @@
</message>
]]></code>
<p>And filled all the stockings; then turned with a jerk,</p>
<p>And laying his finger aside of his nose</p>
<p>And giving a nod, up the chimney he rose.</p>
@ -396,7 +437,7 @@
id='geo117363'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='kringle/geoloc'>
<item id='a1s2d3f4g5h6bjeh936'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -409,10 +450,12 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='info.northpole.lit'
to='polecom@northpole.lit'
type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<item id='a1s2d3f4g5h6bjeh936'>
<items node='kringle/geoloc'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -424,7 +467,6 @@
</message>
]]></code>
<p>He sprung to his sleigh, to his team gave a whistle,</p>
<p>And away they all flew, like the down of a thistle.</p>
@ -435,7 +477,7 @@
id='geo87362'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='sleigh/geoloc'>
<item id='a1s2d3f4g5h6bjeh936'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -448,10 +490,10 @@
]]></code>
<code><![CDATA[
<message from='info.northpole.lit' to='POLECOM@northpole.lit'>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='sleigh/geoloc'>
<item id='a1s2d3f4g5h6bjeh936'>
<item id='current'>
<geoloc xmlns='http://jabber.org/protocol/geoloc'>
<lat>41.70</lat>
<lon>-73.92</lon>
@ -463,24 +505,27 @@
</message>
]]></code>
<p>But I heard him exclaim, ere he drove out of sight --</p>
<code><![CDATA[
<message from='house@chat.twas-the-night.lit/santa' to='house@chat.twas-the-night.lit' type='groupchat'>
<message from='house@chat.twas-the-night.lit/santa'
to='house@chat.twas-the-night.lit'
type='groupchat'>
<body>Happy Christmas to all, and to all a good night.</body>
</message>
]]></code>
<code><![CDATA[
<presence from='saintnick@northpole.lit/pda' to='house@chat.twas-the-night.lit/santa' type='unavailable'/>
<presence from='saintnick@northpole.lit/pda'
to='house@chat.twas-the-night.lit/santa'
type='unavailable'/>
]]></code>
</section1>
<section1 topic='References' anchor='refs'>
<p>The foregoing poem, informally known as <cite>'Twas the Night Before Christmas</cite> but formally entitled <cite>Account of a Visit from St. Nicholas</cite>, was authored by Major Henry Livingston Jr. in 1807 or 1808. <note>As noted at &lt;<link url='http://rpo.library.utoronto.ca/poem/1312.html'>http://rpo.library.utoronto.ca/poem/1312.html</link>&gt;, "In the year 2000, Don Foster, an English professor at Vassar College in Poughkeepsie, New York, used external and internal evidence to show that Clement Clarke Moore could not have been the author of this poem, but that it was probably the work of Livingston, and that Moore had written another, and almost forgotten, Christmas piece, <cite>Old Santeclaus</cite>. Foster's analysis of this deception appears in his <cite>Author Unknown: On the Trail of Anonymous</cite> (New York: Henry Holt, 2000): 221-75." See also &lt;<link url='http://rpo.library.utoronto.ca/poet/204.html'>http://rpo.library.utoronto.ca/poet/204.html</link>&gt; and &lt;<link url='http://www.henrylivingston.com'>http://www.henrylivingston.com/</link>&gt;.</note></p>
<p>This document makes reference to the following Jabber/XMPP protocols:</p>
<p>This document makes reference to the following XMPP protocols:</p>
<ul>
<li>&rfc3921;</li>
<li>&xep0045;</li>
@ -489,7 +534,6 @@
<li>&xep0090;</li>
<li>&xep0107;</li>
<li>&xep0108;</li>
<li>&xep0112;</li>
<li>&xep0163;</li>
</ul>
<p>Note: For the sake of brevity, not all protocol exchanges are shown above. Refer to the appropriate specifications for detailed protocol descriptions.</p>
@ -498,7 +542,7 @@
<section1 topic='Architectural Assumptions' anchor='arch'>
<p>This document assumes the following architecture:</p>
<code><![CDATA[
+--- info.northpole.lit (pubsub service)
+--- info.northpole.lit (pubsub service) *
| |
| | (pubsub nodes)
| |
@ -510,7 +554,7 @@
| | | |
|-- narrator | |-- saintnick | (occupants)
|-- mama | |-- sleigh |
|-- child | |-- POLECOM * |-- dasher
|-- child | |-- polecom ** |-- dasher
|-- mouse | |-- dancer
| |-- prancer
chat.twas-the-night.lit (MUC service) |-- vixen
@ -520,7 +564,8 @@
|-- santa et al.
]]></code>
<p>In addition, we assume that the twas-the-night.lit server is running a virtual pubsub service for each account it hosts (in accordance with <cite>XEP-0163</cite>) and that the users "narrator", "mama", and "child" publish information to personal pubsub nodes related to mood (<cite>XEP-0107</cite>), activity (<cite>XEP-0108</cite>), and physical location (<cite>XEP-0112</cite>).</p>
<p>* The U.S. Military divides its operations geographically among NORTHCOM, SOUTHCOM, EUCOM, and PACOM. Given the scale of operations implemented by Santa's workshop, it comes as no surprise that the command center at the North Pole is known as POLECOM. Naturally POLECOM subscribes to the pubsub feeds for Santa's geolocation and activity, as well as the sleigh's geolocation, just in case a search and rescue mission needs to be initiated.</p>
<p>* Because millions of people track the movements and activities of Santa, northpole.lit runs a highly scalable, standalone pubsub service instead of PEP at Santa's bare JID.</p>
<p>** The U.S. Military divides its operations geographically among NORTHCOM, SOUTHCOM, EUCOM, and PACOM. Given the scale of operations implemented by Santa's workshop, it comes as no surprise that the command center at the North Pole is known as POLECOM. Naturally POLECOM subscribes to the pubsub feeds for Santa's geolocation and activity, as well as the sleigh's geolocation, just in case a search and rescue mission needs to be initiated.</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>