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

Is this a grouping task?

Subject: Is this a grouping task?
From: "Rick Quatro rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Oct 2019 18:07:20 -0000
 Is this a grouping task?
Hi All,

 

Here is my input document:

 

<root>

    <topic id="idm140322603719792">

        <chgdesc revnbr="42">Content</chgdesc>

        <title line-break="0">Content</title>

        <revst/>

        <para>Content</para>

        <revend/>

        <para>Content</para>

        <revst/>

        <note>

            <para>Content</para>

        </note>

        <revend/>

        <para>Content</para>

        <revst/>

        <para>Content</para>

        <para>Content</para>

        <revend/>

    </topic>

</root>

 

In my output, I need to add an attribute to the sibling elements between the
<revst> and <revend> elements. Here is the desired output:

 

<root>

    <topic id="idm140322603719792">

        <chgdesc revnbr="42">Content</chgdesc>

        <title line-break="0">Content</title>

        <para rev="changed">Content</para>

        <para>Content</para>

        <note rev="changed">

            <para>Content</para>

        </note>

        <para>Content</para>

        <para rev="changed">Content</para>

        <para rev="changed">Content</para>

    </topic>

</root>

 

I am using XSLT 2 and think this may require a for-each-group solution. Any
advice would be appreciated. Thank you very much.

 

Rick

 

Rick Quatro

Carmen Publishing Inc.

rick@xxxxxxxxxxxxxxx

585-729-6746

www.frameexpert.com/store/

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.