I want to do an XSLT 1.0 transformation of an xml where i use the node. Now when I apply this it sets an xmlns namespace on the copied items, is it possible to avoid this?
This is the input xml:
<ns0:Task xmlns:ns0="http://Sharepoint.Task">
<UserName>FalcoLannoo</UserName>
<Title>Task1</Title>
<Description>Description_0</Description>
<Library>Library_0</Library>
<DueDate>1999-05-31</DueDate>
<Priority>10</Priority>
</ns0:Task>
And I use this xsl to transform it:
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 ns0" version="1.0" xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/" xmlns:ns1="http://microsoft.com/wsdl/types/" xmlns:s0="http://Sharepoint.Batch" xmlns:ns0="http://Sharepoint.Batch">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/s0:updates" />
</xsl:template>
<xsl:template match="/s0:updates">
<tns:UpdateListItems>
<tns:listName>
<xsl:value-of select="listName/text()" />
</tns:listName>
<tns:updates>
<xsl:copy-of select="/s0:updates/Batch" />
</tns:updates>
</tns:UpdateListItems>
</xsl:template>
</xsl:stylesheet>
And the output file is this:
<tns:UpdateListItems xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/"
xmlns:ns1="http://microsoft.com/wsdl/types/">
<tns:listName>{58887260-E5EB-4AB5-B105-E5DD57C8C8E0}</tns:listName>
<tns:updates>
<Batch OnError="Continue" ListVersion="1" ViewName=""
xmlns:ns0="http://Sharepoint.Batch">
<Method ID="1" Cmd="New">
<Field Name="UserName">FalcoLannoo</Field>
<Field Name="Title">Task1</Field>
<Field Name="Description">Description_0</Field>
<Field Name="Library">Library_0</Field>
<Field Name="DueDate">1999-05-31</Field>
<Field Name="Priority">10</Field>
</Method>
</Batch>
</tns:updates>
</tns:UpdateListItems>
And this is the line i want to get rid of: xmlns:ns0="http://Sharepoint.Batch" (in the Batch node)
thx