forked from crs-tools/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:template match="/"> | ||
<html> | ||
<head> | ||
<style> | ||
pre { | ||
white-space: pre-wrap; | ||
} | ||
span { | ||
color: grey; | ||
} | ||
.file { | ||
color: orange; | ||
} | ||
.exe { | ||
color: blue; | ||
} | ||
</style> | ||
</head> | ||
<body spellcheck="false"> | ||
<h1>CRS Tasks</h1> | ||
<xsl:for-each select="job/tasks/task"> | ||
<h3> | ||
<xsl:value-of select="@type"/> | ||
</h3> | ||
|
||
<pre contenteditable="true"> | ||
<xsl:for-each select="option"> | ||
<xsl:variable name="value" select="text()"/> | ||
<xsl:variable name="type" select="@filetype"/> | ||
|
||
<!-- Add linebreaks for some options, but only when a new parameter starts --> | ||
<xsl:if test="starts-with($value, '-')"> | ||
<xsl:if test="starts-with($value, '-map') or string-length($value) > 7"> | ||
<xsl:text>\
  </xsl:text> | ||
</xsl:if> | ||
</xsl:if> | ||
|
||
<!-- Quote & format the value if required --> | ||
<xsl:choose> | ||
<xsl:when test="contains($value, ';')"> | ||
<!-- xsl:variable name="x" select="replace($value, ' ; ', ' ;
 ')"/ --> | ||
<span class="filter"><xsl:value-of select="concat('"', $value, '"')"/></span> | ||
</xsl:when> | ||
<xsl:when test="contains($value, ' ') and not(@quoted = 'no')"> | ||
<span><xsl:value-of select="concat('"', $value, '"')"/></span> | ||
</xsl:when> | ||
<xsl:when test="$type"> | ||
<span class="file"> | ||
<xsl:attribute name="class"><xsl:value-of select="concat('file ', @filetype)" /></xsl:attribute> | ||
<xsl:value-of select="$value"/> | ||
</span> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:value-of select="$value"/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
<xsl:text> </xsl:text> | ||
</xsl:for-each> | ||
</pre> | ||
</xsl:for-each> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
</xsl:stylesheet> |