ignore external references in the sitemap

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563740 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
André Malo
2014-02-02 22:45:11 +00:00
parent ca8364ba2c
commit a6cc3fa3ba
2 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,7 @@
<!-- category/page -->
<!-- ==================================================================== -->
<xsl:template match="category/page">
<xsl:if test="not(starts-with(@href,'http:') or starts-with(@href, 'https:'))">
&li.start;
<!-- document entry, if not href attribute, assume it means "sitemap" -->
@ -168,6 +169,7 @@
<xsl:apply-templates select="self::page" mode="index" />
&li.end; &lf;&tab;
</xsl:if>
</xsl:template>
<!-- /category/page -->

View File

@ -159,6 +159,7 @@
<!-- files referenced in sitemap -->
<!-- ==================================================================== -->
<xsl:template match="category/page">
<xsl:if test="not(starts-with(@href,'http:') or starts-with(@href, 'https:'))">
<xsl:variable name="filename">
<xsl:choose>
<xsl:when test="contains(@href, '#') and substring(@href,
@ -177,6 +178,7 @@
</xsl:variable>
<xsl:value-of select="translate($filename, '/', '\')" />&lf;
</xsl:if>
</xsl:template>
<!-- /page[@href] -->