I am having problem transforming xml to xml using xsl. I found out where the problem comes from but still don't know how to fix it.
<?xml version="1.0" encoding="UTF-8"?>
<tells uri="" xmlns="http://dl.kr.org/dig/2003/02/lang">
<impliesc>
<catom name="name1"/>
<catom name="name2"/>
</impliesc>
<impliesc>
<catom name="name3"/>
<catom name="name4"/>
</impliesc>
</tells>
I think the problems comes from this line
<tells uri="" xmlns="http://dl.kr.org/dig/2003/02/lang">
If I remove the "uri="" xmlns="http://dl.kr.org/dig/2003/02/lang"" and leave only the
"<tells>"
everything works perfectly. But is there a way to transform it without removing it?
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="/">
<xsl:element name="tells">
<xsl:for-each select="./tells/impliesc">
<xsl:element name="impliesc">
<xsl:for-each select="./tells/impliesc/catom">
<xsl:element name="catom">
<xsl:attribute name="name">
<xsl:value-of select="./tells/impliesc/individual/@name"/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>