title: XSLT Transformation Error in WSO2 ESB 4.8.1
body: <p>I am performing a XSLT Transformation on an incoming Soap/http request in simple proxy service. I am getting the following Error. </p>
  
  <p><strong>Note:</strong>
  i am using WSO2 ESB 4.8.1.</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>Unable to perform XSLT transformation using : Value {name ='null', keyValue ='gov:/xslt/Interface.xslt'} against source XPath : s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1] reason : Unable to create an OMElement using XSLT result  {org.apache.synapse.mediators.transform.XSLTMediator}
  org.apache.synapse.SynapseException: Unable to create an OMElement using XSLT result 
      at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:302)
      at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:191)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
      at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
      at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:166)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
      at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:411)
      at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
      at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,16]
  Message: Content is not allowed in prolog.
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
      at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
      at org.apache.synapse.util.jaxp.StreamResultBuilder.getNode(StreamResultBuilder.java:87)
      at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:300)
      ... 12 more
  Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,16]
  Message: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
      at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      at org.apache.axiom.util.stax.dialect.SJSXPStreamReaderWrapper.next(SJSXPStreamReaderWrapper.java:138)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
      ... 17 more
  </code></pre>
  
  <p><strong>XSLT File:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:con="http://com.example/cdm/contract/v1" xmlns:lic="http://com.example/cdm/license/v1" xmlns:org="http://com.example/cdm/organization/v1" xmlns:tns="http://com.example/cdm/order/v1" xmlns:tns1="http://com.example/cdm/customer/v1" xmlns:tns3="http://com.example/cdm/address/v1" xmlns:tns4="http://com.example/cdm/person/v1" xmlns:tns5="http://com.example/cdm/productoffer/v1" xmlns:tns6="http://com.example/cdm/product/v1" xmlns:tns7="http://com.example/cdm/productofferprice/v1" exclude-result-prefixes="tns tns1 tns4 tns3 tns5 tns6 tns7" version="1.0"&gt;
    &lt;xsl:template match="/tns:OrderRequest"&gt;
      &lt;tns:OrderRequest&gt;
        &lt;tns:Order&gt;
          &lt;tns:OrderHeader&gt;
            &lt;tns:OrderNumber&gt;
              &lt;xsl:value-of select="tns:OrderHeader/tns:OrderNumber" /&gt;
            &lt;/tns:OrderNumber&gt;
              &lt;/tns:OrderHeader&gt;
           &lt;/tns:Order&gt;
      &lt;/tns:OrderRequest&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p><strong>Problem:</strong>
  i don't know what is wrong with my XSLT file. I don't see anything in my prolog. </p>