[xsl] xsl transform on xml with namespaces returns no output

Subject: [xsl] xsl transform on xml with namespaces returns no output
From: "Raveendran, Reshma" <Reshma.Raveendran@xxxxxxxxxxxxxxxxx>
Date: Thu, 6 Aug 2009 01:55:50 +0530
Hi,

I want to apply xsl on the xml below to get a transformed xml as shown
below.

Source xml ---

 <input xmlns="http://tempuri.org/";>
  <InputParams
xmlns="http://schemas.datacontract.org/2004/07/GenericQuery";>
	<anyType xsi:type="q1:ResultSpecPagination"
xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";
xmlns:q1="urn:cbc:message"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <PageSize xmlns="">10</PageSize>
  </anyType>
  <anyType xsi:type="q2:AccountFilter"
xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";
xmlns:q2="urn:cbc:clientinfo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <AccountFilter xmlns="">
  <O>101</O>
  <F>173</A>
  </AccountFilter>
  </anyType>
  <anyType xsi:type="xsd:string"
xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>677</anyType>
  <anyType xsi:type="xsd:string"
xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>A</anyType>
  </InputParams>
  </input>


Expected Result:
-  <pSearch xmlns="http://tempuri.org/";>
- <p1>
  <PageSize xmlns="">10</PageSize>
  </p1>
- <p2>
-<AccountFilter xmlns="">
  <O>101</O>
  <F>173</F>
  </AccountFilter>
  </p2>
  <p3>677</p3>
  <p4>A</p4>
  </pSearch>

Basically just replace the container input/InputParams element with a
single pSearch and replace anyType subelements with some other elements.
The contents within anyType elements should be copied as it is. I'm not
able to get the expected output due to the namespaces in the source xml.
Removing all namespaces seems to work but that is not a alternative I
have. I also tried inserting the exclude-result-prefixes for the
namespaces in the xsl but that also does not seem to work. How can this
be done

Thanks
Reshma

--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does
not intend to waive confidentiality or privilege. Use of this email is
prohibited when received in error. We may monitor and store emails to the
extent permitted by applicable law.

Current Thread