           for collection in collection.getChildCollections() or []
             @collection(collection)
 
+          Zotero.OPDS.log("collection #{collection.name} has #{(collection.getChildItems(false) || []).length} items")
           for item in collection.getChildItems(false) || []
             @item(item)
 

    else
      attachments = item.getAttachments() or []
      attachments = Zotero.Items.get(attachments) if attachments.length != 0
    attachments = (a for a in attachments when a.attachmentMIMEType? != "text/html")

    return if attachments.length == 0

        when m instanceof Error then "#{e}\n#{e.stack}"
        else JSON.stringify(m)

    Zotero.debug("[opds] #{msg.join(' ')}")
    return

  url: ->
