Subject: Re: [xsl] group-starting-with and ending with From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 8 Mar 2020 11:56:34 -0000 |
Hi Byomokesh, On Fri, Mar 6, 2020 at 12:17 PM Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Here is my XML > > <a><x>To</x> Test, <bb>Test1</bb>, <bb>Test2</bb>, <cc>Test3</cc>, > <dd>USA</dd></a> > > Desired Output > > <a><x>To</x> Test, <st><bb>Test1</bb>, <bb>Test2</bb></st>, > <cc>Test3</cc>, <dd>USA</dd></a> > You seem to want to, enclose a sequence of nodes delimited by structures <bb>..</bb> and <bb>..</bb> with an element "st". My questions are as follows, Within your XML input document, can there be only one such sequence than needs to be enclosed by an element "st"? If yes, then the solution could be simple and shouldn't involve using XSLT instructions like xsl:for-each-group. Also I think, if you could have schema documents for your XML input and output documents,then it could be possible to avoid lot of logic, error handling etc with the XSLT stylesheet itself. When using the schema documents for an XSLT transformation, lot of static/dynamic errors can be emitted by the XML Schema validator that runs in-process the XSLT transformation (that otherwise, you'd need to program in your XSLT stylesheet when not using the schema documents). -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] group-starting-with and e, Imsieke, Gerrit, le- | Thread | [xsl] tricky text and structure tes, Trevor Nicholls trev |
Re: [xsl] tricky text and structure, Liam R. E. Quin liam | Date | [xsl] JSON to XSLT to create AdobeI, James Grubb james@xx |
Month |