<?xml version="1.0"?>
<!-- These are the examples for XSF XEP-0079: Advanced Message Processing-->
<stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en"><!-- Example 1-->
<iq from='northumberland@shakespeare.lit/westminster'
    to='shakespeare.lit'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
      <!-- Example 2-->
<iq from='shakespeare.lit'
    to='northumberland@shakespeare.lit/westminster'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity name='Shakespeare IM' category='im' type='server'/>
    ...
    <feature var='http://jabber.org/protocol/amp'/>
    ...
  </query>
</iq>
      <!-- Example 3-->
<iq from='northumberland@shakespeare.lit/westminster'
    to='shakespeare.lit'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='http://jabber.org/protocol/amp'/>
</iq>
      <!-- Example 4-->
<iq from='shakespeare.lit'
    to='northumberland@shakespeare.lit/westminster'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='http://jabber.org/protocol/amp'>
    <identity name='Shakespeare IM AMP Support' category='im' type='server'/>
    ...
    <feature var='http://jabber.org/protocol/amp'/>
    <feature var='http://jabber.org/protocol/amp?action=drop'/>
    <feature var='http://jabber.org/protocol/amp?action=error'/>
    <feature var='http://jabber.org/protocol/amp?action=notify'/>
    <feature var='http://jabber.org/protocol/amp?condition=deliver'/>
    <feature var='http://jabber.org/protocol/amp?condition=expire-at'/>
    <feature var='http://jabber.org/protocol/amp?condition=match-resource'/>
    ...
  </query>
</iq>
      <!-- Example 5-->
<message
    from='northumberland@shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule condition='expire-at'
          action='drop'
          value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 6-->
<message
    from='northumberland@shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'
       per-hop='true'>
    <rule condition='expire-at'
          action='drop'
          value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 7-->
  <message from='hamlet.lit'
           to='bernardo@hamlet.lit/elsinore'
           id='chatty2'>
    <amp xmlns='http://jabber.org/protocol/amp'
         status='alert'
         from='bernardo@hamlet.lit/elsinore'
         to='francisco@hamlet.lit'>
      <rule action='alert' condition='deliver' value='stored'/>
    </amp>
  </message>
      <!-- Example 8-->
  <message from='hamlet.lit'
           to='bernardo@hamlet.lit/elsinore'
           type='error'
           id='chatty2'>
    <amp xmlns='http://jabber.org/protocol/amp'
         status='error'
         to='bernardo@hamlet.lit/elsinore'
         from='francisco@hamlet.lit'>
      <rule action='error' condition='deliver' value='stored'/>
    </amp>
    <error type='modify' code='500'>
      <undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
      <failed-rules xmlns='http://jabber.org/protocol/amp#errors'>
        <rule action='error' condition='deliver' value='stored'/>
      </failed-rules>
    </error>
  </message>
      <!-- Example 9-->
  <message from='hamlet.lit'
           to='bernardo@hamlet.lit/elsinore'
           id='chatty2'>
    <amp xmlns='http://jabber.org/protocol/amp'
         status='notify'
         to='bernardo@hamlet.lit/elsinore'
         from='francisco@hamlet.lit'>
      <rule action='notify' condition='deliver' value='stored'/>
    </amp>
  </message>
      <!-- Example 10-->
<message to='francisco@hamlet.lit/pda'
         from='bernardo@hamlet.lit/elsinore'
         id='ibb1'>
  <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
    qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
    WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
    IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
    AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
    kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
  </data>
  <amp xmlns='http://jabber.org/protocol/amp' per-hop='true'>
    <rule action='error' condition='expire-at' value='2004-09-10T08:33:14Z'/>
    <rule action='error' condition='match-resource' value='other'/>
  </amp>
</message>
    <!-- Example 11-->
<message from='hamlet.lit'
         to='bernardo@hamlet.lit/elsinore'
         id='ibb1'>
  <amp xmlns='http://jabber.org/protocol/amp'
      from='bernardo@hamlet.lit/elsinore'
      to='francisco@hamlet.lit/pda'>
    <rule action='error' condition='match-resource' value='other'/>
  </amp>
  <error type='modify' code='500'>
    <undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <failed-rules xmlns='http://jabber.org/protocol/amp#errors'>
      <rule action='error' condition='match-resource' value='other'/>
    </failed-rules>
  </error>
</message>
    <!-- Example 12-->
<message to='linuxwolf@outer-planes.net'
         from='receptionist@outer-planes.net'
         id='alert849'>
  <subject>Guest Alert!</subject>
  <body>
    There will be clients in the conference room today around 1 PM!
    As always, be courteous and quiet nearby...
  </body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2003-06-23T23:00:00Z'/>
  </amp>
</message>
    <!-- Example 13-->
<message to='francisco@hamlet.lit'
         from='bernardo@hamlet.lit/elsinore'
         type='chat'
         id='chatty1'>
  <body>Who&apos;s there?</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='deliver' value='stored'/>
  </amp>
</message>
    <!-- Example 14-->
<message to='francisco@hamlet.lit'
         from='bernardo@hamlet.lit/elsinore'
         type='chat'
         id='chatty2'>
  <body>Who&apos;s there?</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='alert' condition='deliver' value='stored'/>
  </amp>
</message>
    <!-- Example 15-->
<message from='hamlet.lit'
         to='bernardo@hamlet.lit/elsinore'
         id='chatty2'>
  <amp xmlns='http://jabber.org/protocol/amp'
       action='alert'
       from='bernardo@hamlet.lit/elsinore'
       to='francisco@hamlet.lit'>
    <rule action='alert' condition='deliver' value='stored'/>
  </amp>
</message>
    <!-- Example 16-->
<message
    from='northumberland@shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 17-->
<message
    from='shakespeare.lit'
    id='richard2-4.1.247'
    to='northumberland@shakespeare.lit'
    type='error'>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
  <error type='modify' code='400'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <unsupported-actions xmlns='http://jabber.org/protocol/amp'>
      <rule condition='expire-at'
            action='drop'
            value='2004-01-01T00:00:00Z'/>
    </unsupported-actions>
  </error>
</message>
      <!-- Example 18-->
<message
    from='shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 19-->
<message
    from='shakespeare.lit'
    id='richard2-4.1.247'
    to='northumberland@shakespeare.lit'
    type='error'>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
  <error type='modify' code='400'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <unsupported-conditions xmlns='http://jabber.org/protocol/amp'>
      <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
    </unsupported-conditions>
  </error>
</message>
      <!-- Example 20-->
<message
    from='northumberland@shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 21-->
<message
    from='shakespeare.lit'
    id='richard2-4.1.247'
    to='northumberland@shakespeare.lit'
    type='error'>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
  <error type='modify' code='405'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <invalid-rules xmlns='http://jabber.org/protocol/amp'>
      <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
    </invalid-rules>
  </error>
</message>
      <!-- Example 22-->
<message
    from='northumberland@shakespeare.lit'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
</message>
      <!-- Example 23-->
<message
    from='royalty.england.lit'
    id='richard2-4.1.247'
    to='northumberland@shakespeare.lit'
    type='error'>
  <amp xmlns='http://jabber.org/protocol/amp'>
    <rule action='drop' condition='expire-at' value='2004-01-01T00:00:00Z'/>
  </amp>
  <error type='cancel' code='503'>
    <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</message>
      <!-- Example 24-->
  <message from='hamlet.lit'
           to='bernardo@hamlet.lit/elsinore'
           id='chatty2'>
    <body>Who&apos;s there?</body>
    <amp xmlns='http://jabber.org/protocol/amp'
         status='error'
         from='francisco@hamlet.lit'
         to='bernardo@hamlet.lit/elsinore'>
      <rule action='error' condition='deliver' value='stored'/>
    </amp>
  </message>
      <!-- Example 25-->
  <message from='hamlet.lit'
           to='bernardo@hamlet.lit/elsinore'
           type='error'
           id='chatty2'>
    <amp xmlns='http://jabber.org/protocol/amp'
         status='error'
         from='francisco@hamlet.lit'
         to='bernardo@hamlet.lit/elsinore'>
      <rule action='error' condition='deliver' value='stored'/>
    </amp>
    <error type='modify' code='500'>
      <undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
      <failed-rules xmlns='http://jabber.org/protocol/amp#errors'>
        <rule action='error' condition='deliver' value='stored'/>
      </failed-rules>
    </error>
  </message>
      <!-- Example 26-->
  <stream:features>
    <amp xmlns='http://jabber.org/features/amp'/>
  </stream:features>
  </stream>

