Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
dev:translators_reference_guide [2011/04/15 16:37] – [Translator Metadata] rmzelle | dev:translators_reference_guide [2017/03/19 12:43] – [Tools of the Trade] rmv Solvent as outdated owcz |
---|
* XPath tools - most translators rely on XPath to extract information from HTML web pages or from XML data files. To quickly construct robust XPaths, consider using one of the following tools: | * XPath tools - most translators rely on XPath to extract information from HTML web pages or from XML data files. To quickly construct robust XPaths, consider using one of the following tools: |
* [[http://getfirebug.com/|Firebug]] - a popular and very powerful tool. Very useful in inspecting the HTML structure of web pages, and finding XPaths to the elements of interest. | * [[http://getfirebug.com/|Firebug]] - a popular and very powerful tool. Very useful in inspecting the HTML structure of web pages, and finding XPaths to the elements of interest. |
* [[http://simile.mit.edu/wiki/Solvent|Solvent]] - although no longer maintained, this is the preferred XPath tool of Adam Crymble, discussed in detail in his [[http://niche.uwo.ca/member-projects/zotero-guide/chapter3.html#s3p4|'How to Write a Zotero Translator'-guide]] (including installation instructions) | |
* [[http://xpath.alephzarro.com/|XPather]]/[[https://addons.mozilla.org/en-US/firefox/addon/6622|DOM Inspector]] - XPather, which requires the DOM Inspector extension to be installed, is mostly useful for testing XPaths. Recommended in combination with Firebug. | * [[http://xpath.alephzarro.com/|XPather]]/[[https://addons.mozilla.org/en-US/firefox/addon/6622|DOM Inspector]] - XPather, which requires the DOM Inspector extension to be installed, is mostly useful for testing XPaths. Recommended in combination with Firebug. |
| |
Especially for screen scraper translators, knowing which item types (''book'', ''journalArticle'', etc) and item fields (''title'', ''url'', etc) exist in Zotero can be very helpful. Fortunately, the possible item properties can be found in the following source code file (types are listed as "itemTypes" entries, fields as "itemFields"): | Especially for screen scraper translators, knowing which item types (''book'', ''journalArticle'', etc) and item fields (''title'', ''url'', etc) exist in Zotero can be very helpful. Fortunately, the possible item properties can be found in the following source code file (types are listed as "itemTypes" entries, fields as "itemFields"): |
| |
https://www.zotero.org/trac/browser/extension/branches/2.0/chrome/locale/en-US/zotero/zotero.properties#L240 | http://aurimasv.github.io/z2csl/typeMap.xml |
| |
Note that the different item types make use of different combinations of item fields (e.g. the ''book'' item type has the field ''ISBN'', while the ''journalArticle'' item type lacks this field). | Note that the different item types make use of different combinations of item fields (e.g. the ''book'' item type has the field ''ISBN'', while the ''journalArticle'' item type lacks this field). |