我正在尝试使用Amazon Mechanical Turk命令行工具将外部图片网址添加到资格认证测试中。这需要编辑名为" qualification.question"的XML文件。包括图像URL。
如果我想将网址http://upload.wikimedia.org/wikipedia/commons/6/6f/Earth_Eastern_Hemisphere.jpg插入" qualified.question"的代码中。在文字下方"这是什么图片?",我该怎么做?
<Question>
<QuestionIdentifier>question1</QuestionIdentifier>
<QuestionContent>
<Text>What is this a picture of?</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>1a</SelectionIdentifier>
<Text>Earth</Text>
</Selection>
<Selection>
<SelectionIdentifier>1b</SelectionIdentifier>
<Text>Sun</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>
答案 0 :(得分:5)
想出怎么做。显示图像的更新代码位于下方。
#set( $image_url = "http://upload.wikimedia.org/wikipedia/commons/6/6f/Earth_Eastern_Hemisphere.jpg" )
<Question>
<QuestionIdentifier>question1</QuestionIdentifier>
<QuestionContent>
<Binary>
<MimeType>
<Type>image</Type>
<SubType>jpg</SubType>
</MimeType>
<DataURL>${image_url}</DataURL>
<AltText>Image</AltText>
</Binary>
<Text>What is this a picture of?</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>1a</SelectionIdentifier>
<Text>Earth</Text>
</Selection>
<Selection>
<SelectionIdentifier>1b</SelectionIdentifier>
<Text>Sun</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>