i need to convert from one xml format to another xml using xslt.Initially i tried without namespace and i got it. but when i tried with name space xmlns="http://ws.wso2.org/dataservice" it not working without prefixes as xmlns:d="http://ws.wso2.org/dataservice" in the given xml file
<test xmlns="http://ws.wso2.org/dataservice">
<datarows>
<name>Name</name>
</datarows>
<datarows>
<name>karthik</name>
</datarows>
</testcsv>
i need xml file after xsl transformation as like
<head>
<names>Name</names>
<names>karthik</names>
</head>
Help me with xslt
i tried xslt as
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://ws.wso2.org/dataservice" exclude-result-prefixes="d" >
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<namespace-alias stylesheet-prefix="xsl" result-prefix="#default"/>
<xsl:template match="/">
<head>
<xsl:for-each select="testcsv/datarows">
<names>
<xsl:value-of select="name" />
</names>
</xsl:for-each>
</head>
</xsl:template>
</xsl:stylesheet>