mirror of
https://github.com/apache/httpd.git
synced 2025-07-25 17:01:22 +00:00
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:
@ -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 -->
|
||||
|
||||
|
@ -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] -->
|
||||
|
||||
|
Reference in New Issue
Block a user