You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

project2book.xsl 1.1 kB

123456789101112131415161718192021222324252627282930313233343536
  1. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  2. <!--
  3. A little bit of automated transformation to help conversion
  4. from Anakia to Forrest/Cocoon docs.
  5. This is purely experimental, it hem...should work, well mostly
  6. but it should manage to break a couple of things so you will
  7. need a manual pass to fix things after that.
  8. Stephane Bailliez, sbailliez@apache.org
  9. -->
  10. <xsl:output method="xml" indent="yes" doctype-system="book-cocoon-v10.dtd"
  11. doctype-public="-//APACHE//DTD Cocoon Documentation Book V1.0//EN" encoding="ISO-8859-1"/>
  12. <xsl:template match="project">
  13. <book copyright="2002 The Apache Software Foundation"
  14. xmlns:xlink="http://www.w3.org/1999/xlink"
  15. software="{@name}"
  16. title="{title/text()}">
  17. <xsl:apply-templates select="body/menu"/>
  18. </book>
  19. </xsl:template>
  20. <xsl:template match="menu">
  21. <menu label="{@name}">
  22. <xsl:apply-templates select="item"/>
  23. </menu>
  24. </xsl:template>
  25. <xsl:template match="item">
  26. <menu-item label="{@name}" href="{@href}"/>
  27. </xsl:template>
  28. </xsl:stylesheet>