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, aftertransformation 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:attribute name="method">post</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute name="action"><xsl:value-ofselect="SubmissionUrl"/></xsl:attribute>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td width="1" align="left" valign="top">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:value-ofselect="ServerUrl"/>Images/cornerTL.gif</xsl:attribute>
<xsl:attribute name="width">7</xsl:attribute>
<xsl:attribute name="height">7</xsl:attribute>
</xsl:element></td>
<td rowspan="3" class="segmentText">Participant 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(sw);
// template is the XslTransform, doc is the XmlDocument
template.Transform(doc, new XsltArgumentList(), writer, newXmlUrlResolver());
Really appreciate if can help. Thanks!!
--------------------------------
From: Wayne Lian
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>AkMEKzoeS0CgPm0ice4BDw==</Id>