relrem.xsl.in 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:template match="node()">
  4. <xsl:copy>
  5. <xsl:copy-of select="@*"/>
  6. <xsl:apply-templates select="node()"/>
  7. </xsl:copy>
  8. </xsl:template>
  9. <xsl:template match="@ROOT@">
  10. <book xml:base="@DOC_IMAGES@">
  11. <xsl:copy-of select="@*[name(.)!='xml:base']"/>
  12. <xsl:apply-templates select="node()"/>
  13. </book>
  14. </xsl:template>
  15. <xsl:template match="*[name() = 'xi:include']">
  16. <xsl:if test="not(contains(@href,'Version'))">
  17. <xsl:copy>
  18. <xsl:copy-of select="@*"/>
  19. <xsl:apply-templates select="node()"/>
  20. </xsl:copy>
  21. </xsl:if>
  22. <xsl:if test="contains(@href,'Version')">
  23. <xi:include xml:base="@VERSION_DIR@/" xmlns:xi="http://www.w3.org/2001/XInclude">
  24. <xsl:copy-of select="@*"/>
  25. <xsl:apply-templates select="node()"/>
  26. </xi:include>
  27. </xsl:if>
  28. </xsl:template>
  29. </xsl:stylesheet>