profile.xsl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2. version="1.0">
  3. <!-- Include common profiling stylesheet -->
  4. <xsl:import href="profile-mode.xsl"/>
  5. <!-- This file must be included, because profile-mode is using templates from it -->
  6. <xsl:import href="../common/stripns.xsl"/>
  7. <!-- In the two pass processing there is no need for base URI fixup -->
  8. <xsl:param name="profile.baseuri.fixup" select="false()"/>
  9. <!-- If you need to validate profiled content against DTD,
  10. create customization that will import this stylesheet and
  11. will use xsl:output (see example bellow) to output reference
  12. to the desired DTD version. -->
  13. <!-- Generate DocBook instance with correct DOCTYPE -->
  14. <!--
  15. <xsl:output method="xml"
  16. doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
  17. doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
  18. -->
  19. <!-- Profiling parameters -->
  20. <xsl:param name="profile.arch" select="''"/>
  21. <xsl:param name="profile.audience" select="''"/>
  22. <xsl:param name="profile.condition" select="''"/>
  23. <xsl:param name="profile.conformance" select="''"/>
  24. <xsl:param name="profile.lang" select="''"/>
  25. <xsl:param name="profile.os" select="''"/>
  26. <xsl:param name="profile.revision" select="''"/>
  27. <xsl:param name="profile.revisionflag" select="''"/>
  28. <xsl:param name="profile.role" select="''"/>
  29. <xsl:param name="profile.security" select="''"/>
  30. <xsl:param name="profile.status" select="''"/>
  31. <xsl:param name="profile.userlevel" select="''"/>
  32. <xsl:param name="profile.vendor" select="''"/>
  33. <xsl:param name="profile.wordsize" select="''"/>
  34. <xsl:param name="profile.attribute" select="''"/>
  35. <xsl:param name="profile.value" select="''"/>
  36. <xsl:param name="profile.separator" select="';'"/>
  37. <xsl:param name="exsl.node.set.available">
  38. <xsl:choose>
  39. <xsl:when xmlns:exsl="http://exslt.org/common" exsl:foo="" test="function-available('exsl:node-set') or contains(system-property('xsl:vendor'), 'Apache Software Foundation')">1</xsl:when>
  40. <xsl:otherwise>0</xsl:otherwise>
  41. </xsl:choose>
  42. </xsl:param>
  43. <!-- Call common profiling mode -->
  44. <xsl:template match="/">
  45. <xsl:apply-templates select="." mode="profile"/>
  46. </xsl:template>
  47. </xsl:stylesheet>