maplink-plugin.xsl 1.2 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0"?>
  2. <!-- This file is part of the DITA Open Toolkit project hosted on
  3. Sourceforge.net. See the accompanying license.txt file for
  4. applicable licenses.-->
  5. <!--
  6. | (C) Copyright IBM Corporation 2006. All Rights Reserved.
  7. *-->
  8. <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  9. <xsl:template match="/*[contains(@class,' eclipsemap/plugin ')][*[(contains(@class,'
  10. eclipsemap/primarytocref ') or contains(@class,' eclipsemap/tocref ')) and @format='ditamap']]">
  11. <mapcollection>
  12. <xsl:for-each select="*[contains(@class,' eclipsemap/primarytocref ') or contains(@class,' eclipsemap/tocref ')]">
  13. <xsl:if test="@format='ditamap' and not(@linking='none')">
  14. <xsl:apply-templates select="document(@href,/)/*[contains(@class, ' map/map ')]/*">
  15. <xsl:with-param name="pathFromMaplist">
  16. <xsl:call-template name="getRelativePath"><xsl:with-param name="filename" select="@href"/></xsl:call-template>
  17. </xsl:with-param>
  18. </xsl:apply-templates>
  19. </xsl:if>
  20. </xsl:for-each>
  21. </mapcollection>
  22. </xsl:template>
  23. </xsl:stylesheet>