Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tests>
- <testcases id="1">
- <command value="copy">
- <files value="$$path$$/1.txt $$path$$/2.txt" />
- </testcases>
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
- >
- <xsl:param name="path">##MISSING##</xsl:param>
- <xsl:output method="xml" indent="yes" encoding="utf-8"/>
- <xsl:template match="@* | node()">
- <xsl:copy>
- <xsl:apply-templates select="@* | node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="@*">
- <xsl:param name="find">$$project$$</xsl:param>
- <xsl:variable name="attribute-name" select="name()"/>
- <xsl:choose>
- <xsl:when test="contains(., $find)">
- <xsl:attribute name="{$attribute-name}">
- <xsl:value-of select="concat(substring-before(., $find), $path, substring-after(., $find))"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy>
- <xsl:apply-templates select="@* | node()"/>
- </xsl:copy>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <tests>
- <testcases id="1">
- <command value="copy">
- <files value="E:/test/1.txt $$path$$/2.txt" />
- </testcases>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement