AnsweredAssumed Answered

Can a variable set in "Set Context Variable" assertion be used in the "Apply XSL Transformation" assertion?

Question asked by JamesDeluca76040423 on Jul 13, 2015
Latest reply on Jul 14, 2015 by JamesDeluca76040423

looking to use the value I set in a context variable "My New Service Name" in my XSL. Does anyone know the format of how to do this?

 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management"
  exclude-result-prefixes="xs"
  version="1.0">

<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="/l7:Service/l7:ServiceDetail[1]/l7:Name[1]">
<xsl:element name="l7:Name">My New Service Name</xsl:element>
</xsl:template>
<xsl:template match="/l7:Service/l7:ServiceDetail[1]/l7:ServiceMappings[1]/l7:HttpMapping[1]/l7:UrlPattern[1]">
<xsl:element name="l7:UrlPattern">/my/new/url*</xsl:element>
</xsl:template>

</xsl:stylesheet>

Outcomes