<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dtb="http://www.daisy.org/z3986/2005/dtbook/" xmlns="http://www.daisy.org/z3986/2005/dtbook/" version="1.0" exclude-result-prefixes="dtb"> <xsl:output encoding="utf-8" method="xml" version="1.0" indent="no" doctype-public="-//NISO//DTD dtbook 2005-3//EN" doctype-system="http://www.daisy.org/z3986/2005/dtbook-2005-3.dtd"/> <xsl:template match="dtb:dtbook"> <xsl:copy> <xsl:for-each select="@*"> <xsl:choose> <xsl:when test="local-name()='version'"> <xsl:attribute name="version">2005-3</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="@*|comment()|text()"> <xsl:copy/> </xsl:template> </xsl:stylesheet>