Re: [xsl] Contitional statement

Subject: Re: [xsl] Contitional statement
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Jun 2001 22:27:59 +0100
Hi Earl,

> i want to get an output like this
> <ROOT>
> <id idn=1>
> <a> appears only once for one id
> <b> appears only once for one id
> <c>c one</c>
> <c>ctow</c>
> <c>cs</c>
> <c>css</c>
> <id>

Is that supposed to be XML or are you actually after output that looks
exactly like that? I think given your source XML that perhaps that you
want XML that looks like:

   <id idn="1">
      <c>c one</c>
   <id idn="2">
      <c>c one</c>
   <id idn="3">
      <c>c one</c>

In other words, that you want to group the content of the root2
elements in your source into id elements, according to their ids, and
within the new id elements, you want only the unique values of the
child elements.

In that case, it's a grouping problem, and you might be able to figure
out an answer if you have a look at If that's
not what you were after, or if you can't figure it out, then please
give the XML that you want generated from the sample XML that you
gave, and describe the mapping in more detail.



Jeni Tennison

 XSL-List info and archive:

Current Thread