|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping
Hi again,
> I take back my previous post as I don't see where I am wrong.
> The muenchian grouping is not required for the answers and only for the
> questions that too only if the OP is prticular about it.
>
> Otherwise, my code should work fine.
Yes, your solution would work fine on the input given by the OP (is OP
for Original Poster?). My point was that if the question_id's where
not ordered, then I think that your answer would not work, for
example:
<recordset>
<row>
<question_id>1</question_id>
<answer>1: blah blah blah...</answer>
</row>
<row>
<question_id>2</question_id>
<answer>2: blah blah blah...</answer>
</row>
<row>
<question_id>1</question_id>
<answer>3: blah blah blah...</answer>
</row>
<row>
<question_id>2</question_id>
<answer>4: blah blah blah...</answer>
</row>
...etc...
</recordset>
And now that I think about it, would:
<xsl:value-of select="key('rec', question_id)/answer"/>
not give only the first row/answer element with a given question_id,
no matter the current row element?
As I said, if I am wrong in my assumptions on how the language work, I
would be grateful for clarification.
Regards,
Ragulf Pickaxe :-)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








