|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Contitional statement
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:
<ROOT>
<id idn="1">
<a>texta</a>
<b>textb</b>
<c>c one</c>
<c>ctow</c>
<c>cs</c>
<c>css</c>
</id>
<id idn="2">
<a>texta</a>
<b>textb</b>
<c>c one</c>
<c>ctow</c>
</id>
<id idn="3">
<a>texta</a>
<b>textb</b>
<c>c one</c>
<c>ctow</c>
</id>
</ROOT>
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
http://www.jenitennison.com/xslt/grouping/muenchian.html. 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.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








