Hi all, Just wonder anyone have encountered this problem before?I tried using XMLSPY debugger and I can get the correct outputfor my XSLT transformation, however in .net, aftertransforma tion the attributes I put inside xsl:element tagcannot be generated.
Part of the XML data:
<?xml version="1.0" encoding="utf-8"?>
<receipients>
<receipient>
...
<ServerUrl>http ://win2003p2/</ServerUrl>
<SubmissionUrl> http://win2003p2/online+feedback .htm</SubmissionUrl>
...
</receipient>
</receipients>
Part of the XSLT data:
<xsl:element name="form">
<xsl:attribut e name="method">p ost</xsl:attribute>
<xsl:attribut e name="target">_ blank</xsl:attribute>
<xsl:attribut e name="action">< xsl:value-ofselect="Submi ssionUrl"/></xsl:attribute>
<table border="0" cellpadding="0" cellspacing="0" >
<tr><td width="1" align="left" valign="top">
<xsl:element name="img">
<xsl:attribut e name="src"><xsl :value-ofselect="Serve rUrl"/>Images/cornerTL.gif</xsl:attribute>
<xsl:attribut e name="width">7</xsl:attribute>
<xsl:attribut e name="height">7 </xsl:attribute>
</xsl:element></td>
<td rowspan="3" class="segmentT ext">Participan t Details</td>
</tr>
</table>
...
<!-- The form details -->
</xsl:element>
So the correct output is:
<form method="post" target="_blank" action="http://win2003p2/online+feedback .htm">
...
But in .net the result given is:
<form>
Code that doing transformation:
StringWriter sw = new StringWriter();
XmlWriter writer = new XmlTextWriter(s w);
// template is the XslTransform, doc is the XmlDocument
template.Transf orm(doc, new XsltArgumentLis t(), writer, newXmlUrlResolv er());
Really appreciate if can help. Thanks!!
--------------------------------
From: Wayne Lian
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>AkMEKzoeS0C gPm0ice4BDw==</Id>