格式化粗体文本 XML
Formatting bold text XML
我正在使用 MTURKS 创建以下调查问题:
<?xml version="1.0" encoding="UTF-8"?>
<QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
<Question>
<QuestionIdentifier>1</QuestionIdentifier>
<QuestionContent>
<Text>${question}</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<MinSelectionCount>1</MinSelectionCount>
<MaxSelectionCount>1</MaxSelectionCount>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>${choice2}</SelectionIdentifier>
<Text>Subject 1: Math</Text>
</Selection>
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<Text>Subject 2: Science</Text>
</Selection>
<Selection>
<SelectionIdentifier>Alt1</SelectionIdentifier>
<Text>Alt1</Text>
</Selection>
<Selection>
<SelectionIdentifier>noneoftheabove</SelectionIdentifier>
<Text>Subject 3: PE</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>
</QuestionForm>
理想情况下,我希望将此格式设置为单个问题,答案中的文本以粗体显示(例如,在每个响应中将主题一词加粗)。我还想在答案选项 2 和 3 之间添加文本,以便用户看到以下内容:
$问题
学术科目
科目 1: 数学
科目 2:科学
其他科目
- 科目 3: PE
当我尝试下一步格式化提示中的异议时,使用此代码:
<Text><b>Subject 2:</b> Science</Text>
我收到一条错误消息:
[ERROR] Error creating HIT 1 (B: x0): [-1,-1] cvc-type.3.1.2: Element 'Text' is a simple type, so it must have no element information item [children].
我尝试时也遇到同样的错误(如上所示):
</Selection>
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<Text>Subject 2: Science</Text>
</Selection>
<text>Academic Subjects</text>
<Selection>
<SelectionIdentifier>Alt1</SelectionIdentifier>
为了在项目响应之间穿插文本。
您可以使用 <FormattedContent>
标签,如本例所示:
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<FormattedContent><![CDATA[
<b>Subject 2:</b> Science
]]></FormattedContent>
</Selection>
您可以在 AWS Turk 网站上阅读有关 <FormattedContent>
标签 here 的更多信息。
我正在使用 MTURKS 创建以下调查问题:
<?xml version="1.0" encoding="UTF-8"?>
<QuestionForm xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd">
<Question>
<QuestionIdentifier>1</QuestionIdentifier>
<QuestionContent>
<Text>${question}</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<MinSelectionCount>1</MinSelectionCount>
<MaxSelectionCount>1</MaxSelectionCount>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>${choice2}</SelectionIdentifier>
<Text>Subject 1: Math</Text>
</Selection>
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<Text>Subject 2: Science</Text>
</Selection>
<Selection>
<SelectionIdentifier>Alt1</SelectionIdentifier>
<Text>Alt1</Text>
</Selection>
<Selection>
<SelectionIdentifier>noneoftheabove</SelectionIdentifier>
<Text>Subject 3: PE</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>
</QuestionForm>
理想情况下,我希望将此格式设置为单个问题,答案中的文本以粗体显示(例如,在每个响应中将主题一词加粗)。我还想在答案选项 2 和 3 之间添加文本,以便用户看到以下内容: $问题
学术科目
科目 1: 数学
科目 2:科学
其他科目
- 科目 3: PE
当我尝试下一步格式化提示中的异议时,使用此代码:
<Text><b>Subject 2:</b> Science</Text>
我收到一条错误消息:
[ERROR] Error creating HIT 1 (B: x0): [-1,-1] cvc-type.3.1.2: Element 'Text' is a simple type, so it must have no element information item [children].
我尝试时也遇到同样的错误(如上所示):
</Selection>
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<Text>Subject 2: Science</Text>
</Selection>
<text>Academic Subjects</text>
<Selection>
<SelectionIdentifier>Alt1</SelectionIdentifier>
为了在项目响应之间穿插文本。
您可以使用 <FormattedContent>
标签,如本例所示:
<Selection>
<SelectionIdentifier>${choice1}</SelectionIdentifier>
<FormattedContent><![CDATA[
<b>Subject 2:</b> Science
]]></FormattedContent>
</Selection>
您可以在 AWS Turk 网站上阅读有关 <FormattedContent>
标签 here 的更多信息。