[MarkLogic Dev General] Can someone explain how I can get the following info

matn1 at comcast.net matn1 at comcast.net
Wed Oct 7 09:43:06 PDT 2009


I have part of an xml document below 

I run the following xquery 
for $question in doc()//Section/PrintQuestion 
let $questionid := $question/@id 
let $questions := $question/*/TextFragment 
return (<div>{string($questionid)}:{for $question in $questions return string($questions/@value)}</div>) 

I can get the PrintQuestionAttribute, but how do I get the TextFragment Question under it? 
that reads 
"Randall will spin the spinner twice and add the numbers. What is the probability that he will get a sum that is greater than 5? " 

-- Thanks, Mike 

<PrintQuestion id="P620_S4940_0" type="pickOne"> 
<Standards> 
<Standard value="" /> 
</Standards> 
<References> 
<PassageRef id="" /> 
</References> 
<content contentID=""> 
<multichoice> 
<max_score>1</max_score> 
<question cssClass="" cssStyle=""> 
<Passage> 
<Paragraph> 
<TextFragment><![CDATA[Randall will spin the spinner twice and add the numbers. What is the probability that he will get a sum that is greater than 5?]]></TextFragment> 
</Paragraph> 
<Paragraph> 
<TextFragment type="graphic"></TextFragment> 
</Paragraph> 
</Passage> 
</question> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20091007/94181185/attachment.html


More information about the General mailing list