From: Robert S. <bob...@us...> - 2004-06-26 23:02:47
|
Update of /cvsroot/docbook/xsl/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20615 Modified Files: chunk-code.xsl Log Message: @fileref now resolves xml:base attributes. Index: chunk-code.xsl =================================================================== RCS file: /cvsroot/docbook/xsl/html/chunk-code.xsl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -U2 -r1.7 -r1.8 --- chunk-code.xsl 13 Jun 2004 07:37:51 -0000 1.7 +++ chunk-code.xsl 26 Jun 2004 23:02:38 -0000 1.8 @@ -970,3 +970,24 @@ <!-- ====================================================================== --> +<!-- Resolve xml:base attributes --> +<xsl:template match="@fileref"> + <!-- need a check for absolute urls --> + <xsl:choose> + <xsl:when test="contains(., ':')"> + <!-- it has a uri scheme so it is an absolute uri --> + <xsl:value-of select="."/> + </xsl:when> + <xsl:otherwise> + <!-- its a relative uri --> + <xsl:call-template name="relative-uri"> + <xsl:with-param name="destdir"> + <xsl:call-template name="dbhtml-dir"> + <xsl:with-param name="context" select=".."/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + </xsl:stylesheet> |