The NullPointerException you are getting seems to indicate that the XPath expression (which in this case is the WSO2 ESB default when nothing else is provided) pointing at the data you wish to transform returns null. In this case that would mean that you have a blank SOAP body.
You haven't posted your sequence configuration, so I don't really have a lot to work with.
My suggestion is that you add a full log (below), which prints the entire SOAP envelope along with several properties into the ESB console and the carbon log file, just before the XSLT mediator to see whether or not you actually have content in your payload.
<log category="INFO" level="full" separator=","/>
I tested your transformation with the following config and it performed flawlessly.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="XsltTestProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<payloadFactory>
<format>
<GetAppointmentResponse xmlns="http://ws.wso2.org/dataservice">
<NewAppointment>147</NewAppointment>
<ServiceTOA>TT_P</ServiceTOA>
<MinimalTime>1</MinimalTime>
<ReturnCode>0</ReturnCode>
<ErrorMessage>SUCESSO</ErrorMessage>
</GetAppointmentResponse>
</format>
<args/>
</payloadFactory>
<log level="custom">
<property name="message" value="Before XSLT transformation"/>
<property name="payload" expression="$body"/>
</log>
<xslt key="gov:GetAppointmentSchedulePortalReqCS_Response"/>
<log level="custom">
<property name="message" value="After XSLT transformation"/>
<property name="payload" expression="$body"/>
</log>
<property name="RESPONSE" value="true"/>
<header name="To" action="remove"/>
<send/>
</inSequence>
</target>
<description/>
</proxy>
As a side note I'd suggest you add the following attribute to your xsl:stylesheet element to remove the unnecessary SOAP xmlns declaration from your XSLT output.
exclude-result-prefixes="soapenv"
EDIT
This simple sample config is based on the description of the flow of execution edited in to the question. It shows how to properly implement the flow in question. When Proxy1 is called the log statements do appear in sequence as expected.
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="Proxy1" statistics="disable" trace="disable">
<target endpoint="Proxy2Endpoint">
<inSequence>
<!-- Do some XSLT here -->
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy1 in (1)"/>
<property expression="$body" name="body"/>
</log>
<!-- Do some header magic here -->
<!-- Implicit send to the endpoint specified in the target element -->
</inSequence>
<outSequence>
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy1 out (6)"/>
<property expression="/*" name="body"/>
</log>
<!-- Do some more XSLT here -->
<send/>
</outSequence>
</target>
</proxy>
<proxy name="Proxy2" statistics="disable" trace="disable" transports="https http">
<target endpoint="Proxy3Endpoint">
<inSequence>
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy2 in (2)"/>
<property expression="$body" name="body"/>
</log>
<!-- Do some header magic here -->
<!-- Implicit send to the endpoint specified in the target element -->
</inSequence>
<outSequence>
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy2 out (5)"/>
<property expression="/*" name="body"/>
</log>
<send/>
</outSequence>
</target>
</proxy>
<proxy name="Proxy3" statistics="disable" trace="disable">
<target endpoint="ImaginaryWebServiceEndpoint">
<inSequence>
<!-- Do some XSLT here -->
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy3 in (3)"/>
<property expression="$body" name="body"/>
</log>
</inSequence>
<outSequence>
<!-- Do some more XSLT here -->
<log category="INFO" level="custom" separator=",">
<property name="message" value="Proxy3 out (4)"/>
<property expression="/*" name="body"/>
</log>
<send/>
</outSequence>
</target>
</proxy>
<proxy name="ImaginaryWebService" statistics="disable" trace="disable">
<target>
<inSequence>
<log category="INFO" level="custom" separator=",">
<property name="message" value="Imaginary WebService in"/>
<property expression="$body" name="body"/>
</log>
<payloadFactory>
<format>
<proxy3Response xmlns="">This is the response from the Imaginary WebService</proxy3Response>
</format>
<args/>
</payloadFactory>
<log category="INFO" level="custom" separator=",">
<property name="message" value="Imaginary WebService out"/>
<property expression="/*" name="body"/>
</log>
<header action="remove" name="To"/>
<property action="set" name="RESPONSE" scope="default"
type="STRING" value="true"/>
<send/>
</inSequence>
</target>
</proxy>
<endpoint name="Proxy2Endpoint">
<address statistics="disable" trace="disable" uri="http://localhost:8280/services/Proxy2" />
</endpoint>
<endpoint name="Proxy3Endpoint">
<address statistics="disable" trace="disable" uri="http://localhost:8280/services/Proxy3" />
</endpoint>
<endpoint name="ImaginaryWebServiceEndpoint">
<address statistics="disable" trace="disable" uri="http://localhost:8280/services/ImaginaryWebService" />
</endpoint>