Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
translator_tips_tricks [2006/11/24 14:34] – sean | translator_tips_tricks [2006/11/27 07:20] – sean |
---|
| * When using XPaths to locate page elements, try to avoid absolute paths that might break easily. For example, instead of using<code>/html/body/table/tbody/tr/td[2]/table/tbody/tr/td[@class="bucket"]/div[@class="content"]/ul/li</code>try a more flexible XPath like<code>//table/tbody/tr/td[@class="bucket"]/div[@class="content"]/ul/li</code> |
| |
| |
| |
* When writing translators, debugging via the console is essential. To debug via the console, start Firefox from the command line (cmd.exe in Windows, Terminal.app in MacOS). Any output from the translator can be dumped to the console using <code>Zotero.Utilities.debug("hello world!");</code> | * When writing translators, debugging via the console is essential. To debug via the console, start Firefox from the command line (cmd.exe in Windows, Terminal.app in MacOS). Any output from the translator can be dumped to the console using <code>Zotero.Utilities.debug("hello world!");</code> |
| |