XEP-0169: Twas The Night Before Christmas (Jabber Version)

Abstract
The classic Christmas poem annotated with XMPP protocols.
Author
Peter Saint-Andre
Copyright
© 2005 – 2021 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Active

NOTICE: This document is Humorous. It MAY provide amusement but SHOULD NOT be taken seriously.
Type
Humorous
Version
1.1.1 (2021-03-04)
Document Lifecycle
  1. Active

1. Poem

'Twas the night before Christmas,

<iq from='narrator@twas-the-night.lit/home'
    id='time1'
    to='twas-the-night.lit'
    type='get'>
  <time xmlns='urn:xmpp:time'/>
</iq>

<iq from='twas-the-night.lit'
    id='time1'
    to='narrator@twas-the-night.lit/home'
    type='result'>
  <time xmlns='urn:xmpp:time'>
    <tzo>-05:00</tzo>
    <utc>1807-12-25T04:58:35Z</utc>
  </time>
</iq>

When all through the house,

Not a creature was stirring, not even a mouse:

<presence from='mouse@twas-the-night.lit/house'>
  <show>xa</show>
  <status>zzz</status>
</presence>

The stockings were hung by the chimney with care,

In hopes that St. Nicholas soon would be there;

The children were nestled all snug in their beds,

<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/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
          <room>children&apos;s bedroom</room>
        </geoloc>
      </item>
    </items>
  </event>
</message>

While visions of sugar-plums danced in their heads.

<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 id='current'>
        <activity xmlns='http://jabber.org/protocol/activity'>
          <inactive>
            <sleeping/>
          </inactive>
          <text xml:lang='en'>dreaming of sugar-plums</text>
        </activity>
      </item>
    </items>
  </event>
</message>

And Mama in her 'kerchief, and I in my cap,

Had just settled down for a long winter's nap.

<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/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
          <room>primary bedroom</room>
        </geoloc>
      </item>
    </items>
  </event>
</message>

When out on the lawn there arose such a clatter,

I sprang from the bed to see what was the matter.

Away to the window I flew like a flash,

Tore open the shutters, and threw up the sash.

The moon on the breast of the new-fallen snow

Gave the lustre of mid-day to objects below,

When, what to my wondering eyes should appear,

But a miniature sleigh, and eight tiny rein-deer,

<iq from='sleigh@northpole.lit/sleigh'
    id='geo87361'
    to='sleigh@northpole.lit'
    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='http://jabber.org/protocol/geoloc'>
      <item id='87361'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>50</alt>
        </geoloc>
      </item>
    </publish>
  </pubsub>
</iq>
<message from='sleigh@northpole.lit'
         to='polecom@northpole.lit'
         type='headline'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='http://jabber.org/protocol/geoloc'>
      <item id='87361'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>50</alt>
        </geoloc>
      </item>
    </items>
  </event>
</message>

With a little old driver, so lively and quick,

I knew in a moment it must be St. Nick.

More rapid than eagles his coursers they came,

And he whistled, and shouted, and called them by name;

<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'>
  <body>Now, Dancer!</body>
</message>

<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'>
  <body>On, Comet!</body>
</message>

<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'>
  <body>On, Donder and Blitzen!</body>
</message>

<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'>
  <body>To the top of the wall!</body>
</message>

<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'>
  <body>Dash away!</body>
</message>

<message from='reindeer@chat.northpole.lit/santa'
         to='reindeer@chat.northpole.lit'
         type='groupchat'>
  <body>Dash away all!</body>
</message>

As dry leaves that before the wild hurricane fly,

When they meet with an obstacle, mount to the sky,

So up to the house-top the coursers they flew,

With the sleigh full of toys, and St. Nicholas too.

<iq type='set'
    from='sleigh@northpole.lit/sleigh'
    to='info.northpole.lit'
    id='geo87361'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='sleigh/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>60</alt>
        </geoloc>
      </item>
    </publish>
  </pubsub>
</iq>
<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='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>60</alt>
        </geoloc>
      </item>
    </items>
  </event>
</message>

And then, in a twinkling, I heard on the roof

The prancing and pawing of each little hoof.

As I drew in my hand, and was turning around,

Down the chimney St. Nicholas came with a bound.

<iq type='set'
    from='saintnick@northpole.lit/pda'
    to='info.northpole.lit'
    id='geo117362'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='kringle/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>52</alt>
        </geoloc>
      </item>
    </publish>
  </pubsub>
</iq>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='sleigh/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>52</alt>
        </geoloc>
      </item>
    </items>
  </event>
</message>
<presence from='saintnick@northpole.lit/pda' to='house@chat.twas-the-night.lit/santa'/>

He was dressed all in fur, from his head to his foot,

And his clothes were all tarnished with ashes and soot;

A bundle of toys he had flung on his back,

And he looked like a peddler just opening his pack.

His eyes -- how they twinkled! his dimples how merry!

His cheeks were like roses, his nose like a cherry!

His droll little mouth was drawn up like a bow,

And the beard of his chin was as white as the snow;

The stump of a pipe he held tight in his teeth,

And the smoke it encircled his head like a wreath;

He had a broad face and a little round belly,

That shook, when he laughed, like a bowlful of jelly.

He was chubby and plump, a right jolly old elf,

And I laughed when I saw him in spite of myself;

<message from='narrator@twas-the-night.lit'
         to='mama@twas-the-night.lit'
         type='headline>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='narrator/mood'>
      <item id='current'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <nervous/>
        </mood>
      </item>
    </items>
  </event>
</message>

A wink of his eye and a twist of his head

Soon gave me to know I had nothing to dread.

<message from='narrator@twas-the-night.lit'
         to='mama@twas-the-night.lit'
         type='headline'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='narrator/mood'>
      <item ='current'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <relieved/>
        </mood>
      </item>
    </items>
  </event>
</message>

He spoke not a word, but went straight to his work,

<iq type='set'
    from='saintnick@northpole.lit/pda'
    to='info.northpole.lit'
    id='activity9412'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='kringle/activity'>
      <item id='current'>
        <activity xmlns='http://jabber.org/protocol/activity'>
          <working/>
          <text xml:lang='en'>delivering toys</text>
        </activity>
      </item>
    </publish>
  </pubsub>
</iq>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <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>
  </event>
</message>

And filled all the stockings; then turned with a jerk,

And laying his finger aside of his nose

And giving a nod, up the chimney he rose.

<iq type='set'
    from='saintnick@northpole.lit/pda'
    to='info.northpole.lit'
    id='geo117363'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='kringle/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>60</alt>
        </geoloc>
      </item>
    </publish>
  </pubsub>
</iq>
<message from='info.northpole.lit'
         to='polecom@northpole.lit'
         type='headline'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='kringle/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>60</alt>
        </geoloc>
      </item>
    </items>
  </event>
</message>

He sprung to his sleigh, to his team gave a whistle,

And away they all flew, like the down of a thistle.

<iq type='set'
    from='sleigh@northpole.lit/sleigh'
    to='info.northpole.lit'
    id='geo87362'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='sleigh/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>100</alt>
        </geoloc>
      </item>
    </publish>
  </pubsub>
</iq>
<message from='info.northpole.lit' to='polecom@northpole.lit'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='sleigh/geoloc'>
      <item id='current'>
        <geoloc xmlns='http://jabber.org/protocol/geoloc'>
          <lat>41.70</lat>
          <lon>-73.92</lon>
          <alt>100</alt>
        </geoloc>
      </item>
    </items>
  </event>
</message>

But I heard him exclaim, ere he drove out of sight --

<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>
<presence from='saintnick@northpole.lit/pda'
          to='house@chat.twas-the-night.lit/santa'
          type='unavailable'/>

2. References

The foregoing poem, informally known as 'Twas the Night Before Christmas but formally entitled Account of a Visit from St. Nicholas, was authored by Major Henry Livingston Jr. in 1807 or 1808. [1]

This document makes reference to the following XMPP protocols:

Note: For the sake of brevity, not all protocol exchanges are shown above. Refer to the appropriate specifications for detailed protocol descriptions.

3. Architectural Assumptions

This document assumes the following architecture:

                                                   +--- info.northpole.lit (pubsub service) *
                                                   |      |
                                                   |      | (pubsub nodes)
                                                   |      |
+--------------------+  (s2s)  +---------------+   |      |-- kringle/activity
| twas-the-night.lit | ------- | northpole.lit |---|      |-- kringle/geoloc
+--------------------+         +---------------+   |      |-- sleigh/geoloc
    |             |                |               |
    | (users)     |                | (users)       +--- chat.northpole.lit (MUC service)
    |             |                |                      |
    |-- narrator  |                |-- saintnick          | (occupants)
    |-- mama      |                |-- sleigh             |
    |-- child     |                |-- polecom **         |-- dasher
    |-- mouse     |                                       |-- dancer
                  |                                       |-- prancer
         chat.twas-the-night.lit (MUC service)            |-- vixen
                  |                                       |-- cupid
                  | (occupants)                           |-- donder
                  |                                       |-- blitzen
                  |-- santa et al.

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 Personal Eventing Protocol (XEP-0163) [9]) and that the users "narrator", "mama", and "child" publish information to personal pubsub nodes related to mood (XEP-0107), activity (XEP-0108), and physical location (XEP-0112).

* 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.

** 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.

4. Internationalization Considerations

The protagonist of this poem is variously called (in English) St. Nicholas, St. Nick, Santa Claus, Kris Kringle, and bears a striking resemblance to the Sinterklaas of Dutch legend. Use of the name "St. Nicholas" is not meant to disparage other names for this character in English or any other language.

5. Security Considerations

It is NOT RECOMMENDED for mere mortals to fly in reindeer-powered sleighs, to enter and exit houses through chimneys, or to perform other dangerous acts described herein.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [10].

7. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [11].


Appendices

Appendix A: Document Information

Series
XEP
Number
0169
Publisher
XMPP Standards Foundation
Status
Active
Type
Humorous
Version
1.1.1
Last Updated
2021-03-04
Approving Body
XMPP Council
Dependencies
XMPP IM, XEP-0045, XEP-0060, XEP-0080, XEP-0090, XEP-0107, XEP-0108, XEP-0112, XEP-0163
Supersedes
None
Superseded By
None
Short Name
N/A
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. As noted at <http://rpo.library.utoronto.ca/poem/1312.html>, "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, Old Santeclaus. Foster's analysis of this deception appears in his Author Unknown: On the Trail of Anonymous (New York: Henry Holt, 2000): 221-75." See also <http://rpo.library.utoronto.ca/poet/204.html> and <http://www.henrylivingston.com/>.

2. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.

3. XEP-0045: Multi-User Chat <https://xmpp.org/extensions/xep-0045.html>.

4. XEP-0060: Publish-Subscribe <https://xmpp.org/extensions/xep-0060.html>.

5. XEP-0080: User Geolocation <https://xmpp.org/extensions/xep-0080.html>.

6. XEP-0090: Legacy Entity Time <https://xmpp.org/extensions/xep-0090.html>.

7. XEP-0107: User Mood <https://xmpp.org/extensions/xep-0107.html>.

8. XEP-0108: User Activity <https://xmpp.org/extensions/xep-0108.html>.

9. XEP-0163: Personal Eventing Protocol <https://xmpp.org/extensions/xep-0163.html>.

10. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

11. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 1.1.1 (2021-03-04)

    Cross-document editorial adjustments for inclusive language.

    mw
  2. Version 1.1 (2009-12-24)

    Corrected several examples and clarified the architectural assumptions.

    psa
  3. Version 1.0 (2005-12-19)

    Happy Holidays!

    psa

Appendix I: Bib(La)TeX Entry

@report{saint-andre2005n/a,
  title = {Twas The Night Before Christmas (Jabber Version)},
  author = {Saint-Andre, Peter},
  type = {XEP},
  number = {0169},
  version = {1.1.1},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0169.html},
  date = {2005-12-19/2021-03-04},
}

END