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: <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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Contitional statement, Michael Kay | Thread | [xsl] remove, Todd Diep |
[xsl] grouping and selecting, Earl Spencer | Date | [xsl] Sablotron, PHP and MySql Linu, Betty L. Harvey |
Month |