XEP-0151 Alteration… Maybe… Please…

Rational

There have been a few complaints regarding XEP-0151 usage of /_vpi.xml or /example//_vpi.xml to discover the chatroom associated with a given web page, first and foremost is that it encroaches more on a website’s URL space.

This has been noticed on MUCSearch where viewing the results pages with a vpi enabled client will cause it to peform a CPU intensive database search for jids containing the string _vpi.xml, the results then being discarded by the client and never shown to the end-user ☺.

Remedy

I am proposing that instead of looking in any _vpi.xml file, clients will locate and retrieve the web site’s sitemap by any method defined at sitemaps. The use of the /robots.txt discovery method is suggested.

The VPI xml namespace is then associated with a prefix in the sitemap, and then, when a prefixed vpi element is found directly within a urlset element of a sitemap, it is treated exactly like a /_vpi.xml file. If the same vpi element is found within a sitemap url referring to the location /example/ it will be used the same as /example/_vpi.xml

Example

<?xml version="1.0" encoding="utf-8"?>
<urlset
  xmlns="http://www.google.com/schemas/sitemap/0.84"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:vpi="http://virtual-presence.org/schemas/vpi"
  xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
                      http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
 <vpi:vpi>
  <vpi:location>
   <vpi:url>xmpp:general@conference.☺<url>
  </vpi:location>
 </vpi:vpi>
 <url>
  <vpi:vpi>
   <vpi:location>
    <vpi:url>xmpp:midsummer@conference.☺<url>
   </vpi:location>
  </vpi:vpi>
  <loc>http://paradise.☺/midsummer/<loc>
  <lastmod>1595-09-21T13:00:00+01:00<lastmod>
 <url>
<urlset>

Epilogue

Once this is done. and additionally if a client finds VPI namespaced content in an XHTML file or any other kind of XML that the user is browsing, that may override anything found via sitemaps, then the former fixed path method of VPI discovery be DEPRECATED for clients, once an improved method of discovery such as that described here, is implemented.

Web server operators MAY continue to support it for backwards compatibility.