[Standards] Proposed changes to XEP-0135

Jefry Lagrange jefry.reyes at gmail.com
Sun Nov 27 03:50:08 UTC 2011

Hi, I been working on some changes to XEP-0135.

* Replacing SI file transfer with jingle FT

* Replacing section 6, with a link pointing to section 5 of XEP-0234,
which already covers the same function.

* Adding support for pubsub, only for finding files using the method I
introduce bellow. It doesn't make much sense to traverse the directory
of every user subscribed to a pubsub, but it will make a lot of sense
searching for specific files. (XEP-0137 does not suffice for this)

For example:

A user is subscribed to the books pubsub channel. It sends a query,
looking for a book "Romeo and Juliet - By Shakespeare". The
subscribers reply if they get a match with information about their
files. The initiator requests the file from whoever has what he wants
and file transfer starts.

* A new section should be added to cover finding files by providing a
criteria, instead of just asking for all the files.

For example:

5.5 Finding Specific Files

Finding files by asking for a file list is not very practical if there
are too many files being shared. It is very resource intensive and it
is understood that the user may not be interested in all of the files,
but rather he or she would be interested in finding one specific file
or one specific kind of file (text, image or videos).

In order to do this, the identity stanza is used to match files by one
or more fields i.e. 'name', 'date', 'size', etc...

Example XX. Finding Specific Files

<iq type='get'
    from='hag66 at shakespeare.lit/pda'
    to='darkcave at shakespeare.lit'
  <query xmlns='http://jabber.org/protocol/disco#info'
     <identity category='filesys' type='file' name='file1' />

The fields in the identity stanza, are optional, but at least one
field MUST be provided. In this example, the responders will match its
files looking for the file names that contain 'file1' and are of the
size 1024..

Example XX. Returning with Matched Files

<iq type='result'
    from='darkcave at macbeth.shakespeare.lit'
    to='hag66 at shakespeare.lit/pda'
  <query xmlns='http://jabber.org/protocol/disco#info'
    <identity category='filesys' type='file' name='file1'

A responding entity MUST include the name and the hash of the file.
Since more than one responder may respond with the same file, it is
strongly suggested that the initiator makes use of ranged file
transfers (as defined in XEP-0234), to speed up the file transfer.

Example XX. Finding files using Regular Expressions

Regular expressions may be use to find files that match the
expression. One or more fields can be used. The label attribute is

<iq type='get'
 from='hag66 at shakespeare.lit/pda'
    to='darkcave at shakespeare.lit'
<query xmlns='http://jabber.org/protocol/disco#info'
 <identity category='filesys' type='file' name='file1'/>
    <x xmlns='jabber:x:data' type='get'>
<field var='ssn' type='text-single' label='Social Security Number'>

The XML character data of this element is the pattern to apply. The
syntax of this content MUST be that defined for POSIX extended regular
expressions, including support for Unicode.

The <regex/> element MUST contain character data only (i.e., not
contain any child elements) and MUST NOT possess any attributes.

Any feedback would be greatly appreciated, I just want to know if I am
on the right track here.

Jefry Lagrange

More information about the Standards mailing list