AGCEventsRC2.xsl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3. <xsl:script src="AGCEventsXML.js">
  4. <![CDATA[
  5. function GetPrefix(node)
  6. {
  7. var attr = node.attributes.getNamedItem("Prefix");
  8. if (attr)
  9. return attr.value;
  10. var theParent = node.parentNode;
  11. return theParent ? GetPrefix(theParent) : "__ERROR_NO_PREFIX__";
  12. }
  13. ]]>
  14. </xsl:script>
  15. <xsl:template match="/">
  16. <xsl:apply-templates/>
  17. </xsl:template>
  18. <xsl:template match="AGCEvents" xsl:space="preserve">
  19. /////////////////////////////////////////////////////////////////////////////
  20. // <xsl:value-of select="@outputfile"/>
  21. //
  22. // This is an ALWAYS GENERATED file. It should *not* be edited directly.
  23. //
  24. // It was generated at <xsl:value-of select="@time"/> from the following script:
  25. // <xsl:value-of select="@scriptfullname"/>
  26. //
  27. // The input files were:
  28. // <xsl:value-of select="@xmlfile"/>
  29. // <xsl:value-of select="@xslfile"/>
  30. //
  31. // It should be included from AGC.rc2, after including resource.h.
  32. //
  33. STRINGTABLE DISCARDABLE
  34. BEGIN
  35. <xsl:apply-templates/>
  36. END
  37. </xsl:template>
  38. <xsl:template match="EventGroup" xml:space="preserve">
  39. IDS_<xsl:eval>GetPrefix(this)</xsl:eval><xsl:value-of select="@Name"/>_LowerBound "<xsl:value-of select="@Description"/>"
  40. <xsl:for-each select="Event"> IDS_<xsl:eval>GetPrefix(this)</xsl:eval><xsl:value-of select="@Name"/> "<xsl:value-of select="@Description"/>"
  41. IDS_FMT_<xsl:eval>GetPrefix(this)</xsl:eval><xsl:value-of select="@Name"/> "<xsl:value-of select="@Format"/>"
  42. </xsl:for-each>
  43. <xsl:apply-templates select="EventGroup"/>
  44. IDS_NAME_<xsl:eval>GetPrefix(this)</xsl:eval><xsl:value-of select="@Name"/>_LowerBound "<xsl:value-of select="@DisplayName"/>"
  45. </xsl:template>
  46. </xsl:stylesheet>