code: function(o1, o2)
  {
     var rval = 0;
     
     if(o1.constructor === String)
     {
        if(o2.constructor !== String)
        {
           rval = -1;
        }
        else
        {
           rval = _compare(o1, o2);
        }
     }
     else if(o2.constructor === String)
     {
        rval = 1;
     }
     else
     {
        rval = _compareObjectKeys(o1, o2, '@literal');
        if(rval === 0)
        {
           if('@literal' in o1)
           {
              rval = _compareObjectKeys(o1, o2, '@type');
              if(rval === 0)
              {
                 rval = _compareObjectKeys(o1, o2, '@language');
              }
           }
           // both are '@id' objects
           else
           {
              rval = _compare(o1['@id'], o2['@id']);
           }
        }
     }
     
     return rval;
  }
docs: Compares two object values.
  
  @param o1 the first object.
  @param o2 the second object.
  
  @return -1 if o1 < o2, 0 if o1 == o2, 1 if o1 > o2.