Subject: Re: [xsl] XSLT 2: Best Way to Synthesize Elements Given List of Tagnames From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 5 Nov 2016 16:46:06 -0000 |
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.
-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Streaming hands-on XSLT/XPath 2 training @US$45: http://goo.gl/Dd9qBK | Crane Softwrights Ltd. _ _ _ _ _ _ http://www.CraneSoftwrights.com/s/ | G Ken Holman _ _ _ _ _ _ _ _ _ _ mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ blog _ _ _ _ _ http://plus.google.com/+GKenHolman-Crane/posts | Legal business disclaimers: _ _ http://www.CraneSoftwrights.com/legal |
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT 2: Best Way to Synth, John Lumley john.lum | Thread | Re: [xsl] XSLT 2: Best Way to Synth, Eliot Kimber ekimber |
Re: [xsl] XSLT 2: Best Way to Synth, John Lumley john.lum | Date | Re: [xsl] XSLT 2: Best Way to Synth, Dimitre Novatchev dn |
Month |