[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: group-starting-with and ending with
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
|
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
|