Skip to content

Instantly share code, notes, and snippets.

@tomaszkubacki
Created January 23, 2011 16:12
Show Gist options
  • Save tomaszkubacki/792174 to your computer and use it in GitHub Desktop.
Save tomaszkubacki/792174 to your computer and use it in GitHub Desktop.
result with with header... on mono and .net the same empty xml
string transform = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> " +
"<xsl:template match=\"*\"> " +
"<xsl:variable name=\"a\" select=\"'a'\"/> " +
"<xsl:value-of select=\"*[@a=$a]\"/> " +
"</xsl:template> " +
"</xsl:stylesheet>";
XmlReader rd = new XmlTextReader( new StringReader(transform));
XslTransform tr = new XslTransform();
tr.Load(rd);
tr.Transform("a.xml","b.xml");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment