[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: group-starting-with and ending with

Subject: Re: 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
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.