### Example SQL Script for Database Setup
Source: https://xmpp.org/extensions/xep-0043.html
This SQL script is used to set up an example database named 'testdb' with two tables, 'tbl_one' and 'tbl_two', for use with the protocol.
```sql
create table tbl_one
(
a_int int,
a_float float,
a_char char(10)
)
create table tbl_two
(
a_date datetime,
a_numeric numeric(9,3)
)
```
--------------------------------
### Start Database Readout Failure Example
Source: https://xmpp.org/extensions/xep-0326.html
This example shows an IQ set request to start a database readout and the subsequent IQ error response indicating insufficient privileges.
```xml
...
```
--------------------------------
### Stream Setup before TLS
Source: https://xmpp.org/extensions/xep-0288.html
This example shows the stream setup process before TLS negotiation, including the bidirectional stream feature and Server Dialback result exchange. It precedes the TLS handshake and subsequent authentication.
```xml
e3f5cf21f12749ef2cf59269bc0118f35bc46b26
```
--------------------------------
### httpx URL Examples
Source: https://xmpp.org/extensions/xep-0332.html
Illustrative examples of the 'httpx' URI scheme, demonstrating its structure with different paths and queries.
```text
httpx://httpServer@example.org/index.html
httpx://httpServer@example.org/images/image1.png
httpx://httpServer@example.org/api?p1=a&p2=b
```
--------------------------------
### Examples of httpx URLs
Source: https://xmpp.org/extensions/xep-0332.html
Illustrates various examples of valid URLs using the 'httpx' scheme.
```text
httpx://httpServer@example.org/index.html
httpx://httpServer@example.org/images/image1.png
httpx://httpServer@example.org/api?p1=a&p2=b
```
--------------------------------
### EXI Option Document for Shortcut Setup (Client to Server)
Source: https://xmpp.org/extensions/xep-0322.html
This XML document specifies EXI options for shortcut setup, including the schema ID. It allows clients to initiate a stream using previously negotiated configurations.
```xml
c:761aabc0-a255-4b9b-89a1-4cb859559691
```
--------------------------------
### Jingle Fingerprint Element Example
Source: https://xmpp.org/extensions/xep-0320.html
An example of the Jingle fingerprint element, demonstrating the use of 'sha-256' for the hash and 'actpass' for the setup role.
```xml
02:1A:CC:54:27:AB:EB:9C:53:3F:3E:4B:65:2E:7D:46:3F:54:42:CD:54:F1:7A:03:A2:7D:F9:B0:7F:46:19:B2
```
--------------------------------
### Client initiates quick configuration
Source: https://xmpp.org/extensions/xep-0322.html
Use this XML stanza to request a quick configuration setup using a previously established configuration ID. Ensure the configurationId is valid.
```xml
```
--------------------------------
### Get Capabilities (No Batch Commands)
Source: https://xmpp.org/extensions/xep-0326.html
Request capabilities from a smaller gateway that may not support batch operations. This example shows the initial 'get' IQ.
```xml
```
--------------------------------
### GET Method Call
Source: https://xmpp.org/extensions/xep-0332.html
Shows an example of a GET method call over XMPP, including the response with data. Note that the 'Connection: Close' header has no meaning in this context.
```xml
Fri, 03 May 2013 16:39:54GMT-4
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@base <http://example.org/>.
<xep> dc:title "HTTP over XMPP";
dc:creator <PeterWaher>;
dc:publisher <XSF>.
```
--------------------------------
### JOBS OOB 'init' Command-line Example
Source: https://xmpp.org/extensions/xep-0042.html
Example of the command-line for the 'init' method in the JOBS OOB protocol. This is used to initiate a new session.
```text
jobs/0.4 init
```
--------------------------------
### Example Client and DSPS JIDs for Connection
Source: https://xmpp.org/extensions/xep-0037.html
An example of the string format for initiating a DSPS connection, showing a client JID and a DSPS JID.
```text
rob@nauseum.org/dspsclient dsps.jabber.org/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
```
--------------------------------
### Get Common Commands for Nodes Example
Source: https://xmpp.org/extensions/xep-0326.html
Illustrates an IQ get stanza to retrieve common commands for a list of specified nodes and the IQ result stanza containing the available commands.
```xml
```
--------------------------------
### Embed JSON in a Custom Protocol IQ Get
Source: https://xmpp.org/extensions/xep-0335.html
This example shows how to embed JSON within an IQ 'get' request for a custom protocol. The element should be nested within a protocol-specific element.
```xml
{ "name": "romeo" }
```
--------------------------------
### Client Initiation with Pipelining
Source: https://xmpp.org/extensions/xep-0305.html
Client sends initial stream header, STARTTLS command, and TLS ClientHello. Assumes server supports XMPP STARTTLS.
```xml
TLS ClientHello
```
--------------------------------
### Actual EXI Stream for Setup Response
Source: https://xmpp.org/extensions/xep-0322.html
This is the raw EXI byte stream representing the server's setup response, including schema information.
```exi
0000000 7c 08 c9 8d cd 8c 58 58 58 98 cc 0b 58 4c 8d 4d
0000020 4b 4d 18 8e 58 8b 4e 0e 58 4c 4b 4d 18 d8 8e 0d
0000040 4e 4d 4d 4e 4d 8e 4c 72 a8 28 89 05 1a 9a 52 95
0000060 e1 00 96 b1 2c e1 6a 92 a1 3c 47 41 de 47 a4 81
0000100 a1 d1 d1 c0 e8 bc bd a9 85 89 89 95 c8 b9 bd c9
0000120 9c bd c1 c9 bd d1 bd 8d bd b0 bd b5 d5 8c 84 0a
0000140 22 33 88 e1 08 a7 60 54 45 a9 23 3b d6 d7 9c 26
0000160 31 14 77 1d 23 26 68 74 74 70 3a 2f 2f 6a 61 62
0000200 62 65 72 2e 6f 72 67 2f 70 72 6f 74 6f 63 6f 6c
0000220 2f 6d 75 63 23 6f 77 6e 65 72 c0
0000233
```
--------------------------------
### Start Database Readout Invalid Input Failure Example
Source: https://xmpp.org/extensions/xep-0326.html
This example demonstrates an IQ set request for a database readout that results in an IQ error response due to invalid input parameters, specifically a 'FormError' with a detailed error message.
```xml
...
2013-03-23T00:00:00
2013-03-22T00:00:00
...
The To timestamp cannot be older than the From timestamp.
```
--------------------------------
### XMPP IQ Get for Ping
Source: https://xmpp.org/extensions/xep-0238.html
An example of an IQ stanza used to request a ping, demonstrating the structure for sending queries between XMPP entities.
```xml
```
--------------------------------
### Example External Service Registrations
Source: https://xmpp.org/extensions/xep-0215.html
These examples demonstrate how to register STUN and TURN services. Multiple service types can be registered within separate elements.
```xml
stun
a server that provides Session Traversal Utilities for NAT (STUN)
RFC 5389
turn
a server that provides Traversal Using Relays around NAT (TURN)
RFC 5766
```
--------------------------------
### XML Equivalent of EXI Setup Response
Source: https://xmpp.org/extensions/xep-0322.html
This XML snippet shows the server's response to a client's EXI setup request, indicating agreement and providing schema information.
```xml
```
--------------------------------
### Get All Databases (XMPP IQ)
Source: https://xmpp.org/extensions/xep-0326.html
Use the getDatabases command to retrieve a list of available databases on the concentrator. This example shows both the request and the expected result.
```xml
```
```xml
```
--------------------------------
### Client requests to start EXI compression
Source: https://xmpp.org/extensions/xep-0322.html
Send this stanza to signal readiness to begin EXI compression after successful option negotiation. The method must be set to 'exi'.
```xml
exi
```
--------------------------------
### HTTP Client Makes Request (No Credentials)
Source: https://xmpp.org/extensions/xep-0070.html
An example of an HTTP GET request made by a client to retrieve a resource. This is the initial request before any authentication is attempted.
```http
GET https://files.shakespeare.lit:9345/missive.html HTTP/1.1
```
--------------------------------
### Strong Emphasis Span Example
Source: https://xmpp.org/extensions/xep-0393.html
Shows text enclosed in asterisks, intended for bold display. The opening delimiter must be at the start of the block or after whitespace.
```html
The full title is "Twelfth Night, or What You Will" but
*most* people shorten it.
```
--------------------------------
### Service Discovery Info Request (XMPP)
Source: https://xmpp.org/extensions/xep-0481.html
An example of an XMPP IQ get request to query for service discovery information, used to determine if a feature is supported.
```xml
```
--------------------------------
### Server Information with Software Version
Source: https://xmpp.org/extensions/xep-0485.html
This XML example extends the server information to include software version details using the 'query' element from XEP-0092.
```xml
Openfire
4.8.0
Windows 11
```
--------------------------------
### Terminate Session (Application Setup Failed)
Source: https://xmpp.org/extensions/xep-0166.html
Use this when the application setup fails. The terminating party sends a session-terminate IQ with a reason.
```xml
```
--------------------------------
### Jingle Session-Accept with DTLS Fingerprint
Source: https://xmpp.org/extensions/xep-0320.html
Example of an IQ stanza for a Jingle session-accept where the responder includes the DTLS fingerprint information. Note the 'setup' attribute is 'active' in this case.
```xml
```
--------------------------------
### Send DNS Query using IQ Get
Source: https://xmpp.org/extensions/xep-0418.html
An example of an IQ-get stanza used to send a DNS query. The element contains the base64-encoded DNS query.
```xml
vOIBIAABAAAAAAABB2V4YW1wbGUDb3JnAAABAAEAACkQAAAAAAAADAAKAAj5HO5JuEe+mA
```
--------------------------------
### Server Agreement on EXI Setup
Source: https://xmpp.org/extensions/xep-0322.html
The server's response to a setup test, indicating agreement and providing a configuration ID. It mirrors the schema information sent by the client.
```xml
```
--------------------------------
### VPI Delegation Example
Source: https://xmpp.org/extensions/xep-0151.html
This VPI configuration demonstrates delegation, directing the client to another VPI file.
```xml
http://www.shakespeare.com/_vpi.xml
```
--------------------------------
### Server returns error to blocked entity for IQ get
Source: https://xmpp.org/extensions/xep-0016.html
Example of a server responding with a error to a blocked entity's IQ stanza, as per XEP-0016.
```xml
```
--------------------------------
### Initiate Version Negotiation (Client)
Source: https://xmpp.org/extensions/xep-0043.html
The client sends an IQ stanza with the desired database version to initiate the session. This is the first step in establishing a compatible connection.
```xml
0.1
```
--------------------------------
### Mixer Indicates Speaking Status
Source: https://xmpp.org/extensions/xep-0327.html
This example demonstrates how a mixer indicates when calls joined to it start or stop speaking. This is useful for features like active speaker detection.
```xml
```
--------------------------------
### Propose EXI Compression Parameters
Source: https://xmpp.org/extensions/xep-0322.html
Client sends a setup stanza with proposed EXI compression parameters, including schema details like namespace, byte size, and MD5 hash. This is used to initiate EXI compression negotiation.
```xml
```
--------------------------------
### REST Method Call Example
Source: https://xmpp.org/extensions/xep-0332.html
Illustrates making a RESTful GET request and receiving a response via XMPP IQ stanzas. This is suitable for interacting with REST APIs through XMPP.
```xml
Fri, 05 May 2013 15:01:53GMT-4
```
--------------------------------
### Discover Available Form Templates
Source: https://xmpp.org/extensions/xep-0346.html
Perform a disco#items query on a PubSub service to find nodes starting with 'fdp/template/'. This example shows how to discover available form templates.
```xml
```
--------------------------------
### Provide HTTP Basic Auth Parameters
Source: https://xmpp.org/extensions/xep-0104.html
This example shows how to provide additional parameters for basic HTTP authentication, including realm, username, and password.
```xml
```
--------------------------------
### Example VPI Configuration
Source: https://xmpp.org/extensions/xep-0151.html
This XML configuration defines rules for mapping URLs to virtual presence services. It includes handling specific domains like .com and .de, and a general rule for other domains.
```xml
http://vpi.vp.bluehands.de/lluna-2.5.2/dotcom-vpi.xml
http://vpi.vp.bluehands.de/lluna-2.5.2/dotde-vpi.xml
xmpp:location.virtual-presence.org
\1
```
--------------------------------
### User Activity With Time Period
Source: https://xmpp.org/extensions/xep-0149.html
Publish user activity with 'Start' and 'Stop' SHIM headers to define the duration of the activity. This example shows publishing a 'relaxing' and 'partying' activity.
```xml
-
My best friend's birthday!
```
--------------------------------
### Bidirectional Streams with Server Dialback
Source: https://xmpp.org/extensions/xep-0288.html
This example illustrates the stream negotiation for bidirectional streams utilizing Server Dialback. It shows the initial stream setup and feature negotiation before proceeding to dialback.
```xml
```
--------------------------------
### Example PubSub Items with CAP-Vs
Source: https://xmpp.org/extensions/xep-0395.html
This example demonstrates how a PubSub service returns items along with their associated Compare-And-Publish Values (CAP-Vs). The CAP-Vs are provided in a `` element, mapping item IDs to their respective CAP-V hashes.
```xml
-
The Uses of This World
O, that this too too solid flesh would melt
Thaw and resolve itself into a dew!
-
Ghostly Encounters
O all you host of heaven! O earth! what else?
And shall I couple hell? O, fie! Hold, hold, my heart;
And you, my sinews, grow not instant old,
But bear me stiffly up. Remember thee!
-
Alone
Now I am alone.
O, what a rogue and peasant slave am I!
```
--------------------------------
### Directory Requests vCard Data from Server (XMPP IQ)
Source: https://xmpp.org/extensions/xep-0309.html
A directory sends an IQ 'get' request to a server to retrieve its vCard information. This example uses the vCard 4.0 namespace.
```xml
```