Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Output of copy-of into a variable? [Thread Next] Re: Output of copy-of into a variable?To: NULL Date: 1/16/2009 8:05:00 PM On Tue, 13 Jan 2009 23:26:48 -0800 (PST), Michael Skovfoged <michael@s...> wrote: >On 13 Jan., 12:56, Martin Honnen <mahotr...@yahoo.de> wrote: >> Michael Skovfoged wrote: >> > I have to write code that will work on any nodenames/trees so the >> > above code will not work for me. >> >> I do not understand what you want to achieve. What exactly do you want >> to do with "any nodenames/trees"? >It could be this node: <PmtId><InstrId>InstrIdFiFi01</ >InstrId><EndToEndId>EndToEndIdFiFi01</EndToEndId></PmtId> > >Result: >SOMEINFO <PmtId><InstrId>InstrIdFiFi01</InstrI >OTHERINF d><EndToEndId>EndToEndIdFiFi01</EndToEn >THIRDINF dId></PmtId> > >or this: <Amt><InstdAmt Ccy="EUR">1000.01</InstdAmt></Amt> > >Result: >SOMEINFO <Amt><InstdAmt Ccy= >OTHERINF "EUR">1000.01</Instd >ANYINFO Amt></Amt> I'm with Martin on this one - it's absolutely unclear from your example what RULE* you are trying to declare to process the nodes It's possible to create a template which takes the local-name() of the node and splits the string up somehow. The examples above are intended to use string processing of the node names, as far as I can tell But you haven't got 2 examples above which seem to indicate any RULE, just a rather muddled hope that something can be done (but we're not really closer to what ?) * For example , a RULE might be : ============================ Split node name with a newline at 3 characters if it's longer than 7 characters, At 5 characters (or use the whole node name) if it's between 1 - 7 characters in length. And in front of nodes which contain the text 'Amt' somewhere within them, insert the text ANYINFO before the closing </Amt> If you can declare your intentions as a series of steps then probably you can fix it yourself ;-) HTH Cheers - Neil ------------------------------------------------ Digital Media MVP : 2004-2009 http://mvp.support.microsoft.com/mvpfaqs | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
