This is an old revision of the document!


Functions and objects in the translator sandbox

This is a list of the functions and objects exposed to translators running in the sandbox. As it was generated from the existing translators, this list is probably not complete, and some of the functions may be deprecated or unavailable in certain types of translators. Most of the below are described in the general Translator Coding documentation, or the Translator overview. Others are rarely used– search in the code of existing translators for usage guidance.

Objects

  • Zotero.Collection
  • Zotero.Item

Functions

  • Zotero.debug
  • Zotero.done DEPRECATED
  • Zotero.getOption
  • Zotero.getXML
  • Zotero.loadTranslator
  • Zotero.nextCollection
  • Zotero.nextItem
  • Zotero.read
  • Zotero.selectItems
  • Zotero.setCharacterSet
  • Zotero.setProgress
  • Zotero.wait DEPRECATED
  • Zotero.write

Utility functions

  • Zotero.Utilities.capitalizeTitle
  • Zotero.Utilities.cleanAuthor
  • Zotero.Utilities.cleanTags
  • Zotero.Utilities.createContextObject
  • Zotero.Utilities.doGet
  • Zotero.Utilities.doPost
  • Zotero.Utilities.formatDate
  • Zotero.Utilities.gatherElementsOnXPath
  • Zotero.Utilities.getCreatorsForType
  • Zotero.Utilities.getItemArray
  • Zotero.Utilities.getLocalizedCreatorType
  • Zotero.Utilities.getPageRange
  • Zotero.Utilities.getVersion
  • Zotero.Utilities.htmlSpecialChars
  • Zotero.Utilities.HTTP.doGet
  • Zotero.Utilities.HTTP.doPost
  • Zotero.Utilities.itemTypeExists
  • Zotero.Utilities.loadDocument
  • Zotero.Utilities.lpad
  • Zotero.Utilities.parseContextObject
  • Zotero.Utilities.processAsync
  • Zotero.Utilities.processDocuments
  • Zotero.Utilities.removeDiacritics NEW
  • Zotero.Utilities.retrieveDocument
  • Zotero.Utilities.retrieveSource
  • Zotero.Utilities.strToDate
  • Zotero.Utilities.superCleanString
  • Zotero.Utilities.text
  • Zotero.Utilities.trim DEPRECATED use “.trim()” instead
  • Zotero.Utilities.trimInternal
  • Zotero.Utilities.unescapeHTML

The utility functions are defined in utilities.js.

RDF functions

  • Zotero.RDF.addContainerElement
  • Zotero.RDF.addNamespace
  • Zotero.RDF.addStatement
  • Zotero.RDF.getAllResources
  • Zotero.RDF.getArcsIn
  • Zotero.RDF.getArcsOut
  • Zotero.RDF.getContainerElements
  • Zotero.RDF.getResourceURI
  • Zotero.RDF.getSources
  • Zotero.RDF.getStatementsMatching
  • Zotero.RDF.getTargets
  • Zotero.RDF.newContainer
  • Zotero.RDF.newResource

The RDF functions are defined in translator.js.

XML objects

  • DOMParser
  • XML
dev/translators/functions.1420237075.txt.gz · Last modified: 2015/01/02 17:17 by zuphilip