[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] profile-chunk.xsl and absolute URIs in referenced images
Hi Jirka, Thanks very much for help. Everything works fine now. Pavel Škopík -----Original Message----- From: Jirka Kosek [mailto:jirka@kosek.cz] Sent: Friday, June 16, 2006 2:41 PM To: Skopik Pavel Cc: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] profile-chunk.xsl and absolute URIs in referenced images Skopik Pavel wrote: > I started to use XSL 1.70.1 and tried to generate HTML with profiling turned on. In my customization file I import the "profile-chunk.xsl" file. After the transformation is finished all images in the HTML ouput are referenced with absolute URIs which is not very convenient when you want to move move the whole directory with the results elswehere. I tried to use "keep.relative.image.uris" parameter but it did not help either. Also I did not experience this behaviour in the previous verison of the Docbook XSL stylesheets. > > Could anyone point me to the right direction, please? Add following into your customization layer: <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:when test="$keep.relative.image.uris != 0"> <!-- leave it alone --> <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> This fix is already commited into code base and will be part of the next release. Unfortunatelly snapshot build system seems not to work right now, so you must fix stylesheets manually until there is newer release. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Podívejte se na náš nově spuštěný web http://DocBook.cz Podrobný přehled školení http://xmlguru.cz/skoleni/ ------------------------------------------------------------------ Nejbližší termíny školení: ** DocBook 15.-17.5.2006 ** XSL-FO 12.-13.6.2006 ** ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 ** ------------------------------------------------------------------ http://xmlguru.cz Blog mostly about XML for English readers ------------------------------------------------------------------
BEGIN:VCARD VERSION:2.1 N:Skopik;Pavel FN:Skopik Pavel ADR;WORK:;Korenskeho 7 LABEL;WORK:Korenskeho 7 EMAIL;PREF;INTERNET:Pavel.Skopik@aipsafe.cz REV:20060503T111529Z END:VCARD
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]