|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT 2: Best Way to Synthesize Elements Given List
Of little assistance, but in XSLT3.0 you can of course use xsl:iterate, which is effectively an enveloped recursive (un)named template.... :-( John Sent from my iPad > On 5 Nov 2016, at 16:19, Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Say I have this string: "foo/bar" (or any arbitrarily-long sequence of > /-delimited tag names) and want to construct from it: > > <foo> > <bar> > <!-- Stuff added here that I get from somewhere else --> > </bar> > </foo> > > Is there an easier or more obvious way to generate this than an recursive > function? > > With a recursive function I can easily create child elements until the > sequence is exhausted but it feels like there should be an easier way > using XSLT 2 but if there is I'm not thinking of it. > > Cheers, > > Eliot > > -- > Eliot Kimber > http://contrext.com
|
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








