mahendra dubey 0 Newbie Poster

Hi there
I am using XSLT to process an XML file.I want to copy all whole XML and want to modify some attribute node.I using follwing code

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:db="http://tempuri.org/DatabaseXMLSchema.xsd">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

but i lost the whitespaces in this case if I add the " xml:space='preserve'" and use follwing
<xsl:template match="@* | node()" xml:space="preserve">
then I got follwing error
Attribute and namespace nodes cannot be added to the parent element after a text, comment, pi, or sub-element node has already been added.

please help me how can I do that....