Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:how_to_write_a_zotero_translator_plusplus [2017/03/19 13:04] – bolder owczdev:how_to_write_a_zotero_translator_plusplus [2017/11/19 19:24] (current) – Remove HWZT++ adamsmith
Line 1: Line 1:
-**Note: This guide'advice on translator code [[https://github.com/zotero/translators/pull/1282#issuecomment-287574730|may be outdated]].** Instead, model your code on [[https://github.com/zotero/translators/pulls|recently updated translators]], [[https://github.com/zuphilip/translators/wiki/Common-code-blocks-for-translators|common code templates]], [[https://www.zotero.org/support/dev/translators/coding|the translator coding documentation]], and search for answers in the [[https://forums.zotero.org/discussions|Zotero Forums]] and [[https://github.com/zotero/translators/issues|on GitHub]].+**Note:** This page used to hold an updated version of Adam Crymble's [[http://niche-canada.org/member-projects/zotero-guide/chapter1.html|How to Write a Zotero Translator]]. The guidance included in both Adam's original guide and this update is too outdated to be useful and translators based on it are no longer acceptedWe instead recommend the following resources:
  
-===== Chapter 0Introduction =====+  * The template code included in [[https://www.zotero.org/support/dev/translators/scaffold|Scaffold]], 
 +  * The code of [[https://github.com/zotero/translators/pulls|recently updated translators]],  
 +  * The documentation for writing Zotero translators by [[https://www.mediawiki.org/wiki/Citoid/Creating_Zotero_translators|Wikimedia]], the most comprehensive and up-to-date resource for writing "scrapers" as of November 2017, 
 +  * The [[https://www.zotero.org/support/dev/translators/coding|translator coding documentation]],  
 +  * Search for answers in the [[https://forums.zotero.org/discussions|Zotero Forums]] and [[https://github.com/zotero/translators/issues|on GitHub]].
  
-[[http://niche-canada.org/member-projects/zotero-guide/chapter1.html|How to Write a Zotero Translator]] by Adam Crymble (aka //HWZT//) is still the best guide to writing a simple screenscraping translator for Zotero. Unfortunately 
  
-  * much has changed since HWZT was written, limiting its usability. 
-  * HWZT is not wikified, limiting its maintainability. 
  
-This page (aka //HWZT++//) updates and wikifies HWZT. (Note that HWZT++ is [[http://forums.zotero.org/discussion/12980?page=1#Item_11|adapted from 'How to Write a Zotero Translator' (2009) by Adam Crymble]].) For the moment, all but this chapter and Chapter 1 are merely a list of deltas to HWZT, organized by HWZT chapter: for each HWZT chapter, you must read it, then read the delta(s) here (if any), then execute appropriately. (Hopefully we will soon fully incorporate updated material from HWZT into HWZT++, thus eliminating the need to refer to both.) 
- 
-===== Chapter 1: Introduction to Zotero Translators ===== 
- 
-//Note:// the following is adapted from [[http://niche-canada.org/member-projects/zotero-guide/chapter1.html|HWZT chapter 1]] 
- 
-==== Zotero ==== 
- 
-The citation management program Zotero is a wonderful tool for researchers everywhere. Citations from the web may be "grabbed" simply by clicking on an icon in your web browser address bar. The citation information displayed on the screen is then saved to your Zotero collection with little or no additional effort. However, for this to work, each and every website must either follow [[how_to_write_a_zotero_translator_plusplus#metadata_converters|standardized metadata guidelines]], or must have its own personal "translator" that tells Zotero which words on the screen correspond with which bibliographic fields. Computers are stupid; translators make them smart. 
- 
-Most users who know about the citation capture feature are enthralled by it and want more. The [[http://forums.zotero.org/categories/|Zotero forums]] receive multiple requests daily from users hoping their favourite site will be given this capability. Unfortunately, there just aren't enough Zotero programmers around to keep up with the demand for translators, and more intensive coding-projects take priority. 
- 
-Luckily, Zotero translators are fairly easy to create (as far as computer programming goes). This guide seeks to help take some of that load away from the Zotero staff by teaching the community of Zotero users how to create their own translators and to share them with others. 
- 
-==== Who is this guide for? ==== 
- 
-Anyone! No previous experience required! 
- 
-In fact, the guide will assume that you have no programming experience whatsoever. You just need to have spent some time using Zotero and grabbing citations. (Check out the [[http://www.zotero.org/static/videos/tour/zotero_tour.htm|demo video]] if you are not familiar with this feature). 
- 
-This guide uses plain language throughout and is written for people who are not programmers. You just need to be comfortable with computers, able to think logically, and not afraid to do some Google searching when you find a word or come across an error message you don't recognize. 
- 
-Everything will be explained with a new user in mind. Therefore, you might find that you do not need to read all sections. If you are unsure whether or not you should read a section or skip it, it is probably a good idea to jump ahead to the end of the chapter and read the "What you should understand before moving on." If in doubt, it is probably best to read the chapter and refresh your knowledge. Skipping too much background will just leave you frustrated when you start coding. 
- 
-If you fit into one of the following categories, chances are you are a great candidate for writing a translator: 
- 
-  * Website administrator of a searchable database 
-  * Librarian or archivist 
-  * Researcher or journalist 
-  * Graduate student 
-  * Someone who wants to learn JavaScript 
- 
-==== What you will learn ==== 
- 
-When you are finished with this guide, you should not only know enough to create your own working Zotero translator, but you should understand the following concepts and computer languages: 
- 
-  * Basic HTML 
-  * the Document Object Model (DOM) 
-  * XPaths 
-  * JavaScript Regular Expressions (RegExp) 
-  * Basic JavaScript 
- 
-Translators are written in a computer language called "JavaScript" so your work will involve learning to do some basic JavaScript programming. 
- 
-You will also learn how to use a number of programs (all free and reputable). Among these are Firefox, Zotero, Scaffold, Komodo Edit, DOM Inspector, and XPather. 
- 
-You will not learn how to embed JavaScript into HTML documents or to do DOM scripting; however, after learning how to write a Zotero translator you will be well on your way to understanding these concepts. 
- 
-==== Benefits of Writing a Translator ==== 
- 
-If you are a web administrator or work for a company that maintains a searchable database, having a Zotero translator will increase your site's usability. Zotero has over a million users, many of whom judge a website's usability in part by whether or not they can automatically download citations. Adding this capability sends a message to your users that you believe their experience while using your site is important. 
- 
-[[dev/translator_overview#step_5contribute_your_translator|Contributing your own translator]] is a much more proactive way to get your site included in Zotero than submitting a request on the Zotero forums. 
- 
-If you are an end user rather than an administrator, writing your own translator allows you to customize it to your exact needs. If you only want Zotero to save the title and a copy of a pdf from a website, you can set your translator to do this. If you want all possible information from a site, you can arrange this as well. 
- 
-If the website in question is a rather obscure database that may be password protected, you will have to submit your own translator. This is because, even if a Zotero programmer has time to work on your request, without access to the database he or she is powerless to write the translator. 
- 
-Finally, Zotero is an open source, freeware project, adding to the software is in the spirit of its creation. Once you've finished a new translator you can submit it to the Zotero team so that everyone can benefit from the fruits of your labour. 
- 
-==== The Three Major Types of Translators ==== 
- 
-  * Scrapers 
-  * Metadata Converters 
-  * Exporters 
- 
-==== Scrapers ==== 
- 
-This guide will teach you how to create a "Scraper." 
- 
-The advantage of a Scraper is that it is the only kind of translator that can be used on any website. What a scraper does is take (scrape) words off the webpage and tells Zotero which words correlate to which part of the citation. It's sort of like cutting and pasting in a text document, but by using code rather than keystrokes. 
- 
-Another advantage of a scraper is that you can tailor it to your exact needs by choosing to gather all, some, or very little of the information available. Scrapers are easy to learn and to make. 
- 
-The disadvantage of a scraper is that it relies heavily on format and the consistency of the webpage's creator. If a Webmaster decides to change the structure of a web page even slightly, you will have to alter your scraper to reflect this. However, these changes happen infrequently and once released to all Zotero users, you may find that others take an interest in your translator and help to keep it up to date when needed. 
- 
-The other two types of translators are powerful and accurate, but are only possible to use under certain conditions that are almost always out of your control unless you are the website's administrator. We will look at how these work, but our focus will be on scrapers. 
- 
-==== Metadata Converters ==== 
- 
-These translators take information that a Webmaster has voluntarily embedded in a webpage, known as metadata, and organizes it into the correct Zotero fields. You can think of metadata as invisible ink that only appears if you know how to find it. Obviously the catch here is that the Webmaster must have included this information in the first place. 
- 
-The practice of including metadata is becoming more common, especially in databases. In the past couple of years, how people display metadata has become more standardized. Because of this standardization, Zotero already supports most sites that have it. Some of the most commonly used metadata convensions are: 
- 
-  * [[http://dublincore.org/|Dublin Core Metadata Initiative]] (aka "DC") 
-  * [[http://unapi.info/|unAPI]] 
-  * [[http://ocoins.info/|COinS]] 
-  * [[http://research.talis.com/2005/erdf/wiki/Main/RdfInHtml|Embedded RDF]] 
- 
-If you are a website administrator and want your site to automatically be Zotero compliant, it is best to use one of these systems rather than writing a translator; they are standardized and reliable. Let me repeat that: //if you are a website administrator and can include standardized metadata in your site, stop reading this guide and add the metadata!// If you are not a website administrator, you might make this recommendation to the site in question. 
- 
-==== Exporters ==== 
- 
-Exporters also rely on a website providing certain information. In this case, we need a link that allows us to download a citation. For the most part, there are very few export formats. You may have come across them before, labeled as "MARC display" buttons, or a "RefWorks" button. These options are most common in library catalogues and on academic journal databases. This type of translator actually uses two translators, one embedded in the other. This can get quite complicated so we will not cover it in detail in this guide. However, if you do need to write one of these and need a few hints to get started, here are a few (rather technical) pointers. If you do not need to write an exporter please feel free to ignore this section. 
- 
-  - Use an XPath to grab the link URL of the citation download. 
-  - Use HTTP get to download the page found at that URL. 
-  - Call the translator for that type of citation (ie, MARC, Bibtex, etc) to interpret the citation. 
-  - Save results into Zotero. 
-  - If you are lost, check one of the many Library Catalogue translators by launching Scaffold and loading the translator code. 
- 
-You do not need to understand the latter two types of translators or the contents of the paragraph above to be successful at writing scrapers. 
- 
-Note: from this point forward, we will be using the word "Translator" exclusively when referring to "scrapers." Most of the terminology used to explain how to write a scraper is the same as would be used to explain how to write any other translator. The other types of translators will be referenced explicitly if used. 
- 
-==== Before we begin ==== 
- 
-As with anything new and computer-related, it is important that you backup your entire computer before you start. Coding is generally a safe practice but you never know when something could go wrong and your hard work gets wiped out! Best to backup now than be sorry later. 
- 
-There are many short cuts available when writing JavaScript and experienced programmers may tell you to use these. You are free to learn the short cuts if you wish; however, this guide will not use them, for simplicity's sake. 
- 
-This is NOT a guide detailing how to use Zotero. It is a guide detailing how to write code to extend the usefulness of Zotero. 
- 
-===== Chapter 2: General Troubleshooting Guidelines ===== 
- 
-//Note:// the following is adapted from [[http://niche-canada.org/member-projects/zotero-guide/chapter2.html|HWZT chapter 2]] 
- 
-Before we start, you should be aware: you will get frustrated — at least once. Here are a few tips to help you solve your problems. 
- 
-==== Search Engines ==== 
- 
-If you run into difficulties when writing computer code the great news is: the answer to almost any problem can be found online. All computer programmers have needed help at one time or another, and given their love for computers, most sought that help online. Lucky for you, that means that most of the questions they asked — and the subsequent answers — are still floating around the internet. 
- 
-This means the internet is often your best resource for finding help. If you run into a problem, the first thing you should do is type your problem into a search engine. More often than not someone has already asked your exact question, and someone else has provided an answer. You might even find entire websites dedicated to solving your particular problem. As far as coding goes, Zotero translators are quite basic; you will not come across a problem when writing a Zotero translator that no one has encountered before. 
- 
-Likewise, if you encounter an error message you don't understand, cut and paste that error message into a search engine and surround it with quotation marks. You will likely find dozens of explanations why this error appeared and how to fix it. 
- 
-The more specific you can be about your problem, the better the results you will find. Don't be discouraged if you don't find the answer on your first search. Rephrase the search terms and try again. 
- 
-==== Online Tutorials ==== 
- 
-Your second best option is [[http://www.w3schools.com/|W3Schools]] tutorials. W3Schools has step-by-step tutorials for nearly every internet-related programming language. Particularly helpful for this project are their: 
- 
-  * [[http://www.w3schools.com/html/default.asp|HTML tutorial]] 
-  * [[http://www.w3schools.com/htmldom/default.asp|HTML DOM tutorial]] 
-  * [[http://www.w3schools.com/js/default.asp|JavaScript tutorial]] 
- 
-At W3Schools, you can find great reference charts that will show you at a glance all the different capabilities of JavaScript and HTML. These will come in handy when you want to do something and can't remember how. 
- 
-Apart from W3Schools, you can find many other tutorials online. Try typing in what you want to learn into a search engine and you will likely find a tutorial. Keep in mind that many tutorials teach you how to accomplish a specific task and may not teach you exactly what you're looking for. 
- 
-==== Forums ==== 
- 
-If you've Googled it, Yahoo'd it, looked it up on the W3Schools reference charts and tried various combinations of teas, coffees, and energy drinks to no avail, you're going to need to ask for help. There are numerous internet forums to which you can turn for this; just find a forum you like. Here are a couple to get you started: 
- 
-=== Webdeveloper.com === 
- 
-The [[http://www.webdeveloper.com/forum/index.php?|JavaScript forum at WebDeveloper.com]] is excellent, especially for code-related questions. 
- 
-If you can't figure out why you are getting a particular error message, or why you can't get information from point A to point B, this is the forum for you. At any given time there are over one hundred people logged into the forum just waiting to answer your question. If you post your problem here in a courteous manner, with a little bit of luck you will have a solution within a couple of hours. 
- 
-It may not be the instant gratification we've come to expect, but don't forget, these people are volunteering to help you, and most probably if you're desperate enough to ask for help, you could use a few hours away from the keyboard anyway. 
- 
-=== Zotero Forums === 
- 
-If your question is something specific to Zotero, such as "why can't I put anything in the field Loc. in archive?" the helpful men and women at WebDeveloper.com will have no idea how to answer your question. Instead, post it to the [[http://forums.zotero.org/categories/|Zotero forums]]. Don't expect an answer as quickly as you would get on a more popular forum — there are only so many Zotero programmers to go around. You should get an answer in a couple of days as long as you're clear in your description of your problem. 
- 
-==== Asking Good Questions ==== 
- 
-Clarity and specificity are your friends when it comes to asking for help on a forum. The people who read forums and offer their expertise are busy; make it easy for them by carefully thinking out your problem before you ask. Likewise, make sure you are asking a specific question to a narrowly defined problem. 
- 
-For example, don't post something like: "Why won't my translator work?" 
- 
-Instead, try: "Why am I getting a syntax error when I try to [[http://niche-canada.org/member-projects/zotero-guide/chapter6.html#pushExplanation|Push a value into an Object]]?" 
- 
-Always post the relevant section of your code (and only the relevant section of your code) along with your question. This will make it easier for the experts to help you solve your problem. If the answer you get does not do the trick and you are still stuck, be polite and try rephrasing the question. Remember, don't bite the hand that feeds you; these are volunteers and they're trying to help you! 
- 
-==== Debugging ==== 
- 
-To help you ask good questions you'll learn how to use the ''Zotero.debug()'' method in [[how_to_write_a_zotero_translator_plusplus#chapter_6js_variables|Chapter 6]]. This will let you figure out exactly which part of your code is not working. Until then, keep the following in mind: 
- 
-When fixing problem code, only change one thing at a time. If you are working on a section of code that has several issues, fix one problem and retry the code before moving on. Sometimes if you make three or four changes before retrying the program, you will inadvertently cause another unexpected problem. This can make you think your fix was incorrect, when in fact only the last change you made was wrong. Change one thing and make sure it works before moving on and you will prevent a lot of confusion. 
- 
-===== Chapter 3: Translator Tools ===== 
- 
-//Note:// the following is adapted from [[http://niche-canada.org/member-projects/zotero-guide/chapter3.html|HWZT chapter 3]] 
- 
-There are many software packages that can help you to efficiently write a translator. Here we will discuss only a few. [[wp>Firefox|Firefox]] and [[wp>Zotero|Zotero]] are essential for running and testing translators; fortunately they are also free. Scaffold 2.0 is not essential for translator writing, but it automates some tasks that you would otherwise need to know how to do. (It therefore makes documentation writing much easier %%:-)%% [[wp>Firebug_(web_development)|Firebug]] is not essential for translator writing, but it makes inspecting your [[wp>Document_Object_Model|DOM]] and acquiring [[wp>XPath|XPath]]s much easier. Finally, there are several [[wp>Source_code_editor|code editors]] which can help you write better Javascript faster. 
- 
-==== Firefox ==== 
- 
-[[http://getfirefox.com/|install Firefox]] 
- 
-Zotero is a Firefox add-on; therefore, to use Zotero, we must use Firefox. Don't worry, it's free and safe and very user-friendly. In fact, after a few days of using it, most people never look back. 
- 
-Zotero is only available with Firefox because Firefox is much more customizable than certain other proprietary browsers. The makers of Firefox released all the code that makes up the program and posted it online. This practice, known as "Open Source," is not particularly important for writing a translator, but it was crucial for the Zotero programmers who needed access to Firefox's code in order to write Zotero. 
- 
-It is possible to install more than one web browser on a computer. If you normally use another browser you don't have to worry about losing it or your bookmarks when you install Firefox. 
- 
-==== Zotero ==== 
- 
-[[http://www.zotero.org/|install Zotero]] 
- 
-As a Firefox "add-on," Zotero automatically runs whenever Firefox is in use. Open Zotero by clicking on the Zotero logo icon in the bottom right corner of the browser window. If you have never used Zotero, you can watch a video to help you get started. 
- 
-Be sure you have the most up to date version of Zotero. You can find this information on the [[http://www.zotero.org/|Zotero website]]. 
- 
-==== Scaffold ==== 
- 
-Install [[https://www.zotero.org/support/dev/translators/scaffold Scaffold]]. Note that it has been updated more recently than most of this wiki, and some features may have changed. 
- 
-The makers of Zotero created Scaffold specifically for writing translators. It's a sort of a "sandbox," which means you can muck around with the code without worrying about really messing anything up, and it automates some tasks. In this guide, all code will be written, tested, and retested in Scaffold. 
- 
-Once installed, launch Scaffold by navigating to the "Tools" menu in your Firefox window and select "Scaffold." 
- 
-You will learn to use Scaffold in [[how_to_write_a_zotero_translator_plusplus#chapter_6js_variables|Chapter 6]]. 
- 
-==== Firebug ==== 
- 
-[[http://getfirebug.com/|install Firebug]] 
- 
-Firebug helps you understand your %%DOM%% (think, the structure of the page you're scraping) and to find XPaths (think, directions to individual page items you want to scrape). Once installed, activate it by clicking on the bug icon in the bottom right corner of your Firefox window. You will learn in detail how to use this program in [[how_to_write_a_zotero_translator_plusplus#chapter_5xpath_directions|Chapter 5]]. 
- 
-==== Javascript editors ==== 
- 
-Code editors can help you write better code, and Javascript editors (or, more properly, "Javascript-aware" editors) can help you write better Javascript. This is important, since your translator is (in Zotero versions > 2.0) just a Javascript file. Unlike the software above, these editors do not run in Firefox; you launch them as you would any other desktop application. 
- 
-[[http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml|Komodo Edit]] is one example of such an editor. Once you start coding, you can use this program to show you where "syntax" errors appear in the code. Syntax errors are instances where you have not followed JavaScript's rules (think misspelling). If you get an error message that says something like "syntax error," or "unterminating literal," you can cut and paste your code into Komodo Edit. Then, under the "View" menu, select "View as Language" > "JavaScript". Just like in MSWord when you make a grammatical mistake, Komodo Edit should point you to the line in your code where you've made a syntax error, helping to save your eyes and sanity. 
- 
-There are many other such editors: feel free to google for one, or check for Javascript extensions for the editor you already use. 
- 
-===== Chapter 4: DOM and HTML ===== 
- 
-//Note:// 
-  * the following is adapted from [[http://niche-canada.org/member-projects/zotero-guide/chapter4.html|HWZT chapter 4]] 
-  * Words appearing between ''<'' and ''>'' are HTML elements. 
-  * Words that appear between ''<!--'' and ''-->'' are HTML comments, intended for human readers, ignored by the browser. HTML comments do not tell your browser to do anything, but can be used to provide valuable information to anyone reading your code. 
-  * If you do not recognize these markup structures, or find it difficult to follow this chapter, please take the [[http://www.w3schools.com/html/default.asp|W3Schools HTML tutorial]] before continuing. 
- 
-==== The Document Object Model ==== 
- 
-<html> 
- 
-<p class="style1">DOM stands for &quot;Document Object Model.&quot;</p> 
-<p class="style1">It is not so much a thing as a way of describing how web pages are structured.</p> 
-<p class="style1">Most people think of a web page much the same way as they think of a newspaper spread: there are words, pictures and headlines on various parts of the page. As far as we can tell, white space appears where nothing else has been placed. However, this is not how websites actually work.</p> 
-<p class="style1">Web pages are actually comprised of a series of nodes.  These nodes are organized in a particular hierarchy, as defined by the person who wrote the web page, according to how they decided they wanted the page to function. But before we discuss that further, let&#39;s take a look at what a web page really is.</p> 
- 
-</html> 
- 
-==== Understanding HTML structure ==== 
- 
-<html> 
- 
-<p class="style1">If you&#39;ve ever written a basic web page, you know that it is really just an HTML document. These documents contain the page&#39;s content &mdash; the words, links, images &mdash; as well as a series of tags that help your browser understand at what it is looking.</p> 
-<p class="style1">If you&#39;ve never written a website, go up to your &quot;View&quot; menu and click on &quot;Page Source.&quot; A new window will pop up with what is called &quot;source code.&quot;  This is what your browser interprets. The result of this interpretation is what you see in your browser when you go to the website.</p> 
-<p class="style1">&quot;Don&#39;t worry if you can&#39;t understand most of the things you see in the source code; most major commercial organizations go out of their way to make the source code of their websites confusing so that people cannot copy their style and format.</p> 
-<p class="style1">You certainly don&#39;t need to understand everything about web pages to write a Zotero translator. However, you will have to have a general understanding of how HTML documents are structured.</p> 
-<p class="style1">Most newer websites contain many languages and markup styles in a typical page source. These include but are not limited to JavaScript, Java, PhP, Flash, CSS and XML.</p> 
-<p class="style1">HTML will always appear between two sets of angle brackets &lt; &gt;. Looking for these will often make it easier for you to distinguish HTML from other markups and code. Many browsers, including Firefox, will colour code the source for you to make your job even easier. At this point, we are only interested in looking at the HTML bits, which means you can ignore everything else.</p> 
-<p class="style1">For the most part, the tags we are interested in start with: &lt;div&gt;, &lt;span&gt;, &lt;table&gt;, &lt;tr&gt;, &lt;td&gt;, &lt;ul&gt;, &lt;li&gt;, &lt;p&gt;, &lt;img&gt;, &lt;a href&gt;, &lt;h1&gt;, &lt;h2&gt;, &lt;h3&gt;, &lt;h4&gt;, etc.</p>  
-<p class="style1">Every HTML document will contain the same basic structure</p> 
-<div class="example1"> 
- <p class="style3"> 
- <span class="smallType">Example 4.1</span><br/> 
- <span class="indent1">&lt;html&gt;</span><br/> 
- <span class="indent2">&lt;head&gt;</span><br/> 
- <span class="indent3"><span class="comment1">&lt;!&ndash;&ndash;metadata. Generally not visible when visiting a webpage (except title). &ndash;&ndash;&gt;</span></span><br/> 
- <span class="indent2">&lt;/head&gt;</span><br/><br/> 
- 
- <span class="indent2">&lt;body&gt;</span><br/> 
- <span class="indent3"><span class="comment1">&lt;!&ndash;&ndash;the content of the page. Generally is visible. &ndash;&ndash;&gt;</span></span><br/> 
- <span class="indent2">&lt;/body&gt;</span><br/> 
- <span class="indent1">&lt;/html&gt;</span> 
- </p> 
-</div> 
- 
-<p class="style1">Example 4.1 is a fully functional &mdash; though boring &mdash; HTML document, which would display a blank white page.</p> 
-<p class="style1">Notice that HTML tags always come in pairs. One to tell the browser, &lt;this is beginning&gt; and one to say &lt;/this is finished&gt;. What appears between that set of tags is the content of that set. In the example above, the content of the &lt;head&gt; and &lt;body&gt; tags are just HTML comments that a human reader could see when looking at the source code.</p> 
-<p class="style1">Each pair of tags represents one node known as an &quot;element.&quot; The &lt;html&gt; node &mdash; part of every HTML document (see the first and last lines of the example) &mdash; is also known as the root node which is the first node in the &quot;document.&quot; All other nodes spring forth from this root node.</p> 
-<p class="style1">The example above consists of three element nodes: an &lt;html&gt; node, a &lt;head&gt; node and a &lt;body&gt; node.</p> 
-<p class="style1">Take note that in our standard HTML document, all the tags are properly &quot;nested.&quot; This means that if a node overlaps another node it is always <em>completely</em> contained within that node. You will <strong>never</strong> see a proper HTML document with a structure like this:</p> 
-<div class="example1"> 
- <p class="style3"> 
- <span class="smallType">Example 4.2</span><br/> 
- <span class="indent1">&lt;html&gt;</span><br/> 
- <span class="indent2">&lt;head&gt;</span><br/> 
- <span class="indent3">&lt;body&gt;</span><br/> 
- <span class="indent2">&lt;/head&gt;</span><br/> 
- <span class="indent3">&lt;/body&gt;</span><br/> 
- <span class="indent1">&lt;/html&gt;</span></p> 
-</div> 
- 
-<p class="style1">The tags in Example 4.2 are not properly nested.</p> 
-<p class="style1">In Example 4.1, notice the &lt;head&gt; node and &lt;body&gt; node are both wholly contained within the &lt;html&gt; node (the &lt;html&gt; and &lt;/html&gt; tags start before and close after both &lt;head&gt; and &lt;body&gt; have closed). The &lt;head&gt; and &lt;body&gt; nodes do not intersect with one another.</p> 
-<p class="style1">Programmers have jargon to describe the relationships between these nodes:</p> 
-<table> 
- <tbody> 
- <tr> 
- <td>Parent:</td> 
- <td>&lt;html&gt; is the parent of &lt;head&gt; and &lt;body&gt;</td> 
- </tr> 
- <tr> 
- <td>Child:</td> 
- <td>&lt;head&gt; and &lt;body&gt; are the children of &lt;html&gt;</td> 
- </tr> 
- <tr> 
- <td>Sibling:</td> 
- <td>&lt;head&gt; and &lt;body&gt; are siblings.</td> 
- </tr> 
- <tr> 
- <td>Grandchild:</td> 
- <td>This example doesn&#39;t have any grandchildren, but if we were to add another node (a link for example), to either &lt;head&gt; or &lt;body&gt;, that node would be the grandchild of &lt;html&gt;.</td> 
- </tr> 
- </tbody> 
-</table>  
- 
-<p class="style1">A node can have an infinite number of child nodes, but only ever comes from <strong>one</strong> parent. Most pages are much more complicated than a blank white page. It is not uncommon for an HTML document to contain dozens or perhaps hundreds of element nodes.</p> 
-<p class="style1">This network of relationships between nodes in an HTML document is the DOM.</p> 
- 
-</html> 
- 
-==== Why is the DOM important to you? ==== 
- 
-<html> 
- 
-<p class="style1">The DOM is how you give your computer directions to find a particular piece of information in an HTML document. Computers can&#39;t jump to a desired element node the way our eyes can jump to a particular point on the screen. They need to crawl to that node, visiting all the connected parent nodes along the way, starting at the root.</p> 
-<p class="style1">Here is a simple Table in an HTML document on which to practice.</p> 
- 
-<div class="example1"> 
- <p class="style3"> 
- <span class="smallType">Example 4.3</span><br/> 
- <span class="indent1">&lt;html&gt;</span><br/> 
- <span class="indent2">&lt;head&gt;</span><br/> 
- <span class="indent2">&lt;/head&gt;</span><br/><br/> 
- <span class="indent2">&lt;body&gt;</span><br/> 
- <span class="indent3">&lt;table&gt;</span><br/> 
- <span class="indent4">&lt;tbody&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td>Precipitation&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td>Temperature&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td>Rain&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td>Cool&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent4">&lt;/tbody&gt;</span><br/>  
- <span class="indent3">&lt;/table&gt;</span><br/> 
- <span class="indent2">&lt;/body&gt;</span><br/> 
- <span class="indent1">&lt;/html&gt;</span> 
- </p> 
-</div> 
- 
-<p class="style1">Note: On a well&mdash;written web page, you can get some clues as to what is a child of what by looking at the indentation of the lines of code. For each indent, you have undergone another branching of the tree and therefore have a new child node. Unfortunately, not everyone writes clean, easy to read HTML like this. If the website you are translating does not, don&#39;t worry, there&#39;s a way to work around it that you&#39;ll learn about in the next chapter.</p> 
-<p class="style1">Now there are 11 nodes.</p> 
- 
-<div class="example1"> 
- <p class="style3"> 
- <span class="smallType">Example 4.4</span><br/> 
- </p> 
- <ul class="indent"> 
- <li class="style3">&lt;html&gt;</li> 
- <li class="style3">&lt;head&gt;</li> 
- <li class="style3">&lt;body&gt;</li> 
- <li class="style3">&lt;table&gt;</li> 
- <li class="style3">&lt;tbody&gt;</li> 
- <li class="style3">&lt;tr&gt;</li> 
- <li class="style3">&lt;tr&gt;</li> 
- <li class="style3">&lt;td&gt;</li> 
- <li class="style3">&lt;td&gt;</li> 
- <li class="style3">&lt;td&gt;</li> 
- <li class="style3">&lt;td&gt;</li> 
- </ul> 
-</div> 
- 
-<p class="style1">Note: &lt;tr&gt; stands for &quot;Table Row&quot; and &lt;td&gt; for &quot;Table Data.&quot; This is standard HTML.</p> 
-<p class="style1">Your browser displays this HTML document as</p> 
-<div class="example1"> 
- <p class="style3"> 
- <span class="smallType">Example 4.5</span> 
- </p> 
- <table> 
- <tbody> 
- <tr> 
- <td class="style3">Precipitation</td> 
- <td class="style3">Temperature</td> 
- </tr><tr> 
- <td class="style3">Rain</td> 
- <td class="style3">Cool</td> 
- </tr> 
- </tbody> 
- </table> 
-</div> 
- 
-<p class="style1">If you wanted to tell someone where to find &quot;Cool&quot; in this table, you would probably say, &quot;Look in the bottom right corner.&quot;</p> 
-<p class="style1">To give our computer instructions to find &quot;Cool&quot; you have to tell it where to find that particular node.</p> 
- 
-<div class="example1"> 
- <p class="style3"><span class="smallType">Example 4.6</span><br/>&lt;html&gt; &rarr; &lt;body&gt; &rarr; &lt;table&gt; &rarr; &lt;tbody&gt; &rarr; 2nd &lt;tr&gt; &rarr; 2nd &lt;td&gt;</p> 
-</div> 
- 
-<p class="style1">If you want to visualize this, a tree structure is perhaps easiest to understand.</p> 
-<div class="example1"> 
- <p class="style2"><img src="/member-projects/zotero-guide/images/DOM1.jpg" alt="DOM tree" class="middleImg" /><br/><span class="smallType">Fig 4.1: The DOM as a Tree</span></p> 
-</div>  
-   
- 
-<p class="style1">In plain English, you&#39;re looking for the second table data, contained in the second table row, of the table body, of the table, which is part of the body, which in turn is part of the document.</p> 
-<p class="style1">Note: Notice that &quot;Cool&quot; is not the 4th &lt;td&gt; node. Rather, it is the 2nd &lt;td&gt; of the 2nd &lt;tr&gt;. This distinction will become important later (and will be addressed in <a href="/member-projects/zotero-guide/chapter5.html">Chapter 5</a>).</p> 
- 
-</html> 
- 
-=== A quick note on aunts and uncles === 
- 
-<html> 
- 
-<p class="style1">We have already learned a little family jargon to help us understand the DOM. We know that &lt;tbody&gt; is the grandparent of &lt;td&gt;. We know that &lt;head&gt; and &lt;body&gt; are siblings. But, not all nodes are related. In the DOM, aunts and uncles count for nothing.</p> 
-<div class="example1"> 
- <p class="style2"><img src="/member-projects/zotero-guide/images/DOM2.jpg" alt="Aunts &amp; Uncles" class="middleImg" /><br/><span class="smallType">Fig 4.2: Aunts &amp; Uncles in the DOM</span></p> 
-</div>  
-   
-<p class="style1">These two nodes are essentially unrelated. You cannot tell the computer to get the &quot;Cool&quot; cell of the table by traveling through the first &lt;tr&gt; node. A legitimate path to &quot;Cool&quot; can only contain the first &lt;tr&gt; node if it also contains the second &lt;tr&gt; &mdash; the parent of &quot;Cool.&quot;</p> 
-<p class="style1">For Example: </p> 
-<div class="example1"> 
- <p class="style2"><img src="/member-projects/zotero-guide/images/DOM3.jpg" alt="DOM tree 3" class="middleImg" /><br/><span class="smallType">Fig 4.3: DOM Tree w. Multiple Results</span></p> 
-</div>  
- 
-<div class="example1"> 
- <p class="style3"><span class="smallType">Example 4.7</span><br/> 
- &lt;html&gt; &rarr; &lt;body&gt; &rarr; &lt;table&gt; &rarr; &lt;tbody&gt; &rarr; &lt;tr&gt; &rarr; 2nd &lt;td&gt;</p> 
-</div> 
- 
-<p class="style1">Notice we have simply been less specific about what we were looking for (removed the 2nd in front of &lt;tr&gt;), but we now have created a path that directs us to both &quot;Temperature&quot; and &quot;Cool.&quot; This may or may not be desirable as you will see in <a href="/member-projects/zotero-guide/chapter5.html">Chapter 5</a>.</p> 
-<p class="style1">Nodes need not be tables. Any HTML element is a node. Only certain kinds of nodes contain information that is displayed on web pages:</p> 
- 
-<table> 
- <tbody> 
- <tr> 
- <td>&lt;h1&gt;</td> 
- <td>A headline tag. Generally appears as big and bold (though that can be changed. There are also smaller renditions for less important headlines: &lt;h2&gt;&lt;h3&gt;&lt;h4&gt;, etc.</td> 
- </tr><tr> 
- <td>&lt;p&gt;</td> 
- <td>Paragraph tag. Usually contains text, but can also include images and links.</td> 
- </tr><tr> 
- <td>&lt;img&gt;</td> 
- <td>Image tag. A link to the image, which your browser finds so that it can display the actual image</td> 
- </tr><tr> 
- <td>&lt;a href&gt;</td> 
- <td>Link tag. Allows designers to embed a link in a word or series of words</td> 
- </tr><tr> 
- <td>&lt;li&gt;</td> 
- <td>List item tag. Appears as an item or series of items, often accompanied by bullets.</td> 
- </tr><tr> 
- <td>&lt;td&gt;</td> 
- <td>Table data tag. The content found in a table like the one we practiced on earlier.</td> 
- </tr> 
- </tbody> 
-</table> 
- 
-<p class="style1">The rest of the nodes serve other purposes, often related to how or where a displayed node will appear on the page. Some examples are:</p> 
- 
-<table> 
- <tbody> 
- <tr> 
- <td>&lt;div&gt;</td> 
- <td>Division tag. Used to separate code into manageable chunks that can be moved around and formatted in a certain way.</td> 
- </tr><tr> 
- <td>&lt;span&gt;</td> 
- <td>Span tag. Used to change the look of smaller pieces of code than &lt;div&gt; would be used for. A few words, for example.</td> 
- </tr><tr> 
- <td>&lt;ul&gt;</td> 
- <td>Unordered List. Used in conjunction with a &lt;li&gt; tag.</td> 
- </tr><tr> 
- <td>&lt;table&gt;</td> 
- <td>Table tag. Defines the opening of a table.</td> 
- </tr><tr> 
- <td>&lt;tr&gt;</td> 
- <td>Table row tag. Defines a new line in a table.</td> 
- </tr> 
- </tbody> 
-</table> 
- 
-</html> 
- 
-==== Practice ==== 
- 
-<html> 
- 
-<p class="style1">If you feel confident that you understand the DOM and how to find various element nodes in it, you can skip ahead to the next section. If you would like some more practice, here is a sample HTML document and some questions through which to work.</p> 
- 
-<div class="example1"> 
- <p class="style3"><span class="smallType">Example 4.8</span><br/> 
- 
- <span class="indent1">&lt;html&gt;</span><br/> 
- <span class="indent2">&lt;head&gt;</span><br/> 
- <span class="indent2">&lt;/head&gt;</span><br/><br/> 
- 
- <span class="indent2">&lt;body&gt;</span><br/> 
- <span class="indent3">&lt;table&gt;</span><br/> 
- <span class="indent4">&lt;tbody&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Day&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Month&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Wednesday&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;September&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent4">&lt;/tbody&gt;</span><br/> 
- <span class="indent3">&lt;/table&gt;</span><br/> 
- <span class="indent3">&lt;a href=&quot;http://niche-canada.org&quot;&gt;NiCHE Homepage&lt;/a&gt;</span><br/><br/> 
- 
- <span class="indent3">&lt;table&gt;</span><br/> 
- <span class="indent4">&lt;tbody&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Title&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Author&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Place&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Publisher&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;&lt;img src=&quot;http://nicheLogo.jpg&quot;&gt;&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;NiCHE Homepage&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Adam Crymble&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;London, ON&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;NiCHE&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;2009&lt;/td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent5">&lt;tr&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;&lt;a href=&quot;http://www.Zotero.org&quot;&gt;Zotero&lt;/a&gt;&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;&lt;img src=&quot;http://AdamPhoto.jpg&quot;&gt;&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;&lt;img src=&quot;http://ZoteroLogo.jpg&quot;&gt;&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;&lt;a href=&quot;http://niche-canada.org&quot;&gt;NiCHE&lt;/a&gt;&lt;/td&gt;</span><br/> 
- <span class="indent6">&lt;td&gt;Copyright Crymble&lt;td&gt;</span><br/> 
- <span class="indent5">&lt;/tr&gt;</span><br/> 
- <span class="indent4">&lt;/tbody&gt;</span><br/> 
- <span class="indent3">&lt;/table&gt;</span><br/> 
- <span class="indent2">&lt;/body&gt;</span><br/> 
- <span class="indent1">&lt;/html&gt;</span> 
- </p> 
-</div> 
-<br/> 
-<ol> 
- <li>How many element nodes are there in this example?</li> 
- <li>How many children does the &lt;body&gt; node have?</li> 
- <li>How many great&mdash;great&mdash;grandchildren does the &lt;body&gt; node have?</li> 
- <li>Describe a path to find the link to the Home Page</li> 
- <li>Describe the path to tell the computer how to find the element node containing the text &quot;Adam Crymble&quot;</li> 
- <li>Describe <strong>one</strong> path to find &quot;Day&quot; <strong>and</strong> &quot;Wednesday.&quot;</li> 
- <li>Describe <strong>one</strong> path that will lead to all the data contained in the 2nd &lt;table&gt;.</li> 
- <li>Describe a path that will lead to all the images contained in the 2nd &lt;table&gt;.</li> 
- <li>Describe a path that will lead to only the 2nd and 3rd images in the &lt;table&gt;.</li> 
-</ol> 
-<p class="style1"><a href="/member-projects/zotero-guide/chapter4answers.html">View Answers</a></p> 
- 
-</html> 
- 
-==== What you should understand before moving on ==== 
- 
-<html> 
- 
-<ul class="indent"> 
- <li>At this point, you should understand the fundamentals of HTML documents and the HTML tags that make up those documents.</li> 
- <li>Even if you cannot read the source code of a complicated website, you should understand the basic components, including &lt;html&gt;, &lt;head&gt;, and &lt;body&gt; as well as the common HTML elements used to output information to users: tables, text, images and links.</li> 
- <li>You should understand nodes and the relationships that they have with other nodes within an HTML document.</li> 
- <li>You should be able to explain in plain English how to find any element node in a basic HTML document using the DOM.</li> 
- <li>You might read in other texts that you should &quot;Access the DOM.&quot; For your purposes, you can substitute &quot;Use an XPath&quot; for these words. You&#39;ll learn how to do this in <a href="/member-projects/zotero-guide/chapter5.html">Chapter 5</a> and <a href="/member-projects/zotero-guide/chapter11.html">Chapter 11</a>.</li> 
-</ul> 
- 
-</html> 
- 
-==== Further Reading ==== 
- 
-<html> 
- 
-<ul class="indent"> 
- <li><a href="http://www.w3schools.com/html/default.asp">W3Schools HTML tutorial</a></li> 
- <li><a href="http://www.w3schools.com/htmldom/default.asp">W3Schools HTML DOM tutorial</a></li>  
- <li><a href="http://www.w3schools.com/JS/js_obj_htmldom.asp">W3Schools JS DOM tutorial</a></li> 
-</ul> 
- 
-</html> 
- 
-===== Chapter 5: XPath directions ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter5.html|HWZT chapter 5 (XPath directions)]]: 
- 
-The {DOM Inspector + XPather} workflow differs from that of Solvent. After opening the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]], 
-  - Open DOM Inspector (aka //DI//) with CTRL+SHIFT+C or from the Firefox main menu with Tools>DOM Inspector. XPather functionality is available from UI within the DI window. 
-  - Hit button=Inspect at the upper right of the DI window. This will open pane=Browser in the DI window displaying the contents of the first sample page. 
-  - To test the XPath string denoting the heading (text="Method and Meaning in Canadian Environmental History") of the first sample page, 
-    * in textbox=XPath in the DI window, type <code>//h1</code> 
-    * hit button=Eval next to the text box. This will popup dialog="XPath Browser" showing the matches for your string. (In this case, there should be only 1 match.) 
-    * Move dialog="XPath Browser" so you can see both it and the pane=Browser of the DI window. 
-    * In table="Matching Nodes" in dialog="XPath Browser", click on the row representing the match. In the pane=Browser of the DI window, you should briefly see a flashing red border around the heading. 
-  
-===== Chapter 6: JS Variables ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter6.html|HWZT chapter 6 (JS Variables)]]: 
- 
-A few things have changed since HWZT. To use its first Scaffold example as an example: 
- 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - If you are not already in tab=Metadata, select that. Enter some text in the Label and Creator fields. 
-  - The URI of the sample page has changed since HWZT, so you will need to enter Target=<code>http://niche-canada.org/member-projects/zotero-guide/</code> 
-  - Hit button="Test Regex". You should get a result, in the "Test Frame" on the right of the tab, similar to that described in HWZT. 
-  - Instead of <code>Click on the "Detect Code" tab</code>, click on tab=Code. As directed, in that tab enter the expressions <code>var myVariable=4; 
-Zotero.debug(myVariable); 
-</code>  
-  - Click on icon="Run doWeb" (a stylized thunderbolt) to obtain an evaluation like <code>12:00:00 ===>4<===(number)</code> 
-  - To also obtain an evaluation like <code>12:00:00 detectWeb returned type "undefined"</code>, you will need to also click on icon="Run detectWeb" (the eye next to the thunderbolt). 
- 
-The subsequent examples behave similarly. 
- 
-===== Chapter 7: JS Methods & Math ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter7.html|HWZT chapter 7 (JS Methods & Math)]]: the examples all work in Scaffold 2.0, no deltas (other than those described in the delta for chapter 6 above). 
- 
-===== Chapter 8: JS If Statements ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter8.html|HWZT chapter 8 (JS If Statements)]]: the examples all work in Scaffold 2.0, no deltas (other than those described in the delta for chapter 6 above). 
- 
-===== Chapter 9: JS Loops ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter9.html|HWZT chapter 9 (JS Loops)]]: the examples all work in Scaffold 2.0, no deltas (other than those described in the delta for chapter 6 above). 
- 
-===== Chapter 10: JS Functions ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter10.html|HWZT chapter 10 (JS Functions)]]: the examples all work in Scaffold 2.0, no deltas (other than those described in the delta for chapter 6 above). 
- 
-===== Chapter 11: XPath containers ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter11.html|HWZT chapter 11 (XPath containers)]]:  
- 
-Again, a few changes since HWZT, and again, using its first Scaffold example as an example: 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - If you are not already in tab=Metadata, select that. Enter some text in the Label and Creator fields. 
-  - The URI of the sample page has changed since HWZT, so you will need to enter Target=<code>http://niche-canada.org/member-projects/zotero-guide/</code> 
-  - Hit button="Test Regex". You should get a result, in the "Test Frame" on the right of the tab, similar to that described in HWZT. 
-  - Instead of <code>Click on the "Detect Code" tab</code>, click on tab=Code. This is the tab where code should be entered. 
-  - To excute code and debug, HWZT has you click an "Execute" button with a thunderbolt icon.  In newer versions of Scaffold, the single execute button as been replaced by one "Run doWeb" button (thunderbolt icon) and one "Run detectWeb" button (eye icon).  Starting in HWZT exampe 11.6, you'll be writing detectWeb functions, so you'll need to click the "Run detectWeb" button to run your detectWeb function.  For example, at example 11.6, when you click "Run detectWeb", you should get results like <code>12:00:00 Title:</code> 
- 
- 
-As noted at HWZT, example 11.4, certain code needs to be included inside the top of every Function in which you have an XPath (container).  So, putting everything together, the code for example 11.6 should look like this: <code>function detectWeb(doc, url) { 
-  var namespace = doc.documentElement.namespaceURI; 
-  var nsResolver = namespace ? function(prefix) { 
-    if (prefix == "x" ) return namespace; else return null; 
-    } : null; 
-  var myXPath = '//td[1]'; 
-  var myXPathObject =  
-    doc.evaluate(myXPath, doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext().textContent; 
-  Zotero.debug(myXPathObject); 
-}</code>  
- 
-The code for the second complete Scaffold example (from "Example 11.9") is similarly 
-<code>function detectWeb(doc, url) { 
-  var namespace = doc.documentElement.namespaceURI; 
-  var nsResolver = namespace ? function(prefix) { 
-    if (prefix == "x" ) return namespace; else return null; 
-    } : null; 
-  var myXPath = '//div[@id="Content"]/div/table[@class="Bibrec"]/tbody/tr/td[1][@class="Label"]'; 
-  var myXPathObject = doc.evaluate(myXPath, doc, nsResolver, XPathResult.ANY_TYPE, null); 
-  var items = new Object(); 
-  var headers; 
-  while (headers = myXPathObject.iterateNext()) { 
-    items[headers.textContent]=''; 
-  } 
-  Zotero.debug(items); 
-} 
-</code> Click on icon="Run detectWeb" (the eye): you should get results like <code>12:00:00 'Title:' => "" 
-  'PrincipalAuthor:' => "" 
-  'Imprint:' => "" 
-  'Subjects:' => "" 
-  '' => "" 
-  'ISBN-10:' => "" 
-  'Collection:' => "" 
-  'Pages:' => "" 
-</code> 
- 
-===== Chapter 12: Regexps ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter12.html|HWZT chapter 12 (Regexps)]]: the example works in Scaffold 2.0 with no deltas (other than those described in chapter 11 above). To test, open Scaffold 2.0 on any page (e.g. the directions for opening for chapter 11 will work) and enter the code <code>function detectWeb(doc, url) { 
-  var x = "                     346                       "  
-  x = x.replace(/^\s*|\s*$/g, ''); 
-  Zotero.debug(x);  
-} 
-</code>. Click on icon="Run detectWeb" (the eye): in the Test Frame you should get results like <code>12:00:00 346</code> 
- 
-===== Chapter 13: Metadata Tab ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter13.html|HWZT chapter 13 (Metadata Tab)]]: mostly informational, all works in Scaffold 2.0 with no deltas (other than those previously described). However the next chapter (14, from which comes the following quote) "builds upon the translator started in [this chapter]" and assumes that, having "already created [this] translator you can find it again by opening Scaffold and clicking on [icon=Load From Database]." There are two problems with this statement, in descending seriousness: 
- 
-  - this chapter (13) does not describe saving the tutorial translator 
-  - the icon's title is merely "Load" in Scaffold 2.0 
- 
-So, to create and save the tutorial translator, do 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - If you are not already in tab=Metadata, select that. 
-  - In field=Label, enter <code>How to Write a Zotero Translator</code> 
-  - In field=Creator, enter your name 
-  - In field=Target, enter <code>/member-projects/zotero-guide</code> 
-  - Scaffold 2.0 will not save a translator without code (and it will silently refuse to do so), so switch to tab=Code, and enter <code>function detectWeb(doc, url) { 
-  var x = "                     346                       "  
-  x = x.replace(/^\s*|\s*$/g, ''); 
-  Zotero.debug(x);  
-} 
-</code> (though any working code should do). 
-  - Click icon=Save (second from left, looks like some tabs): your translator should save silently. 
- 
-To test your translator saved properly, 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold" with little data in tab=Metadata. 
-  - Hit icon=Load (the non-OS UI item closest to the upper left of the dialog) to popup dialog="Load Translator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator</code> The labels are in lexicographic order (after the first few), so expect to see it between label="History Cooperative" and label="Hurricane Digital Memory Bank". 
- 
-===== Chapter 14: DetectWeb Tab ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter14.html|HWZT chapter 14 (DetectWeb Tab)]]: the tutorial example works in Scaffold 2.0 and Firefox 3.5, with 2 minor exceptions 
- 
-  - HWZT says "Save your entry and click Execute": instead click icon="Run detectWeb" (the eye) 
-  - HWZT says "If you would like to see the Icon in the address bar [of the first sample page], you will likely have to relaunch Firefox": in fact, if you have in fact saved your entry, you need only reload the page or tab. 
- 
-As HWZT has gotten increasingly casual, here are some step-by-step instructions for this chapter's tutorial section: 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (the non-OS UI item closest to the upper left of the dialog). This should popup dialog="Load Translator" displaying a single table mapping "Label" to "Creator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Switch to tab=Code and enter the following:<code>function detectWeb(doc, url) { 
-  if (doc.title.match("Single Item")) { 
-    return "book"; 
-  } else if (doc.title.match("Search Results")) { 
-    return "multiple"; 
-  } 
-} 
-</code> 
-  - Click icon="Run detectWeb" (the eye): in the Test Frame you should get results like <code>12:00:00 detectWeb returned type "book"</code> 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - Return focus to the page or tab containing the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] and refresh it: you should see the Zotero book icon in the location field of your Firefox. 
- 
-===== Chapter 15: Scraping the Search Results Page ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter15.html|HWZT 
-chapter 15 (Scraping the Search Results Page)]]: Again, the tutorial example works, but is rather casually presented (notably, it requires a different sample page and really a separate translator), so here are some step-by-step instructions. Basically, we will 
- 
-  - rename and save the original translator 
-  - create the stub for a second translator 
-  - populate, test, and save the second translator 
- 
-To rename the original translator, 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (at the upper left of the dialog). This should popup dialog="Load Translator" displaying a single table mapping "Label" to "Creator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Append to field=Label " (single result)" so that the field now says <code>How to Write a Zotero Translator (single result)</code>. Click icon=Save (second from left): your translator should save silently. 
-  - Click icon="Run detectWeb" (the eye) to ensure the code still works: in the Test Frame you should get results like <code>12:00:00 detectWeb returned type "book"</code> 
-  - Leave the current instance of Scaffold 2.0 open, since we'll use the same translator in the next section. 
- 
-To create the stub for a second translator,  
- 
-  - Switch to tab=Metadata. 
-  - Click button=Generate next to field="Translator ID": the Translator ID value should change. 
-  - Change the contents of field=Label from <code>How to Write a Zotero Translator (single result)</code> to <code>How to Write a Zotero Translator (search results)</code>. 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - Close all running Scaffold 2.0 instances. 
- 
-To populate, test, and save the second translator, 
- 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/searchresults1.html|first sample search page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (upper left of the dialog) to popup dialog="Load Translator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator (search results)</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Click icon="Run detectWeb" (the eye): in the Test Frame you should get results like <code>12:00:00 detectWeb returned type "multiple"</code> 
-  - Switch to tab=Code and enter the following code (actually, you're just appending <code>function doWeb</code> :<code>function detectWeb(doc, url) { 
-  if (doc.title.match("Single Item")) { 
-    return "book"; 
-  } else if (doc.title.match("Search Results")) { 
-    return "multiple"; 
-  } 
-} 
-function doWeb(doc, url) { 
-  var namespace = doc.documentElement.namespaceURI; 
-  var nsResolver = namespace ? function(prefix) { 
-    if (prefix == 'x') return namespace; else return null; 
-  } : null; 
-  var articles = new Array(); 
-  var items = new Object(); 
-  var nextTitle; 
-  if (detectWeb(doc, url) == "multiple") { 
-    var titles = doc.evaluate('//td[2]/a', doc, nsResolver, XPathResult.ANY_TYPE, null); 
-    while (nextTitle = titles.iterateNext()) { 
-      items[nextTitle.href] = nextTitle.textContent; 
-    } 
-    items = Zotero.selectItems(items); 
-    for (var i in items) { 
-      articles.push(i); 
-    } 
-  } else { 
-    articles = [url]; 
-  } 
-  Zotero.Utilities.processDocuments(articles, scrape, function(){Zotero.done();}); 
-  Zotero.wait(); 
-} 
-</code> 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - Click icon="Run doWeb" (the thunderbolt): a dialog="Select Items" should popup, with a selection area containing 10 items, corresponding to the 10 items in the [[http://niche-canada.org/member-projects/zotero-guide/searchresults1.html|sample search page]]. Check to see that the titles of the items in the dialog match the titles of the items on the sample search page, then click button=Cancel on dialog="Select Items". 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - Close all running Scaffold 2.0 instances. 
-  - Return focus to the page or tab containing the [[http://niche-canada.org/member-projects/zotero-guide/searchresults1.html|sample search page]] and refresh it: you should see the Zotero folder icon in the location field of your Firefox. 
- 
-===== Chapter 16: Scraping the Individual Entry Page ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter16.html|HWZT chapter 16 (Scraping the Individual Entry Page)]]: As previously, the tutorial example works, but is rather casually presented, so here are some step-by-step instructions to produce the result of the tutorial section: 
- 
-  - open the single-result translator 
-  - extend the single-result translator 
-  - test the single-result translator on single-result pages 
-  - test the single-result translator on a search-results page 
- 
-To open the single-result translator: 
- 
-  - Close any running Scaffold 2.0 instances. 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (at the upper left of the dialog). This should popup dialog="Load Translator" displaying a single table mapping "Label" to "Creator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator (single result)</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Click icon="Run detectWeb" (the eye) to ensure its current code still works: in the Test Frame you should get results like <code>12:00:00 detectWeb returned type "multiple"</code> 
-  - Leave the current instance of Scaffold 2.0 open, since we'll use the same translator in the next section. 
- 
-To extend the single-result translator: add a <code>doWeb</code> function to the JavaScript in tab=Code. Obviously one can implement this several ways. The following code has been tested, and is somewhat more modular than that provided by HWZT. To use it, just 
- 
-  - replace the current contents of tab=Code with the code below:<code>function detectWeb(doc, url) { 
-  if (doc.title.match("Single Item")) { 
-    return "book"; 
-  } else if (doc.title.match("Search Results")) { 
-    return "multiple"; 
-  } 
-} 
- 
-// The function used to save well formatted data to Zotero 
-function associateData (newItem, items, field, zoteroField) { 
-  if (items[field]) { 
-    newItem[zoteroField] = items[field]; 
-  } 
-} 
- 
-function scrape(doc, url) { 
-  // variable declarations 
-  var newItem = new Zotero.Item('book'); 
-  newItem.url = doc.location.href; 
-  newItem.title = "No Title Found"; 
-  var items = new Object(); 
-  var tagsContent = new Array(); 
- 
-  // scrape page data, save to Zotero 
-  getItems(doc, items, tagsContent); 
-  getAuthors(newItem, items); 
-  getImprints(newItem, items); 
-  getTags(newItem, items, tagsContent); 
-  saveToZotero(newItem, items); 
-} 
- 
-function getItems(doc, items, tagsContent) { 
-  // namespace code 
-  var namespace = doc.documentElement.namespaceURI; 
-  var nsResolver = namespace ?  
-    function(prefix) { 
-      if (prefix == 'x') return namespace; else return null; 
-    } : null; 
- 
-  // populate "items" Object and save tags to an Array 
-  var blankCell = "temp"; 
-  var headersTemp; 
-  var headers; 
-  var contents; 
-  var myXPathObject = doc.evaluate('//td[1]', doc, nsResolver, XPathResult.ANY_TYPE, null); 
-  var myXPathObject2 = doc.evaluate('//td[2]', doc, nsResolver, XPathResult.ANY_TYPE, null); 
-  while (headers = myXPathObject.iterateNext()) { 
-    headersTemp = headers.textContent; 
-    if (!headersTemp.match(/\w/)) { 
-      headersTemp = blankCell; 
-      blankCell = blankCell + "1"; 
-    } 
-    contents = myXPathObject2.iterateNext().textContent; 
-    if (headersTemp.match("temp")) { 
-      tagsContent.push(contents); 
-    } 
-    items[headersTemp.replace(/\s+/g, '')]=contents.replace(/^\s*|\s*$/g, ''); 
-  } 
-} 
- 
-function getAuthors(newItem, items) { 
-  //Formatting and saving "Author" field 
-  if (items["PrincipalAuthor:"]) { 
-    var author = items["PrincipalAuthor:"]; 
-    if (author.match("; ")) { 
-      var authors = author.split("; "); 
-      for (var i in authors) { 
-        newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[i], "author")); 
-      } 
-    } else { 
-      newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author")); 
-    } 
-  } 
-} 
- 
-function getImprints(newItem, items) { 
-  // Format and save "Imprint" fields 
-  if (items["Imprint:"]) { 
-    items["Imprint:"] = items["Imprint:"].replace(/\s\s+/g, ''); 
-    if (items["Imprint:"].match(":")) { 
-      var colonLoc = items["Imprint:"].indexOf(":"); 
-      newItem.place = items["Imprint:"].substr(1, colonLoc-1); 
-      var commaLoc = items["Imprint:"].lastIndexOf(","); 
-      var date1 =items["Imprint:"].substr(commaLoc + 1); 
-      newItem.date = date1.substr(0, date1.length-1); 
-      newItem.publisher = items["Imprint:"].substr(colonLoc+1, commaLoc-colonLoc-1); 
-    } else { 
-      newItem.publisher = items["Imprint:"]; 
-    } 
-  } 
-} 
- 
-function getTags(newItem, items, tagsContent) { 
-  if (items["Subjects:"]) { 
-    tagsContent.push(items["Subjects:"]); 
-  } 
-  for (var i = 0; i < tagsContent.length; i++) { 
-    newItem.tags[i] = tagsContent[i]; 
-  } 
-} 
- 
-function saveToZotero(newItem, items) { 
-  // Associate and save well-formed data to Zotero 
-  associateData (newItem, items, "Title:", "title"); 
-  associateData (newItem, items, "ISBN-10:", "ISBN"); 
-  associateData (newItem, items, "Collection:", "extra"); 
-  associateData (newItem, items, "Pages:", "pages"); 
-  newItem.repository = "NiCHE"; 
-  newItem.complete(); 
-} 
- 
-function doWeb(doc, url) { 
-  // namespace code 
-  var namespace = doc.documentElement.namespaceURI; 
-  var nsResolver = namespace ? function(prefix) { 
-    if (prefix == 'x') return namespace; else return null; 
-  } : null; 
- 
-  // variable declarations 
-  var articles = new Array(); 
-  var items = new Object(); 
-  var nextTitle; 
- 
-  // If Statement checks if page is a Search Result, then saves requested Items 
-  if (detectWeb(doc, url) == "multiple") { 
-    var titles = doc.evaluate('//td[2]/a', doc, nsResolver, XPathResult.ANY_TYPE, null); 
-    while (nextTitle = titles.iterateNext()) { 
-      items[nextTitle.href] = nextTitle.textContent; 
-    } 
-    items = Zotero.selectItems(items); 
-    for (var i in items) { 
-      articles.push(i); 
-    } 
-  } else { 
-    //saves single page items 
-    articles = [url]; 
-  } 
- 
-  // process everything, calling function=scrape to do the heavy lifting 
-  Zotero.Utilities.processDocuments(articles, scrape, function(){Zotero.done();}); 
-  Zotero.wait(); 
-} 
-</code> 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - Close all running Scaffold 2.0 instances. 
- 
-To test the translator on a single-result page:  
- 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample1.html|first sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (at the upper left of the dialog). This should popup dialog="Load Translator" displaying a single table mapping "Label" to "Creator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator (single result)</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Click icon="Run doWeb" (the thunderbolt) to test the new code: in the Test Frame you should get results like <code>12:00:00 Returned item: 
-    'itemType' => "book" 
-    'creators' ... 
-        '0' ... 
-            'firstName' => "Alan" 
-            'lastName' => "MacEachern" 
-            'creatorType' => "author" 
-        '1' ... 
-            'firstName' => "William J." 
-            'lastName' => " Turkel" 
-            'creatorType' => "author" 
-    'notes' ... 
-    'tags' ... 
-        '0' => "History" 
-        '1' => "Methodology" 
-        '2' => "Tables." 
-        '3' => "Environment" 
-    'seeAlso' ... 
-    'attachments' ... 
-    'url' => "http://niche-canada.org/member-projects/zotero-guide/sample1.html" 
-    'title' => "Method and Meaning in Canadian Environmental History" 
-    'place' => "Toronto" 
-    'date' => "2009" 
-    'publisher' => "Nelson Canada" 
-    'ISBN' => "0176441166" 
-    'extra' => "None" 
-    'pages' => "573" 
-    'libraryCatalog' => "NiCHE" 
-    'complete' => function(...){...}  
-          
-14:36:30 Translation successful 
-</code> 
-  - Close all running Scaffold 2.0 instances. 
- 
-Test the translator on another single-result page:  
- 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/sample2.html|second sample page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (at the upper left of the dialog). This should popup dialog="Load Translator" displaying a single table mapping "Label" to "Creator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator (single result)</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Click icon="Run doWeb" (the thunderbolt) to test the new code: in the Test Frame you should get results like <code>12:00:00 Returned item: 
-             'itemType' => "book" 
-             'creators' ... 
-                 '0' ... 
-                     'firstName' => "David Freeland" 
-                     'lastName' => "Duke" 
-                     'creatorType' => "author" 
-             'notes' ... 
-             'tags' ... 
-                 '0' => "Canada" 
-                 '1' => "Environment" 
-                 '2' => "Bibliography" 
-                 '3' => "Tables." 
-                 '4' => "History" 
-             'seeAlso' ... 
-             'attachments' ... 
-             'url' => "http://niche-canada.org/member-projects/zotero-guide/sample2.html" 
-             'title' => "Canadian Environmental History: Essential Readings" 
-             'place' => "Toronto" 
-             'date' => "2006" 
-             'publisher' => "Canadian Scholars Press" 
-             'ISBN' => "1551303108" 
-             'extra' => "None" 
-             'pages' => "392" 
-             'libraryCatalog' => "NiCHE" 
-             'complete' => function(...){...}  
-          
-18:52:01 Translation successful 
-</code> 
-  - Close all running Scaffold 2.0 instances. 
- 
-To test the translator on a search-results page: 
- 
-  - Ensure the [[http://niche-canada.org/member-projects/zotero-guide/searchresults1.html|first sample search page]] is open in your browser and has focus. 
-  - Open Scaffold 2.0 from the Firefox main menu with Tools>Scaffold. This should popup dialog="Zotero Scaffold". 
-  - Hit icon=Load (upper left of the dialog) to popup dialog="Load Translator". 
-  - Scroll through the "Load Translator" table until you see Label=<code>How to Write a Zotero Translator (search results)</code>, then hit button=OK. 
-  - You will return to the main dialog="Zotero Scaffold". Check to see that tab=Metadata is properly populated. 
-  - Click icon="Run doWeb" (the thunderbolt): a dialog="Select Items" should popup, with a selection area containing 10 items, corresponding to the 10 items in the [[http://niche-canada.org/member-projects/zotero-guide/searchresults1.html|sample search page]]. Check to see that the titles of the items in the dialog match the titles of the items on the sample search page, then click button=Cancel on dialog="Select Items". 
-  - TODO: test adding an item to your library. 
-  - Leave the current instance of Scaffold 2.0 open, since we'll use the same translator in the next section. 
- 
-Since it is now clear that our "single-result translator" also handles search results properly, we can save it as just "How to Write a Zotero Translator" with no suffix: 
- 
-  - Switch to tab=Metadata. 
-  - In field=Label, remove the "(single result)" suffix. 
-  - Click icon=Save (second from left): your translator should save silently. 
-  - TODO: delete now-unnecessary translator="How to Write a Zotero Translator (search results)" 
-  - Close all running Scaffold 2.0 instances. 
- 
-===== Chapter 17: Common Problems when Scraping an Individual Entry Page ===== 
- 
-[[http://niche-canada.org/member-projects/zotero-guide/chapter17.html|HWZT chapter 17 (Common Problems when Scraping an Individual Entry Page)]]: information only, hopefully uptodate. 
  
dev/how_to_write_a_zotero_translator_plusplus.txt · Last modified: 2017/11/19 19:24 by adamsmith