[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] changes to relative image path generation ?
Bob Stayton wrote: > Hi Stefan, > Are you using XIncludes to assemble your content? If so, then yes I am. > the xml:base attributes that are generated when XIncludes > are processed are likely causing your difficulties. There should > be a parameter to turn off xml:base processing, but it > doesn't exist yet. Oh. I was under the impression that xml:base always defaults to the filename of the current document. My xml chunks all live in the same directory. Is that not the case ? > Until there is, you'll need a small customization to fix your problem. > The pathname remapping is handled by this template > in html/chunk-code.xsl: > > <!-- 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 --> out of curiosity, wouldn't a simple filename starting with '/' also count as 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> > > To turn off the use of the relative-uri template, just use this template > instead: > > <xsl:template match="@fileref"> > <xsl:value-of select="."/> > </xsl:template> looks easy enough ! Thanks, Stefan
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]