[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/3] docs: fix 404 page when fetched from different location



On 08/09/2012 08:17 AM, Martin Kletzander wrote:
> Error 404 page had relative paths specified for both the image and
> stylesheets which caused a problem when requested URL included a
> subfolder (e.g. http://libvirt.org/asdf/asdf ). This patch corrects
> this behaviour by modifying href_base to '/' and changing the src of
> the image.
> ---
>  docs/404.html.in |    2 +-
>  docs/site.xsl    |   11 ++++++++++-
>  2 files changed, 11 insertions(+), 2 deletions(-)

I'm no xsl expert, but

> -  <xsl:variable name="href_base" select="''"/>
> +  <xsl:variable name="href_base">
> +    <xsl:choose>
> +      <xsl:when test="$pagename = '404.html'">
> +        <xsl:value-of select="'/'"/>
> +      </xsl:when>
> +      <xsl:otherwise>
> +        <xsl:value-of select="''"/>
> +      </xsl:otherwise>
> +    </xsl:choose>
> +  </xsl:variable>

this reads pretty straightforward, so I'm okay giving:

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]