upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

lufa_helpcontentsetup_transform.xslt 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!--
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2013.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. -->
  7. <!-- Atmel Studio HV1 Setup XHTML transform file -->
  8. <!-- Updates a helpcontentsetup.msha document to add appropriate version
  9. information. -->
  10. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0">
  11. <xsl:output method="xml" omit-xml-declaration="yes"/>
  12. <!-- Need to input the LUFA extension version for later use -->
  13. <xsl:param name="extension-version"/>
  14. <!-- Recursively match and copy/process all nodes/attributes -->
  15. <xsl:template match="node()">
  16. <xsl:copy>
  17. <xsl:copy-of select="@*"/>
  18. <xsl:apply-templates select="node()"/>
  19. </xsl:copy>
  20. </xsl:template>
  21. <!-- Update the LUFA help package file name -->
  22. <xsl:template match="xhtml:div[@class='package']/xhtml:a">
  23. <xsl:copy>
  24. <xsl:copy-of select="@class"/>
  25. <xsl:attribute name="href">
  26. <xsl:text>lufa_help_</xsl:text>
  27. <xsl:value-of select="$extension-version"/>
  28. <xsl:text>.mshc</xsl:text>
  29. </xsl:attribute>
  30. <xsl:text>lufa_help_</xsl:text>
  31. <xsl:value-of select="$extension-version"/>
  32. <xsl:text>.mshc</xsl:text>
  33. </xsl:copy>
  34. </xsl:template>
  35. </xsl:stylesheet>