Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] select all answers belongs to one question from xml with xpath


Subject: [xsl] select all answers belongs to one question from xml with xpath
From: 04083259@xxxxxxxxxxxxx
Date: Thu, 30 Jun 2005 19:36:25 +0100 (BST)

hi every one
i have a set of questions and for each question a  set of answers (4
answers )stored in xml file as each each answer has an attribute as a
reference to the question that it belogs to as following :
<ques>
<question id="q1">
<text>a question</text>
</question>

<question id="q2">
<text>a question</text>
</question>

<question id="q3">
<text>a question</text>
</question>

</ques>

<ans>
<answer an_id="an1" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an2" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an3" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an4" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an5" question="q2">
<text>an answer</text>
</answer>

<answer an_id="an6" question="q2">
<text>an answer</text>
</answer>

<answer an_id="an7" question="q2">
<text>an answer</text>
</answer>


<answer an_id="an8" question="q2">
<text>an answer</text>
</answer>


<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
</ans>


i am trying to write xpath which allows me to get all answers belongs to
one question along with the question that has the answers
i am get stuck

any help please

thanks


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor
Keywords