svg-domain.xsl 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2018 Jarno Elovirta
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  9. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  10. xmlns:opentopic="http://www.idiominc.com/opentopic"
  11. xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
  12. xmlns:ditamsg="http://dita-ot.sourceforge.net/ns/200704/ditamsg"
  13. xmlns:svg="http://www.w3.org/2000/svg"
  14. version="2.0"
  15. exclude-result-prefixes="xs opentopic dita-ot ditamsg">
  16. <xsl:template match="*[contains(@class,' svg-d/svgref ')]">
  17. <xsl:call-template name="image"/>
  18. </xsl:template>
  19. <xsl:template match="*[contains(@class,' svg-d/svg-container ')]">
  20. <xsl:apply-templates/>
  21. </xsl:template>
  22. <xsl:template match="svg:svg">
  23. <fo:instream-foreign-object>
  24. <xsl:copy-of select="."/>
  25. </fo:instream-foreign-object>
  26. </xsl:template>
  27. </xsl:stylesheet>