simplify.xsl 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version='1.0' ?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output indent="yes"/>
  4. <xsl:template match="/">
  5. <tests>
  6. <xsl:for-each select="test-suite/test-catalog/test-case[scenario/@operation='standard']">
  7. <xsl:element name="test">
  8. <xsl:attribute name="id">
  9. <xsl:value-of select="@id"/>
  10. </xsl:attribute>
  11. <path>
  12. <!-- quick fix -->
  13. <xsl:choose>
  14. <xsl:when test="file-path = 'Value-of'">
  15. <xsl:text>Valueof</xsl:text>
  16. </xsl:when>
  17. <xsl:otherwise>
  18. <xsl:value-of select="file-path"/>
  19. </xsl:otherwise>
  20. </xsl:choose>
  21. </path>
  22. <data>
  23. <xsl:value-of select="scenario/input-file[@role='principal-data']"/>
  24. </data>
  25. <stylesheet>
  26. <xsl:value-of select="scenario/input-file[@role='principal-stylesheet']"/> </stylesheet>
  27. <output>
  28. <xsl:value-of select="scenario/output-file"/>
  29. </output>
  30. </xsl:element>
  31. </xsl:for-each>
  32. </tests>
  33. </xsl:template>
  34. </xsl:stylesheet>