DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Need to modify single XML tag using Datapower XSLT

    Posted 09/22/20 07:20 PM

    Hi,

    Help required on priority please.

    My XML is as below

    <ns:document-service-requests xmlns:ns="com.metlife.us.ins.svc.docauto.docgen.request" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" requestCount="1" requestPriority="7"> <ns:document-service-requestor chargeCode="MGI" appName="MGIRAS" requestDescr="RAS DOC generation" requestor="MGIRAS" />`enter code here` <ns:document-service-request requestId="1117226deddeabed611e314caced611_INT2"> <ns:document-templates> content </ns:document-templates> </ns:document-service-request> </ns:document-service-requests>

    Firstly, I Need to check if after '_' in requestId is INT2, so need to send entire xml after changing that INT2 to UAT.

    I have written XSLT but that is not working, could someone please help me with this on priority.



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: Need to modify single XML tag using Datapower XSLT

    Posted 09/22/20 07:34 PM


  • 3.  RE: Need to modify single XML tag using Datapower XSLT

    Posted 09/22/20 07:41 PM

    Tried with below xsl, but no luck

    <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="w3.org/1999/XSL/Transform" > <xsl:template match="/"> <xsl:variable name="RequestID" select="/*[local-name()='document-service-requests']/*[local-name()='document-service-request']/" /> <xsl:variable name="IdentifierVal" select="substring-after($RequestID,'_')" /> </xsl:template> <xsl:template match="*|node()"> <xsl:copy> <xsl:apply-templates select="*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>



    #DataPower
    #Support
    #SupportMigration


  • 4.  RE: Need to modify single XML tag using Datapower XSLT

    Posted 09/23/20 05:47 AM

    Anyone for much needed help please??



    #DataPower
    #Support
    #SupportMigration