xsl-xml transformation: how to resolve namespace prefix?

publicstatic String XMLTransform(Source xmlSource, Source xsltSource)throws DocumentException,TransformerException,TransformerConfigurationException,Exception{

ByteArrayOutputStream returnByteStream =new ByteArrayOutputStream();

StreamResult streamResult =new StreamResult(returnByteStream);

TransformerFactory tFactory = TransformerFactory.newInstance();

Templates templates = tFactory.newTemplates(xsltSource);

Transformer transformer = templates.newTransformer();

transformer.transform(xmlSource, streamResult);

String result= returnByteStream.toString();

return result;

}

now xml I have is like this

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">

<soap:Body>

<FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" Traversal="Shallow">

<ItemShape>

<t:BaseShape>AllProperties</t:BaseShape>

</ItemShape>

<ParentFolderIds>

<t:DistinguishedFolderId Id="inbox"/>

</ParentFolderIds>

</FindItem>

</soap:Body>

</soap:Envelope>

how do i pass namespace in transformation?

[1875 byte] By [sachinpatel_ita] at [2007-11-27 5:33:29]
# 1
You don't "pass" the namespace in your transformation. Simply declare it in the root element, exactly as you declared it in your XML document.
DrClapa at 2007-7-12 15:00:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...