rturk 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +3 -2
- data/Rakefile +10 -4
- data/VERSION +1 -1
- data/aws_docs/ApiReference_AnswerKeyDataStructureArticle.html +98 -0
- data/aws_docs/ApiReference_ApproveAssignmentOperation.html +75 -0
- data/aws_docs/ApiReference_AssignQualificationOperation.html +107 -0
- data/aws_docs/ApiReference_AssignmentDataStructureArticle.html +171 -0
- data/aws_docs/ApiReference_BlockWorkerOperation.html +70 -0
- data/aws_docs/ApiReference_ChangeHITTypeOfHITOperation.html +68 -0
- data/aws_docs/ApiReference_CommonParametersArticle.html +119 -0
- data/aws_docs/ApiReference_CreateHITOperation.html +330 -0
- data/aws_docs/ApiReference_CreateQualificationTypeOperation.html +190 -0
- data/aws_docs/ApiReference_DataStructuresArticle.html +7 -0
- data/aws_docs/ApiReference_DisableHITOperation.html +63 -0
- data/aws_docs/ApiReference_DisposeHITOperation.html +56 -0
- data/aws_docs/ApiReference_DisposeQualificationTypeOperation.html +52 -0
- data/aws_docs/ApiReference_ExtendHITOperation.html +86 -0
- data/aws_docs/ApiReference_ExternalQuestionArticle.html +125 -0
- data/aws_docs/ApiReference_ForceExpireHITOperation.html +61 -0
- data/aws_docs/ApiReference_FormattedContentXHTMLArticle.html +289 -0
- data/aws_docs/ApiReference_GetAccountBalanceOperation.html +51 -0
- data/aws_docs/ApiReference_GetAssignmentsForHITOperation.html +166 -0
- data/aws_docs/ApiReference_GetBonusPaymentsOperation.html +160 -0
- data/aws_docs/ApiReference_GetFileUploadURLOperation.html +75 -0
- data/aws_docs/ApiReference_GetHITOperation.html +89 -0
- data/aws_docs/ApiReference_GetHITsForQualificationTypeOperation.html +137 -0
- data/aws_docs/ApiReference_GetQualificationRequestsOperation.html +155 -0
- data/aws_docs/ApiReference_GetQualificationScoreOperation.html +68 -0
- data/aws_docs/ApiReference_GetQualificationTypeOperation.html +57 -0
- data/aws_docs/ApiReference_GetQualificationsForQualificationTypeOperation.html +134 -0
- data/aws_docs/ApiReference_GetRequesterStatisticOperation.html +315 -0
- data/aws_docs/ApiReference_GetReviewableHITsOperation.html +155 -0
- data/aws_docs/ApiReference_GrantBonusOperation.html +95 -0
- data/aws_docs/ApiReference_GrantQualificationOperation.html +69 -0
- data/aws_docs/ApiReference_HITDataStructureArticle.html +302 -0
- data/aws_docs/ApiReference_HelpOperation.html +125 -0
- data/aws_docs/ApiReference_LocaleDataStructureArticle.html +29 -0
- data/aws_docs/ApiReference_NotificationAPI_BuildingANotificationReceptor.html +36 -0
- data/aws_docs/ApiReference_NotificationAPI_ElementsOfANotification.html +40 -0
- data/aws_docs/ApiReference_NotificationDataStructureArticle.html +73 -0
- data/aws_docs/ApiReference_NotificationReceptorAPIArticle.html +9 -0
- data/aws_docs/ApiReference_NotificationReceptorAPI_RESTTransportArticle.html +39 -0
- data/aws_docs/ApiReference_NotificationReceptorAPI_SOAPTransportArticle.html +45 -0
- data/aws_docs/ApiReference_NotifyWorkersOperation.html +82 -0
- data/aws_docs/ApiReference_OperationsArticle.html +8 -0
- data/aws_docs/ApiReference_PriceDataStructureArticle.html +65 -0
- data/aws_docs/ApiReference_QualificationDataStructureArticle.html +89 -0
- data/aws_docs/ApiReference_QualificationRequestDataStructureArticle.html +102 -0
- data/aws_docs/ApiReference_QualificationRequirementDataStructureArticle.html +176 -0
- data/aws_docs/ApiReference_QualificationTypeDataStructureArticle.html +198 -0
- data/aws_docs/ApiReference_QuestionAnswerDataArticle.html +8 -0
- data/aws_docs/ApiReference_QuestionFormAnswersDataStructureArticle.html +54 -0
- data/aws_docs/ApiReference_QuestionFormDataStructureArticle.html +796 -0
- data/aws_docs/ApiReference_RegisterHITTypeOperation.html +149 -0
- data/aws_docs/ApiReference_RejectAssignmentOperation.html +66 -0
- data/aws_docs/ApiReference_RejectQualificationRequestOperation.html +61 -0
- data/aws_docs/ApiReference_RevokeQualificationOperation.html +78 -0
- data/aws_docs/ApiReference_SearchHITsOperation.html +164 -0
- data/aws_docs/ApiReference_SearchQualificationTypesOperation.html +211 -0
- data/aws_docs/ApiReference_SendTestEventNotificationOperation.html +78 -0
- data/aws_docs/ApiReference_SetHITAsReviewingOperation.html +73 -0
- data/aws_docs/ApiReference_SetHITTypeNotificationOperation.html +99 -0
- data/aws_docs/ApiReference_UnblockWorkerOperation.html +67 -0
- data/aws_docs/ApiReference_UpdateQualificationScoreOperation.html +77 -0
- data/aws_docs/ApiReference_UpdateQualificationTypeOperation.html +180 -0
- data/aws_docs/ApiReference_WsdlLocationArticle.html +95 -0
- data/aws_docs/ApiReference_XMLParameterValuesArticle.html +37 -0
- data/aws_docs/Welcome.html +125 -0
- data/aws_docs/WhatsNew.html +16 -0
- data/aws_docs/_title.html +28 -0
- data/aws_docs/_toc.html +749 -0
- data/aws_docs/aws-docs-IE.css +419 -0
- data/aws_docs/aws-docs.css +455 -0
- data/aws_docs/copyrightinfo.html +14 -0
- data/aws_docs/frameset.js +12 -0
- data/aws_docs/images/Feedback_link.gif +0 -0
- data/aws_docs/images/caution.png +0 -0
- data/aws_docs/images/home.gif +0 -0
- data/aws_docs/images/important.png +0 -0
- data/aws_docs/images/next.gif +0 -0
- data/aws_docs/images/note.png +0 -0
- data/aws_docs/images/prev.gif +0 -0
- data/aws_docs/images/tip.png +0 -0
- data/aws_docs/images/title-swoosh-logo.gif +0 -0
- data/aws_docs/images/toc_bullet.gif +0 -0
- data/aws_docs/images/toc_plus.gif +0 -0
- data/aws_docs/index.html +18 -0
- data/aws_docs/toc.js +84 -0
- data/lib/rturk.rb +2 -2
- data/lib/rturk/adapter.rb +11 -0
- data/lib/rturk/adapters/assignment.rb +13 -50
- data/lib/rturk/adapters/hit.rb +21 -9
- data/lib/rturk/adapters/worker.rb +23 -0
- data/lib/rturk/operation.rb +1 -1
- data/lib/rturk/operations/create_hit.rb +10 -54
- data/lib/rturk/operations/register_hit_type.rb +68 -0
- data/lib/rturk/operations/search_hits.rb +44 -0
- data/lib/rturk/parser.rb +8 -0
- data/lib/rturk/parsers/answer_parser.rb +29 -0
- data/lib/rturk/parsers/assignment_parser.rb +49 -0
- data/lib/rturk/parsers/hit_parser.rb +50 -0
- data/lib/rturk/{response.rb → parsers/response.rb} +7 -2
- data/lib/rturk/{responses → parsers/responses}/create_hit_response.rb +2 -2
- data/lib/rturk/{responses → parsers/responses}/get_account_balance_response.rb +0 -0
- data/lib/rturk/{responses → parsers/responses}/get_assignments_for_hit_response.rb +3 -3
- data/lib/rturk/{responses → parsers/responses}/get_hit_response.rb +9 -16
- data/lib/rturk/{responses → parsers/responses}/get_reviewable_hits_response.rb +3 -5
- data/lib/rturk/parsers/responses/register_hit_type_response.rb +17 -0
- data/lib/rturk/parsers/responses/search_hits_response.rb +65 -0
- data/lib/rturk/xml_utilities.rb +14 -3
- data/rturk.gemspec +112 -12
- data/spec/adapters/hit_spec.rb +10 -0
- data/spec/fake_responses/register_hit_type.xml +6 -0
- data/spec/fake_responses/search_hits.xml +50 -0
- data/spec/operations/create_hit_spec.rb +2 -2
- data/spec/operations/get_hit_spec.rb +1 -1
- data/spec/operations/register_hit_type_spec.rb +24 -0
- data/spec/{adapters/answers_spec.rb → parsers/answer_parser_spec.rb} +2 -2
- data/spec/parsers/hit_parser_spec.rb +41 -0
- data/spec/xml_parse_spec.rb +2 -2
- metadata +111 -11
- data/lib/rturk/adapters/answers.rb +0 -38
@@ -0,0 +1,125 @@
|
|
1
|
+
<html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
|
2
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
+
<title>ExternalQuestion</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_QuestionAnswerDataArticle.html" title="Chapter 7. Question and Answer Data"><link rel="prev" href="ApiReference_AnswerKeyDataStructureArticle.html" title="AnswerKey"><link rel="next" href="ApiReference_NotificationReceptorAPIArticle.html" title="Chapter 8. The Notification Receptor API"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
|
4
|
+
urchinTracker();
|
5
|
+
</script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
|
6
|
+
</script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_AnswerKeyDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_ExternalQuestionArticle">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_NotificationReceptorAPIArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> » <a href="ApiReference_QuestionAnswerDataArticle.html">Question and Answer Data</a> » <strong>ExternalQuestion</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">ExternalQuestion</h1></div></div></div><a class="indexterm" name="d0e20183"></a><a class="indexterm" name="d0e20186"></a><a class="indexterm" name="d0e20191"></a><a class="indexterm" name="d0e20196"></a><a class="indexterm" name="d0e20199"></a><div class="highlights"><p><strong>Topics</strong></p><ul><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20203">Description</a></li><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20266">The ExternalQuestion Data Structure</a></li><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20355">Example</a></li><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20370">The External Form</a></li><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20498">The Answer Data</a></li><li><a href="ApiReference_ExternalQuestionArticle.html#d0e20531">Guidelines For Using External Questions</a></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20203">Description</h2></div></div></div><p> Instead of providing a <a class="link" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm">QuestionForm data structure</a> that tells Amazon Mechanical Turk how to display your questions
|
7
|
+
and collect answers, you can host the questions on your own web site using an "external" question. </p><p> A HIT with an external question displays a web page from your web site in a frame in the
|
8
|
+
Worker's web browser. Your web page displays a form for the Worker to fill out and submit. The
|
9
|
+
Worker submits results using your form, and your form submits the results back to Amazon Mechanical Turk.
|
10
|
+
Using your web site to display the form gives your web site control over how the question appears
|
11
|
+
and how answers are collected. </p><p> To use an external question with a HIT, you provide a <em class="parameter"><code>ExternalQuestion</code></em>
|
12
|
+
data structure as the value of the <em class="parameter"><code>Question</code></em> parameter. As with the
|
13
|
+
<em class="parameter"><code>QuestionForm</code></em> data structure, an <em class="parameter"><code>ExternalQuestion</code></em>
|
14
|
+
is a string value that consists of XML data. This data must conform to the
|
15
|
+
<em class="parameter"><code>ExternalQuestion</code></em> schema. See <a class="link" href="ApiReference_WsdlLocationArticle.html" title="Chapter 3. WSDL and Schema Locations">WSDL and Schema Locations</a>
|
16
|
+
for the location of this schema. For more information about using XML data as a parameter or
|
17
|
+
return value, see <a class="link" href="ApiReference_XMLParameterValuesArticle.html" title="Using XML Parameter Values">Using XML Parameter
|
18
|
+
Values</a>. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> You can only use an external question as the question of a HIT. You cannot use an external
|
19
|
+
question with a Qualification test. </p></td></tr></table></div><p> The <em class="parameter"><code>ExternalQuestion</code></em> data structure is used as a parameter value for the
|
20
|
+
following operations: </p><div class="itemizedlist"><ul type="disc"><li><p>
|
21
|
+
<code class="function">CreateHIT</code>
|
22
|
+
</p></li></ul></div><p> The <em class="parameter"><code>ExternalQuestion</code></em> data structure is a value in a <a class="link" href="ApiReference_HITDataStructureArticle.html" title="HIT">HIT data structure</a>. </p><p> All elements in a <em class="parameter"><code>ExternalQuestion</code></em> belong to a namespace whose name is
|
23
|
+
identical to the URL of the <em class="parameter"><code>ExternalQuestion</code></em> schema document for the
|
24
|
+
version of the API you are using. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20266">The ExternalQuestion Data Structure</h2></div></div></div><p> The <em class="parameter"><code>ExternalQuestion</code></em> data structure has a root element of
|
25
|
+
<strong class="userinput"><code>ExternalQuestion</code></strong>. </p><p> The <strong class="userinput"><code>ExternalQuestion</code></strong> element contains the following elements: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
|
26
|
+
<p class="simpara">
|
27
|
+
<em class="parameter"><code>ExternalURL</code></em>
|
28
|
+
</p>
|
29
|
+
</td><td>
|
30
|
+
<p class="simpara"> The URL of your web form, to be displayed in a frame in the Worker's web
|
31
|
+
browser. </p>
|
32
|
+
<p class="simpara">Type: URL</p>
|
33
|
+
<p class="simpara">Default: None</p>
|
34
|
+
<p class="simpara"> Amazon Mechanical Turk appends two parameters to this URL:
|
35
|
+
<code class="code">hitId</code> and <code class="code">assignmentId</code>. See below for more
|
36
|
+
information. </p>
|
37
|
+
</td><td>
|
38
|
+
<p class="simpara">Yes</p>
|
39
|
+
</td></tr><tr><td>
|
40
|
+
<p class="simpara">
|
41
|
+
<em class="parameter"><code>FrameHeight</code></em>
|
42
|
+
</p>
|
43
|
+
</td><td>
|
44
|
+
<p class="simpara">The height of the frame, in pixels</p>
|
45
|
+
<p class="simpara">Type: Integer</p>
|
46
|
+
<p class="simpara">Default: None</p>
|
47
|
+
</td><td>
|
48
|
+
<p class="simpara">Yes</p>
|
49
|
+
</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20355">Example</h2></div></div></div><p> The following is an example of a complete <em class="parameter"><code>ExternalQuestion</code></em> data
|
50
|
+
structure. Remember that to pass this structure in as the value of a parameter to an operation,
|
51
|
+
XML characters must be escaped as character entities. (See <a class="link" href="ApiReference_XMLParameterValuesArticle.html" title="Using XML Parameter Values">Using XML Parameter Values</a> for more information.) </p><pre class="programlisting"><ExternalQuestion xmlns="<em class="replaceable"><code>[the ExternalQuestion schema URL]</code></em>">
|
52
|
+
<ExternalURL>http://tictactoe.amazon.com/gamesurvey.cgi?gameid=01523</ExternalURL>
|
53
|
+
<FrameHeight>400</FrameHeight>
|
54
|
+
</ExternalQuestion></pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20370">The External Form</h2></div></div></div><p> When a Worker attempts to complete a HIT with an external question, the external web site is
|
55
|
+
loaded into a frame in the middle of the screen. The web page at that URL should display a form
|
56
|
+
for the Worker to fill out, and all the information the Worker will need to complete the HIT. </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e20375">The Frame's URL and Parameters</h3></div></div></div><p> The URL used for the frame is the <em class="parameter"><code>ExternalURL</code></em> of the question with
|
57
|
+
two parameters appended: the <code class="code">hitId</code> and the <code class="code">assignmentId</code>. These
|
58
|
+
parameters are appended CGI-style: The full URL has a question mark (<code class="code">?</code>) before
|
59
|
+
the first parameter, and an ampersand (<code class="code">&</code>) between each parameter, with
|
60
|
+
each parameter consisting of a name, an equal sign (<code class="code">=</code>), and a value. Other
|
61
|
+
parameters already present in this style in <em class="parameter"><code>ExternalURL</code></em> are preserved,
|
62
|
+
so the final URL will only have one question mark, and all parameters will be separated by
|
63
|
+
ampersands. </p><p> For example, consider an <em class="parameter"><code>ExternalURL</code></em> of: </p><pre class="programlisting">http://tictactoe.amazon.com/gamesurvey.cgi?gameid=01523</pre><p> With this <em class="parameter"><code>ExternalURL</code></em>, the full URL used for the page in the frame
|
64
|
+
could be as follows: </p><pre class="programlisting">http://tictactoe.amazon.com/gamesurvey.cgi?gameid=01523
|
65
|
+
&hitId=123RVWYBAZW00EXAMPLE
|
66
|
+
&assignmentId=123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e20415">Preview Mode</h3></div></div></div><p> Your external question will be displayed when a Worker previews the HIT on the Amazon
|
67
|
+
Amazon Mechanical Turk web site, before the Worker has clicked the "Accept HIT" button. When the HIT
|
68
|
+
is being previewed, the URL will have a special value for the <code class="code">assignmentId</code>:
|
69
|
+
<code class="code">ASSIGNMENT_ID_NOT_AVAILABLE</code>
|
70
|
+
</p><p> When a Worker previews a HIT, your web page should show her everything she will need to do
|
71
|
+
to complete the HIT, so she can decide whether or not to accept it. The easiest way to do this
|
72
|
+
is to simply display the form as it would appear when the HIT is accepted. However, you may
|
73
|
+
want to take precautions to prevent a Worker from accidentally filling out or submitting your
|
74
|
+
form prior to accepting the HIT. </p><p> You can use JavaScript or server-side logic to check the <code class="code">assignmentId</code>
|
75
|
+
parameter, and change the display the form if the HIT is being previewed
|
76
|
+
(<code class="code">assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE</code>). </p><p> If a Worker submits your form before accepting the HIT, and your form attempts to post the
|
77
|
+
data back to Amazon Mechanical Turk, Amazon Mechanical Turk will display an error message to the Worker, and
|
78
|
+
the results will not be accepted. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e20438">The Form Action</h3></div></div></div><p> The form on the external web site must post the result data back to Amazon Mechanical Turk
|
79
|
+
using the following URL: </p><pre class="programlisting">http://www.mturk.com/mturk/externalSubmit</pre><p> The form must include the <code class="code">assignmentId</code> field that was appended to the URL used
|
80
|
+
to access your form. It should be submitted along with the other form fields submitted by your
|
81
|
+
form, with a name of <code class="code">assignmentId</code> and the same value as was passed to the form.
|
82
|
+
Be sure to spell the field name as it appears here, with the same letters uppercase and
|
83
|
+
lowercase. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> The field names <code class="code">assignmentId</code> and <code class="code">hitId</code> are reserved for
|
84
|
+
special purposes. Your form only needs to submit the <code class="code">assignmentId</code> field. Any
|
85
|
+
data submitted with a field name of "<code class="code">hitId</code>" will be ignored, and will not
|
86
|
+
appear in the results data for the HIT. </p></td></tr></table></div><p> The form can submit data to that URL using either the "GET" or "POST" methods. The data the
|
87
|
+
form submits should be name-value pairs in the CGI-style: </p><div class="itemizedlist"><ul type="disc"><li><p> Each field appears as the name, an equal sign, and the value. For example:
|
88
|
+
<code class="code">favoriteColor=blue</code>
|
89
|
+
</p></li><li><p> Data that appears in the posted URL (using the "GET" method or the form's action
|
90
|
+
URL) is preceded by a question mark (<code class="code">?</code>), and is delimited by ampersands
|
91
|
+
(<code class="code">&</code>). For example: </p><pre class="programlisting">http://www.mturk.com/mturk/externalSubmit?favoriteColor=blue&favoriteNumber=7&...</pre></li><li><p> Data that appears in the HTTP message body (using the "POST" method) has one data
|
92
|
+
pair per line. For example: </p><pre class="programlisting">favoriteColor=blue
|
93
|
+
favoriteNumber=7
|
94
|
+
...</pre></li></ul></div><p> The easiest way to post the data in the CGI-style is to use an HTML form on the web page,
|
95
|
+
with the <code class="code">externalSubmit</code> URL as the "action," and either "GET" or "POST" as the
|
96
|
+
"method." </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20498">The Answer Data</h2></div></div></div><p> When the Worker submits your form, the form sends the field data to Amazon Mechanical Turk using the
|
97
|
+
<code class="code">externalSubmit</code> URL, and Amazon Mechanical Turk records the field data as the results of
|
98
|
+
the HIT. </p><p> When you retrieve the results using <a class="link" href="ApiReference_GetAssignmentsForHITOperation.html" title="GetAssignmentsForHIT">the <code class="function">GetAssignmentsForHIT</code> operation</a>, the field data submitted by
|
99
|
+
your form will appear in the <em class="parameter"><code>Answer</code></em> of the <a class="link" href="ApiReference_AssignmentDataStructureArticle.html" title="Assignment">Assignment</a> as if each field were
|
100
|
+
a free-text answer. The <em class="parameter"><code>QuestionIdentifier</code></em> element of the answer will be
|
101
|
+
the name of the field, and the <em class="parameter"><code>FreeText</code></em> element will contain the value. </p><p> See the <a class="link" href="ApiReference_QuestionFormAnswersDataStructureArticle.html" title="QuestionFormAnswers">QuestionFormAnswers data format</a> for more information about the format of answer data.
|
102
|
+
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e20531">Guidelines For Using External Questions</h2></div></div></div><p> External questions give your application a great deal of power over how Workers submit results
|
103
|
+
for your HITs. To ensure you get good results for your HITs, you should make sure your web server
|
104
|
+
and web pages can provide your Workers with a quality experience. </p><p> Because external questions depend on your web server for rendering the question form, both
|
105
|
+
while Workers are previewing HITs and while Workers are completing HITs, your server will need to
|
106
|
+
be engineered for high availability. The Amazon Mechanical Turk web site gets heavy traffic, so
|
107
|
+
your web server will need to be able to respond quickly and correctly when receiving many requests
|
108
|
+
in a short period of time. </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>
|
109
|
+
<a class="ulink" href="http://aws.amazon.com/s3" target="_blank">Amazon S3</a> offers high availability hosting of
|
110
|
+
data, accessible via public URLs. You can host your external questions as web pages in Amazon
|
111
|
+
S3, and not have to run your own high availability web server. </p></td></tr></table></div><p> Your web site can do many things inside the frame, but eventually it must cause the Worker's
|
112
|
+
browser to load the "externalSubmit" URL in the frame with the results in POST data. The easiest
|
113
|
+
way to do this is with an HTML form whose fields contain the HIT results, with a submit button
|
114
|
+
that the Worker will click. If an external HIT prevents the Worker from submitting results back to
|
115
|
+
Amazon Mechanical Turk using the "externalSubmit" mechanism, the Worker may not be able to claim rewards
|
116
|
+
or continue doing work without restarting their session. Amazon Mechanical Turk reserves the right
|
117
|
+
to remove any external HITs that are not functioning properly. </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p> Remember that a <a class="link" href="ApiReference_QuestionFormAnswersDataStructureArticle.html" title="QuestionFormAnswers">QuestionForm</a> can contain Java applets, Flash applications, and blocks of XHTML
|
118
|
+
formatted content. If the capabilities of a QuestionForm meet the needs of your HIT, using a
|
119
|
+
QuestionForm instead of an ExternalQuestion is the best way to ensure that your HIT will work
|
120
|
+
correctly. </p></td></tr></table></div><p> Finally, please remember that external questions must meet the Amazon Mechanical Turk
|
121
|
+
Participation Agreement, and otherwise meet Amazon Mechanical Turk's standards for appropriate content.
|
122
|
+
Specifically, the Participation Agreement expressly prohibits the use of Amazon Mechanical Turk
|
123
|
+
for advertising or solicitation. If your web site typically displays advertising to visitors,
|
124
|
+
please make sure those advertisements do not appear in your external questions. Amazon Mechanical
|
125
|
+
Turk reserves the right to remove HITs with inappropriate content. </p></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_AnswerKeyDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_ExternalQuestionArticle">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_NotificationReceptorAPIArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top"> </td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top"> </td></tr></table></div></body></html>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
|
2
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
+
<title>ForceExpireHIT</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_OperationsArticle.html" title="Chapter 5. Operations"><link rel="prev" href="ApiReference_ExtendHITOperation.html" title="ExtendHIT"><link rel="next" href="ApiReference_GetAccountBalanceOperation.html" title="GetAccountBalance"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
|
4
|
+
urchinTracker();
|
5
|
+
</script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
|
6
|
+
</script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ExtendHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_ForceExpireHITOperation">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetAccountBalanceOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> » <a href="ApiReference_OperationsArticle.html">Operations</a> » <strong>ForceExpireHIT</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">ForceExpireHIT</h1></div></div></div><a class="indexterm" name="d0e4359"></a><a class="indexterm" name="d0e4362"></a><a class="indexterm" name="d0e4367"></a><a class="indexterm" name="d0e4372"></a><a class="indexterm" name="d0e4377"></a><a class="indexterm" name="d0e4382"></a><a class="indexterm" name="d0e4385"></a><a class="indexterm" name="d0e4388"></a><a class="indexterm" name="d0e4391"></a><a class="indexterm" name="d0e4396"></a><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4401">Description</h2></div></div></div><p> The <code class="function">ForceExpireHIT</code> operation causes a HIT to expire immediately,
|
7
|
+
as if the <em class="parameter"><code>LifetimeInSeconds</code></em> parameter of the HIT had elapsed. </p><p> The effect is identical to the HIT expiring on its own; the HIT no longer appears on
|
8
|
+
the Amazon Amazon Mechanical Turk web site, and no new Workers are allowed to accept the
|
9
|
+
HIT. Workers who have accepted the HIT prior to expiration are allowed to complete it or
|
10
|
+
return it, or allow the assignment duration to elapse (abandon the HIT). Once all
|
11
|
+
remaining assignments have been submitted, the expired HIT becomes <span class="guilabel">Reviewable</span>, and will be returned by a call to the <a class="link" href="ApiReference_GetReviewableHITsOperation.html" title="GetReviewableHITs">GetReviewableHITs</a>
|
12
|
+
operation. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> Unlike the <a class="link" href="ApiReference_DisableHITOperation.html" title="DisableHIT">DisableHIT</a>
|
13
|
+
operation, the <code class="function">ForceExpireHIT</code> operation does not have any
|
14
|
+
effect on assignments. If assignments have been submitted for the HIT, your
|
15
|
+
application still needs to approve or reject them before disposing of the HIT.
|
16
|
+
</p></td></tr></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4429">Request Parameters</h2></div></div></div><p> The <code class="function">ForceExpireHIT</code> operation accepts parameters common to all
|
17
|
+
operations. Some common parameters are required. See <a class="link" href="ApiReference_CommonParametersArticle.html" title="Chapter 4. Common Parameters">Common Parameters</a> for more
|
18
|
+
information. </p><p> The following parameters are specific to the <code class="function">ForceExpireHIT</code>
|
19
|
+
operation: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>
|
20
|
+
<p class="simpara">
|
21
|
+
<em class="parameter"><code>Operation</code></em>
|
22
|
+
</p>
|
23
|
+
</td><td>
|
24
|
+
<p class="simpara">The name of the operation</p>
|
25
|
+
<p class="simpara">Type: String</p>
|
26
|
+
<p class="simpara">Valid Values: ForceExpireHIT</p>
|
27
|
+
<p class="simpara">Default: None</p>
|
28
|
+
</td><td>
|
29
|
+
<p class="simpara">Yes</p>
|
30
|
+
</td></tr><tr><td>
|
31
|
+
<p class="simpara">
|
32
|
+
<em class="parameter"><code>HITId</code></em>
|
33
|
+
</p>
|
34
|
+
</td><td>
|
35
|
+
<p class="simpara">The ID of the HIT, as returned by the <code class="function">CreateHIT</code> operation.</p>
|
36
|
+
<p class="simpara">Type: String</p>
|
37
|
+
<p class="simpara">Default: None</p>
|
38
|
+
</td><td>
|
39
|
+
<p class="simpara">Yes</p>
|
40
|
+
</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4515">Response Elements</h2></div></div></div><p> A successful request for the <code class="function">ForceExpireHIT</code> operation returns
|
41
|
+
with no errors. The response includes the elements described in the following table. The
|
42
|
+
operation returns no other data. </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>
|
43
|
+
<p class="simpara">
|
44
|
+
<em class="parameter"><code>ForceExpireHITResult</code></em>
|
45
|
+
</p>
|
46
|
+
</td><td>
|
47
|
+
<p class="simpara"> Contains a <em class="parameter"><code>Request</code></em> element if the
|
48
|
+
<strong class="userinput"><code>Request</code></strong>
|
49
|
+
<em class="parameter"><code>ResponseGroup</code></em> is specified. </p>
|
50
|
+
</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e4557">Examples</h2></div></div></div><p>The following example shows how to use the <code class="function">ForceExpireHIT</code>
|
51
|
+
operation.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e4565">Sample Request</h3></div></div></div><p>The following example causes the specified HIT to expire.</p><pre class="programlisting">http://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
|
52
|
+
&AWSAccessKeyId=<em class="replaceable"><code>[the Requester's Access Key ID]</code></em>
|
53
|
+
&Operation=ForceExpireHIT
|
54
|
+
&Signature=<em class="replaceable"><code>[signature for this request]</code></em>
|
55
|
+
&Timestamp=<em class="replaceable"><code>[your system's local time]</code></em>
|
56
|
+
&HITId=123RVWYBAZW00EXAMPLE
|
57
|
+
</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title" id="d0e4581">Sample Response</h3></div></div></div><p>The following is an example response.</p><pre class="programlisting"><ForceExpireHITResult>
|
58
|
+
<Request>
|
59
|
+
<IsValid>True</IsValid>
|
60
|
+
</Request>
|
61
|
+
</ForceExpireHITResult></pre></div></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_ExtendHITOperation.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_ForceExpireHITOperation">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_GetAccountBalanceOperation.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top"> </td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top"> </td></tr></table></div></body></html>
|
@@ -0,0 +1,289 @@
|
|
1
|
+
<html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head>
|
2
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
3
|
+
<title>Formatted Content: XHTML</title><link rel="stylesheet" href="aws-docs-IE.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="#top" title="Amazon Mechanical Turk"><link rel="up" href="ApiReference_QuestionAnswerDataArticle.html" title="Chapter 7. Question and Answer Data"><link rel="prev" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm"><link rel="next" href="ApiReference_QuestionFormAnswersDataStructureArticle.html" title="QuestionFormAnswers"><!--[if !IE]>--><link rel="stylesheet" href="aws-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><!--<![endif]--><meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><script src="/urchin.js" type="text/javascript"></script><script type="text/javascript">
|
4
|
+
urchinTracker();
|
5
|
+
</script><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript" src="frameset.js"> //
|
6
|
+
</script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_QuestionFormDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_FormattedContentXHTMLArticle">Documentation Feedback</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_QuestionFormAnswersDataStructureArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><div class="breadcrumb"><a href="Welcome.html">Welcome</a><a href=""></a> » <a href="ApiReference_QuestionAnswerDataArticle.html">Question and Answer Data</a> » <strong>Formatted Content: XHTML</strong></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h1 class="topictitle">Formatted Content: XHTML</h1></div></div></div><a class="indexterm" name="d0e18991"></a><a class="indexterm" name="d0e18994"></a><a class="indexterm" name="d0e18997"></a><a class="indexterm" name="d0e19002"></a><a class="indexterm" name="d0e19007"></a><a class="indexterm" name="d0e19010"></a><a class="indexterm" name="d0e19013"></a><div class="highlights"><p><strong>Topics</strong></p><ul><li><a href="ApiReference_FormattedContentXHTMLArticle.html#d0e19050">Using Formatted Content</a></li><li><a href="ApiReference_FormattedContentXHTMLArticle.html#d0e19121">Supported XHTML Tags</a></li><li><a href="ApiReference_FormattedContentXHTMLArticle.html#d0e19722">How XHTML Formatted Content Is Validated</a></li></ul></div><p> When you create a HIT or a Qualification test, you can include various kinds of content to be
|
7
|
+
displayed to the Worker on the Amazon Mechanical Turk web site, such as text (titles, paragraphs,
|
8
|
+
lists), media (pictures, audio, video) and browser applets (Java or Flash). </p><p> You can also include blocks of formatted content. Formatted content lets you include XHTML tags
|
9
|
+
directly in your instructions and your questions for detailed control over the appearance and layout
|
10
|
+
of your data. </p><p> You include a block of formatted content by specifying a <em class="parameter"><code>FormattedContent</code></em>
|
11
|
+
element in the appropriate place in your <a class="link" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm">QuestionForm data structure</a>. You can specify any number of
|
12
|
+
<em class="parameter"><code>FormattedContent</code></em> elements in content, and you can mix them with other kinds of
|
13
|
+
content. </p><p> The following example uses other content types (<em class="parameter"><code>Title</code></em>,
|
14
|
+
<em class="parameter"><code>Text</code></em>) along with <em class="parameter"><code>FormattedContent</code></em> to include a table in
|
15
|
+
a HIT: </p><pre class="programlisting"><Text>
|
16
|
+
This HIT asks you some questions about a game of Tic-Tac-Toe
|
17
|
+
currently in progress. Your answers will help decide the next move.
|
18
|
+
</Text>
|
19
|
+
<Title>The Current Board</Title>
|
20
|
+
<Text>
|
21
|
+
The following table shows the board as it currently stands.
|
22
|
+
</Text>
|
23
|
+
<FormattedContent><![CDATA[
|
24
|
+
<table border="1">
|
25
|
+
<tr>
|
26
|
+
<td></td>
|
27
|
+
<td align="center">1</td>
|
28
|
+
<td align="center">2</td>
|
29
|
+
<td align="center">3</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td align="right">A</td>
|
33
|
+
<td align="center"><b>X</b></td>
|
34
|
+
<td align="center">&nbsp;</td>
|
35
|
+
<td align="center"><b>O</b></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td align="right">B</td>
|
39
|
+
<td align="center">&nbsp;</td>
|
40
|
+
<td align="center"><b>O</b></td>
|
41
|
+
<td align="center">&nbsp;</td>
|
42
|
+
</tr>
|
43
|
+
<tr>
|
44
|
+
<td align="right">C</td>
|
45
|
+
<td align="center">&nbsp;</td>
|
46
|
+
<td align="center">&nbsp;</td>
|
47
|
+
<td align="center"><b>X</b></td>
|
48
|
+
</tr>
|
49
|
+
<tr>
|
50
|
+
<td align="center" colspan="4">It is <b>X</b>'s turn.</td>
|
51
|
+
</tr>
|
52
|
+
</table>
|
53
|
+
]]></FormattedContent></pre><p> For more information about describing the contents of a HIT or Qualification test, see <a class="link" href="ApiReference_QuestionFormDataStructureArticle.html" title="QuestionForm">the QuestionForm data structure</a>. </p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e19050">Using Formatted Content</h2></div></div></div><p> As you can see in the example above, formatted content is specified in an XML CDATA block,
|
54
|
+
inside a <em class="parameter"><code>FormattedContent</code></em> element. The CDATA block contains the text and
|
55
|
+
XHTML markup to display in the Worker's browser. </p><p> Only a subset of the XHTML standard is supported. For a complete list of supported XHTML
|
56
|
+
elements and attributes, see the table below. In particular, JavaScript, element IDs,
|
57
|
+
<code class="code">class</code> and <code class="code">style</code> attributes, and <code class="code"><div></code> and
|
58
|
+
<code class="code"><span></code> elements are not allowed. </p><p> XML comments (<code class="code"><!-- ... --></code>) are not allowed in formatted content
|
59
|
+
blocks. </p><p> Every XHTML tag in the CDATA block must be closed before the end of the block. For example, if
|
60
|
+
you start an XHTML paragraph with a <code class="code"><p></code> tag, you must end it with a
|
61
|
+
<code class="code"></p></code> tag within the same <em class="parameter"><code>FormattedContent</code></em>
|
62
|
+
block. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p> The tag closure requirement means you cannot open an XHTML tag in one
|
63
|
+
<em class="parameter"><code>FormattedContent</code></em> block and close it in another. There is no way to
|
64
|
+
"wrap" other kinds of question form content in XHTML. <em class="parameter"><code>FormattedContent</code></em>
|
65
|
+
blocks must be self-contained. </p></td></tr></table></div><p> XHTML tags must be nested properly. When tags are used inside other tags, the inner-most tags
|
66
|
+
must be closed before outer tags are closed. For example, to specify that some text should appear
|
67
|
+
in bold italics, you would use the <code class="code"><b></code> and
|
68
|
+
<code class="code"><i></code> tags as follows: </p><pre class="programlisting"><b><i>This text appears bold italic.</i></b></pre><p> But the following would not be valid, because the closing <code class="code"></b></code> tag
|
69
|
+
appears before the closing <code class="code"></i></code> tag: </p><pre class="programlisting"><b><i>These tags don't nest properly!</b></i></pre><p> Finally, formatted content must meet other requirements to validate against the XHTML schema.
|
70
|
+
For instance, tag names and attribute names must be all lowercase letters, and attribute values
|
71
|
+
must be surrounded by quotes. </p><p> For details on how Amazon Mechanical Turk validates XHTML formatted content blocks, see "How
|
72
|
+
XHTML Formatted Content Is Validated," below. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e19121">Supported XHTML Tags</h2></div></div></div><p>
|
73
|
+
<em class="parameter"><code>FormattedContent</code></em> supports a limited subset of <a class="ulink" href="http://www.w3.org/TR/xhtml1/" target="_blank">the XHTML 1.0 ("transitional") standard</a>. The
|
74
|
+
complete list of supported tags and attributes appears in the table below. Notable differences
|
75
|
+
with the standard include: </p><div class="itemizedlist"><ul type="disc"><li><p> JavaScript is not allowed. The <code class="code"><script></code> tag is not
|
76
|
+
supported, and anchors (<code class="code"><a></code>) and images
|
77
|
+
(<code class="code"><img></code>) cannot use <code class="code">javascript:</code> targets in
|
78
|
+
URLs. </p></li><li><p> CSS is not allowed. The <code class="code"><style></code> tag is not supported, and
|
79
|
+
the <code class="code">class</code> and <code class="code">style</code> attributes are not supported. The
|
80
|
+
<code class="code">id</code> attribute is also not supported. </p></li><li><p> XML comments (<code class="code"><!-- ... --></code>) are not supported. </p></li><li><p> URL methods in anchor targets and image locations are limited to the following:
|
81
|
+
<code class="code">http:// https:// ftp:// news:// nntp:// mailto:// gopher:// telnet://</code>
|
82
|
+
</p></li></ul></div><p> Other things to note with regards to supported tags and attributes: </p><div class="itemizedlist"><ul type="disc"><li><p> In addition to the attributes listed, the <code class="code">title</code> attribute is supported for
|
83
|
+
all tags, and the <code class="code">dir</code> and <code class="code">lang</code> attributes are supported for all
|
84
|
+
tags except <code class="code"><br></code>. </p></li><li><p> The <code class="code">alt</code> attribute is required for <code class="code"><area></code> and
|
85
|
+
<code class="code"><img></code> tags. </p></li><li><p>
|
86
|
+
<code class="code"><img></code> tags also require a <code class="code">src</code> attribute. </p></li><li><p>
|
87
|
+
<code class="code"><map></code> tags require a <code class="code">name</code> attribute. </p></li></ul></div><p> The following table lists the supported tags and attributes: </p><div class="informaltable"><table cellspacing="0" border="0"><colgroup><col><col></colgroup><thead><tr><th>Tag</th><th>Attributes</th></tr></thead><tbody><tr><td>
|
88
|
+
<code class="code">a</code>
|
89
|
+
</td><td>
|
90
|
+
<code class="code">accesskey charset coords href hreflang name rel rev shape tabindex target
|
91
|
+
type</code>
|
92
|
+
</td></tr><tr><td>
|
93
|
+
<code class="code">area</code>
|
94
|
+
</td><td>
|
95
|
+
<code class="code">alt coords href nohref shape target</code>
|
96
|
+
</td></tr><tr><td>
|
97
|
+
<code class="code">b</code>
|
98
|
+
</td><td>
|
99
|
+
<code class="code"></code>
|
100
|
+
</td></tr><tr><td>
|
101
|
+
<code class="code">big</code>
|
102
|
+
</td><td>
|
103
|
+
<code class="code"></code>
|
104
|
+
</td></tr><tr><td>
|
105
|
+
<code class="code">blockquote</code>
|
106
|
+
</td><td>
|
107
|
+
<code class="code">cite</code>
|
108
|
+
</td></tr><tr><td>
|
109
|
+
<code class="code">br</code>
|
110
|
+
</td><td>
|
111
|
+
<code class="code"></code>
|
112
|
+
</td></tr><tr><td>
|
113
|
+
<code class="code">center</code>
|
114
|
+
</td><td>
|
115
|
+
<code class="code"></code>
|
116
|
+
</td></tr><tr><td>
|
117
|
+
<code class="code">cite</code>
|
118
|
+
</td><td>
|
119
|
+
<code class="code"></code>
|
120
|
+
</td></tr><tr><td>
|
121
|
+
<code class="code">code</code>
|
122
|
+
</td><td>
|
123
|
+
<code class="code"></code>
|
124
|
+
</td></tr><tr><td>
|
125
|
+
<code class="code">col</code>
|
126
|
+
</td><td>
|
127
|
+
<code class="code">align char charoff span valign width</code>
|
128
|
+
</td></tr><tr><td>
|
129
|
+
<code class="code">colgroup</code>
|
130
|
+
</td><td>
|
131
|
+
<code class="code">align char charoff span valign width</code>
|
132
|
+
</td></tr><tr><td>
|
133
|
+
<code class="code">dd</code>
|
134
|
+
</td><td>
|
135
|
+
<code class="code"></code>
|
136
|
+
</td></tr><tr><td>
|
137
|
+
<code class="code">del</code>
|
138
|
+
</td><td>
|
139
|
+
<code class="code">cite datetime</code>
|
140
|
+
</td></tr><tr><td>
|
141
|
+
<code class="code">dl</code>
|
142
|
+
</td><td>
|
143
|
+
<code class="code"></code>
|
144
|
+
</td></tr><tr><td>
|
145
|
+
<code class="code">em</code>
|
146
|
+
</td><td>
|
147
|
+
<code class="code"></code>
|
148
|
+
</td></tr><tr><td>
|
149
|
+
<code class="code">font</code>
|
150
|
+
</td><td>
|
151
|
+
<code class="code">color face size</code>
|
152
|
+
</td></tr><tr><td>
|
153
|
+
<code class="code">h1</code>
|
154
|
+
</td><td>
|
155
|
+
<code class="code">align</code>
|
156
|
+
</td></tr><tr><td>
|
157
|
+
<code class="code">h2</code>
|
158
|
+
</td><td>
|
159
|
+
<code class="code">align</code>
|
160
|
+
</td></tr><tr><td>
|
161
|
+
<code class="code">h3</code>
|
162
|
+
</td><td>
|
163
|
+
<code class="code">align</code>
|
164
|
+
</td></tr><tr><td>
|
165
|
+
<code class="code">h4</code>
|
166
|
+
</td><td>
|
167
|
+
<code class="code">align</code>
|
168
|
+
</td></tr><tr><td>
|
169
|
+
<code class="code">h5</code>
|
170
|
+
</td><td>
|
171
|
+
<code class="code">align</code>
|
172
|
+
</td></tr><tr><td>
|
173
|
+
<code class="code">h6</code>
|
174
|
+
</td><td>
|
175
|
+
<code class="code">align</code>
|
176
|
+
</td></tr><tr><td>
|
177
|
+
<code class="code">hr</code>
|
178
|
+
</td><td>
|
179
|
+
<code class="code">align noshade size width</code>
|
180
|
+
</td></tr><tr><td>
|
181
|
+
<code class="code">i</code>
|
182
|
+
</td><td> </td></tr><tr><td>
|
183
|
+
<code class="code">img</code>
|
184
|
+
</td><td>
|
185
|
+
<code class="code">align alt border height hspace ismap longdesc src usemap vspace width</code>
|
186
|
+
</td></tr><tr><td>
|
187
|
+
<code class="code">ins</code>
|
188
|
+
</td><td>
|
189
|
+
<code class="code">cite datetime</code>
|
190
|
+
</td></tr><tr><td>
|
191
|
+
<code class="code">li</code>
|
192
|
+
</td><td>
|
193
|
+
<code class="code">type value</code>
|
194
|
+
</td></tr><tr><td>
|
195
|
+
<code class="code">map</code>
|
196
|
+
</td><td>
|
197
|
+
<code class="code">name</code>
|
198
|
+
</td></tr><tr><td>
|
199
|
+
<code class="code">ol</code>
|
200
|
+
</td><td>
|
201
|
+
<code class="code">compact start type</code>
|
202
|
+
</td></tr><tr><td>
|
203
|
+
<code class="code">p</code>
|
204
|
+
</td><td>
|
205
|
+
<code class="code">align</code>
|
206
|
+
</td></tr><tr><td>
|
207
|
+
<code class="code">pre</code>
|
208
|
+
</td><td>
|
209
|
+
<code class="code">width</code>
|
210
|
+
</td></tr><tr><td>
|
211
|
+
<code class="code">q</code>
|
212
|
+
</td><td>
|
213
|
+
<code class="code">cite</code>
|
214
|
+
</td></tr><tr><td>
|
215
|
+
<p class="simpara">
|
216
|
+
<code class="code">small</code>
|
217
|
+
</p>
|
218
|
+
</td><td>
|
219
|
+
<p class="simpara">
|
220
|
+
<code class="code"></code>
|
221
|
+
</p>
|
222
|
+
</td></tr><tr><td>
|
223
|
+
<code class="code">strong</code>
|
224
|
+
</td><td>
|
225
|
+
<code class="code"> </code>
|
226
|
+
</td></tr><tr><td>
|
227
|
+
<code class="code">sub</code>
|
228
|
+
</td><td>
|
229
|
+
<code class="code"> </code>
|
230
|
+
</td></tr><tr><td>
|
231
|
+
<code class="code">sup</code>
|
232
|
+
</td><td>
|
233
|
+
<code class="code"> </code>
|
234
|
+
</td></tr><tr><td>
|
235
|
+
<code class="code">table</code>
|
236
|
+
</td><td>
|
237
|
+
<code class="code">align bgcolor border cellpadding cellspacing frame rules summary
|
238
|
+
width</code>
|
239
|
+
</td></tr><tr><td>
|
240
|
+
<code class="code">tbody</code>
|
241
|
+
</td><td>
|
242
|
+
<code class="code">align char charoff valign</code>
|
243
|
+
</td></tr><tr><td>
|
244
|
+
<code class="code">td</code>
|
245
|
+
</td><td>
|
246
|
+
<code class="code">abbr align axis bgcolor char charoff colspan headers height nowrap rowspan
|
247
|
+
scope valign width</code>
|
248
|
+
</td></tr><tr><td>
|
249
|
+
<code class="code">tfoot</code>
|
250
|
+
</td><td>
|
251
|
+
<code class="code">align char charoff valign</code>
|
252
|
+
</td></tr><tr><td>
|
253
|
+
<code class="code">th</code>
|
254
|
+
</td><td>
|
255
|
+
<code class="code">abbr align axis bgcolor char charoff colspan headers height nowrap rowspan
|
256
|
+
scope valign width</code>
|
257
|
+
</td></tr><tr><td>
|
258
|
+
<code class="code">thead</code>
|
259
|
+
</td><td>
|
260
|
+
<code class="code">align char charoff valign</code>
|
261
|
+
</td></tr><tr><td>
|
262
|
+
<code class="code">tr</code>
|
263
|
+
</td><td>
|
264
|
+
<code class="code">align bgcolor char charoff valign</code>
|
265
|
+
</td></tr><tr><td>
|
266
|
+
<code class="code">u</code>
|
267
|
+
</td><td>
|
268
|
+
<code class="code"></code>
|
269
|
+
</td></tr><tr><td>
|
270
|
+
<code class="code">ul</code>
|
271
|
+
</td><td>
|
272
|
+
<code class="code">compact type</code>
|
273
|
+
</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="d0e19722">How XHTML Formatted Content Is Validated</h2></div></div></div><p> When you create a HIT or a Qualification test whose content uses
|
274
|
+
<em class="parameter"><code>FormattedContent</code></em>, Amazon Mechanical Turk attempts to validate the formatted
|
275
|
+
content blocks against a schema. If the formatted content does not validate against the schema,
|
276
|
+
the operation call will fail and return an error. </p><p> To validate the formatted content, Amazon Mechanical Turk takes the contents of the
|
277
|
+
<em class="parameter"><code>FormattedContent</code></em> element (the text and markup inside the CDATA), then
|
278
|
+
constructs an XML document with an appropriate XML header,
|
279
|
+
<code class="code"><FormattedContent></code> as the root element, and the text and markup as the
|
280
|
+
element's contents (without the CDATA). This document is then validated against a schema. </p><p> For example, consider the following <em class="parameter"><code>FormattedContent</code></em> block: </p><pre class="programlisting"> ...
|
281
|
+
<FormattedContent><![CDATA[
|
282
|
+
I absolutely <i>love</i> chocolate ice cream!
|
283
|
+
]]></FormattedContent>
|
284
|
+
...</pre><p> To validate this block, Amazon Mechanical Turk produces the following XML document: </p><pre class="programlisting"><?xml version="1.0"?>
|
285
|
+
<FormattedContent xmlns="http://www.w3.org/1999/xhtml">
|
286
|
+
I absolutely <i>love</i> chocolate ice cream!
|
287
|
+
</FormattedContent></pre><p> The schema used for validation is called <code class="code">FormattedContentXHTMLSubset.xsd</code>. For
|
288
|
+
information on how to download this schema, see <a class="link" href="ApiReference_WsdlLocationArticle.html" title="Chapter 3. WSDL and Schema Locations">WSDL and Schema Locations</a>. </p><p> You do not need to specify the namespace of the XHTML tags in your formatted content. This is
|
289
|
+
assumed automatically during validation. </p></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" cellspacing="0" cellpadding="2"><tr><td width="30%" align="left"><a accesskey="p" href="ApiReference_QuestionFormDataStructureArticle.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="40%" align="center"><a href="http://survey.amazonwebservices.com/survey/s?s=559&opdata_page=Mturk_API_2008-08-02_ApiReference_FormattedContentXHTMLArticle">Documentation Feedback</a><br><a href="copyrightinfo.html">Copyright Information</a></td><td width="30%" align="right"> <a accesskey="n" href="ApiReference_QuestionFormAnswersDataStructureArticle.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="30%" align="left" valign="top"> </td><td width="40%" align="center"><a accesskey="h" href="#top"><img src="images/home.gif" alt="Home"></a></td><td width="30%" align="right" valign="top"> </td></tr></table></div></body></html>
|