epub3-chunk-mods.xsl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:exsl="http://exslt.org/common"
  5. xmlns:epub="http://www.idpf.org/2007/ops"
  6. xmlns:dc="http://purl.org/dc/elements/1.1/"
  7. xmlns:ncx="http://www.daisy.org/z3986/2005/ncx/"
  8. xmlns:db="http://docbook.org/ns/docbook"
  9. xmlns:opf="http://www.idpf.org/2007/opf"
  10. xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
  11. xmlns:str="http://exslt.org/strings"
  12. xmlns:xtext="xalan://com.nwalsh.xalan.Text"
  13. extension-element-prefixes="stext xtext"
  14. exclude-result-prefixes="exsl dc ncx opf stext str xtext"
  15. version="1.0">
  16. <!-- $Id: epub3-chunk-mods.xsl,v 1.1 2011-09-16 21:43:45 bobs Exp $ -->
  17. <xsl:include href="../xhtml5/html5-chunk-mods.xsl"/>
  18. <!--==============================================================-->
  19. <!-- DocBook XSL Parameter settings -->
  20. <!--==============================================================-->
  21. <!--==============================================================-->
  22. <!-- Template customizations -->
  23. <!--==============================================================-->
  24. <!-- EPUB3: customize to generate package files -->
  25. <xsl:template match="*" mode="process.root" priority="2">
  26. <xsl:call-template name="check.for.xalan"/>
  27. <xsl:apply-templates select="."/>
  28. <xsl:call-template name="generate.css.files"/>
  29. <xsl:call-template name="generate.epub.files"/>
  30. </xsl:template>
  31. <xsl:template name="check.for.xalan">
  32. <xsl:if test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  33. <xsl:message terminate="yes">
  34. <xsl:text>&#10;</xsl:text>
  35. <xsl:text>FATAL ERROR: </xsl:text>
  36. <xsl:text>Xalan processor not supported by DocBook Epub3 stylesheets. </xsl:text>
  37. <xsl:text>Xalan does not properly support XSL output method="text", </xsl:text>
  38. <xsl:text>which is required for the various epub support files.</xsl:text>
  39. </xsl:message>
  40. </xsl:if>
  41. </xsl:template>
  42. </xsl:stylesheet>