Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download and install WSO2 ESB from http://wso2.com/products/enterprise-service-bus. For a list of prerequisites and step-by-step installation instructions, refer to Getting Started Installation Guide in the WSO2 ESB documentation.
  2. Start the sample Axis2 server. For instructions, refer to the section Setting Up the ESB Samples Setup - Starting Sample Back-End Servicesthe Axis2 server in the WSO2 ESB documentation.
  3. Save the following XSLT document as <ESB_HOME>/repository/samples/resources/transform/split_message.xslt.

    Code Block
    languagehtml/xml
    <?xml version="1.0" encoding="ISO-8859-1"?> 
      
    <xsl:stylesheet version="2.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
                    xmlns:m0="http://services.samples"
                    exclude-result-prefixes="m0 fn"> 
        <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> 
      
         <xsl:template match="/"> 
      
            <m:getQuote xmlns:m="http://services.samples"> 
                <m:request> 
                    <m:symbol>  
                        <xsl:value-of select="//m0:getQuote/m0:request[1]"/> 
                    </m:symbol>  
                </m:request> 
            </m:getQuote> 
      
        </xsl:template> 
    </xsl:stylesheet>

...

  • localEntry [line 8 in ESB config] - Entry from the local registry
  • xslt [line 12 in ESB config] - The XSLT mediator applies an XSLT transformation to the selected element in the message specified using the source attribute. In this case, no source attribute is given, so the transformation will be applied to the first child element of the message.