]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Copy the xsl file used by './build.sh prettify' from trunk.
authorjailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 28 Sep 2019 12:34:23 +0000 (12:34 +0000)
committerjailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 28 Sep 2019 12:34:23 +0000 (12:34 +0000)
This allows to use it in the 2.4.x branch to in order to help refresh syntax highlight file.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1867668 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/list_for_prettify.xsl [new file with mode: 0644]

diff --git a/docs/manual/style/xsl/list_for_prettify.xsl b/docs/manual/style/xsl/list_for_prettify.xsl
new file mode 100644 (file)
index 0000000..d7f03cf
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY lf SYSTEM "util/lf.xml">
+]>
+<xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                  xmlns="http://www.w3.org/1999/xhtml">
+
+<!-- Shoud have encoding="ISO-8859-1" but works better without -->
+<xsl:output method="text" indent="no" />
+
+<!-- ==================================================================== -->
+<!-- <modulefilelist>                                                     -->
+<!-- Builds the rewrite map                                               -->
+<!-- ==================================================================== -->
+<xsl:template match="modulefilelist">
+<xsl:text># GENERATED FROM XML -- DO NOT EDIT</xsl:text>&lf;
+<xsl:text>#</xsl:text>&lf;
+<xsl:text># Below is the up-to-date list of existing directives. The list is formatted</xsl:text>&lf;
+<xsl:text># in order to be ready to use for the JS used in prettify.js</xsl:text>&lf;
+&lf;
+<xsl:text># The next line has to be copy/pasted into prettify.js around line 135</xsl:text>&lf;
+<xsl:text># in place of the correponding CONFIG_KEYWORDS array.</xsl:text>&lf;
+&lf;
+
+<xsl:variable name="directives"
+    select="document(modulefile)/modulesynopsis[status!='Obsolete']
+                /directivesynopsis[not(@location)]" />
+
+<xsl:text>  var CONFIG_KEYWORDS = ["</xsl:text>
+<xsl:for-each select="$directives">
+    <!-- Sorting is useless here, but the output is nicer -->
+    <xsl:sort select="name" />
+    <xsl:call-template name="list_directive" />
+</xsl:for-each>
+<xsl:text>"];</xsl:text>
+
+&lf;
+&lf;
+&lf;
+<xsl:text># The next line has to be copy/pasted into prettify.js around line 920</xsl:text>&lf;
+<xsl:text># in place of the correponding PR_TAG array.</xsl:text>&lf;
+&lf;
+
+<xsl:text>        [PR_TAG,     /^\b(</xsl:text>
+<xsl:for-each select="$directives[@type='section']">
+    <!-- Sorting is useless here, but the output is nicer -->
+    <xsl:sort select="name" />
+    <xsl:call-template name="list_section" />
+</xsl:for-each>
+<xsl:text>)\b/, null],</xsl:text>
+
+</xsl:template>
+<!-- /modulefilelist -->
+
+<!-- ==================================================================== -->
+<!-- <list_directive>                                                     -->
+<!-- ==================================================================== -->
+<xsl:template name="list_directive">
+
+    <xsl:if test="position()!=1">
+        <xsl:text>,</xsl:text>
+    </xsl:if>
+
+    <xsl:if test="@type = 'section'"><xsl:text>&lt;</xsl:text></xsl:if>
+    <xsl:value-of select="name" />
+    <xsl:if test="@type = 'section'"><xsl:text>&gt;</xsl:text></xsl:if>
+
+</xsl:template>
+<!-- /list_directive -->
+
+<!-- ==================================================================== -->
+<!-- <list_section>                                                       -->
+<!-- ==================================================================== -->
+<xsl:template name="list_section">
+
+    <xsl:if test="position()!=1">
+        <xsl:text>|</xsl:text>
+    </xsl:if>
+
+    <xsl:value-of select="name" />
+
+</xsl:template>
+<!-- /list_section -->
+
+</xsl:stylesheet>