467,895 Members | 1,472 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,895 developers. It's quick & easy.

Problem with XSLTransform Class in .NET


Following template matches correctly in MSXML4 but NOT with .Net XSL


<--Do Some operation>

Code I wrote to translate the XML:
// Create an XPathNavigator to use for the transform.
XPathDocument mydata = new XPathDocument(xmlfile);
XPathNavigator nav = mydata.CreateNavigator();

// Transform the file.
XslTransform xslt = new XslTransform();
XmlTextWriter writer = new XmlTextWriter(outputfile, null);


I'm unable to figure out the problem. If anyone knows the solution, do let
me know.
I have also attached the input XML and XSL.


Input XML:

<?xml version="1.0"?>
<a href="http://www.hotmail.com" onmouseover="" onmouseout="">
<img src="http://myprod.concureworkplace.com/ewp/Images/entrycancel.gif"
alt="Cancel" border="0" title="Cancel"/></a>
<input type="submit" name="onclick" value="go"/>

Input XSl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
<xsl:output encoding="UTF-8" method="xml"/>

<xsl:template match="//a[img[contains(@src,'cancel')]]" priority="1"/>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="type">Submit</xsl:attribute>
<xsl:attribute name="value">Cancel</xsl:attribute>
<xsl:apply-templates select="*|text()"/>

<xsl:template match="*|text()|@*">
<xsl:apply-templates select="*|text()|@*"/>

Jul 21 '05 #1
  • viewed: 1218
1 Reply

"Animesh Sharma" <Animesh Sh****@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...

Following template matches correctly in MSXML4 but NOT with .Net XSL

You may want to post this to microsoft.public.dotnet.xml instead, thats
where all the XML wonks hang out.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by John Lehmann | last post: by
2 posts views Thread by Graham Pengelly | last post: by
8 posts views Thread by Demon News | last post: by
7 posts views Thread by Harolds | last post: by
1 post views Thread by avnrao | last post: by
1 post views Thread by manlio | last post: by
1 post views Thread by Lasse Edsvik | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.