BI Publisher (MOSC)

MOSC Banner

Manipulating the current group elements in xsl.

edited May 20, 2020 5:01AM in BI Publisher (MOSC) 1 commentAnswered

Hi

We have developed Xsl template to extract XML output.  The problem is we need to add an attribute to the current group element i.e COMPANIES. Any help with this highly appreciated.

xsl Code:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

   <xsl:template match="/">

      <SyncDCW_COMPANIES xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" baseLanguage="EN">

         <xsl:for-each-group select="/DATA/COMPANIES" group-by="./ADDRESS_LINE1">

            <DCW_COMPANIESSet>

               <xsl:copy-of select="current-group()" copy-namespaces="no" />

            </DCW_COMPANIESSet>

         </xsl:for-each-group>

      </SyncDCW_COMPANIES>

   </xsl:template>

</xsl:stylesheet>

Sample output:

<?xml version="1.0" encoding="UTF-8"?>

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center