use xsl to output plain text
You can define a template to match on script/command and eliminate the xsl:for-each concat() can be used to shorten the expression and save you from explicitly inserting so many <xsl:text> and <xsl:value-of> elements. The use of an entity reference 
 for the carriage return, rather than relying on preserving the line-break between your <xsl:text> element … Read more