xquery implementation of scribd api