From: Robert S. <bob...@us...> - 2006-05-06 07:32:58
|
Update of /cvsroot/docbook/xsl/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7587 Modified Files: graphics.xsl Log Message: Fixed bug #1436121 problems with default.graphic.extension. Moved test for $keep.relative.image.uris to the template that matches on @fileref so all such processing is in the same place. Index: graphics.xsl =================================================================== RCS file: /cvsroot/docbook/xsl/html/graphics.xsl,v retrieving revision 1.59 retrieving revision 1.60 diff -u -U2 -r1.59 -r1.60 --- graphics.xsl 21 Apr 2006 16:12:15 -0000 1.59 +++ graphics.xsl 6 May 2006 07:32:55 -0000 1.60 @@ -237,26 +237,8 @@ <xsl:value-of select="$filename"/> </xsl:when> - <xsl:when test="$keep.relative.image.uris != 0"> - <!-- This works sometimes, but needs to take into account - 1. When there is no /*/@xml:base - 2. When the chunks are going somewhere else - <xsl:variable name="relpath"> - <xsl:call-template name="relative-uri"> - <xsl:with-param name="filename" select="@fileref"/> - </xsl:call-template> - </xsl:variable> - - <xsl:choose> - <xsl:when test="/*/@xml:base - and starts-with($relpath,/*/@xml:base)"> - <xsl:value-of select="substring-after($relpath,/*/@xml:base)"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="@fileref"/> - </xsl:otherwise> - </xsl:choose> - --> - <xsl:value-of select="@fileref"/> - </xsl:when> + <!-- + Moved test for $keep.relative.image.uris to template below: + <xsl:template match="@fileref"> + --> <xsl:otherwise> <xsl:value-of select="$filename"/> @@ -1413,4 +1395,26 @@ </xsl:template> + +<!-- The following works sometimes, but needs to take into account + 1. When there is no /*/@xml:base + 2. When the chunks are going somewhere else +<xsl:variable name="relpath"> + <xsl:call-template name="relative-uri"> + <xsl:with-param name="filename" select="@fileref"/> + </xsl:call-template> +</xsl:variable> + +<xsl:choose> + <xsl:when test="/*/@xml:base + and starts-with($relpath,/*/@xml:base)"> + <xsl:value-of select="substring-after($relpath,/*/@xml:base)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@fileref"/> + </xsl:otherwise> +</xsl:choose> +<xsl:value-of select="@fileref"/> + </xsl:when> +--> <!-- Resolve xml:base attributes --> <xsl:template match="@fileref"> @@ -1421,6 +1425,10 @@ <xsl:value-of select="."/> </xsl:when> + <xsl:when test="$keep.relative.image.uris != 0"> + <!-- leave it alone --> + <xsl:value-of select="."/> + </xsl:when> <xsl:otherwise> - <!-- its a relative uri --> + <!-- its a relative uri that needs xml:base processing --> <xsl:call-template name="relative-uri"> </xsl:call-template> |