4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
20 <!DOCTYPE xsl:stylesheet [
21 <!ENTITY lf SYSTEM "util/lf.xml">
23 <xsl:stylesheet version="1.0"
24 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25 xmlns="http://www.w3.org/1999/xhtml">
27 <xsl:output method="text" encoding="ISO-8859-1" indent="no" />
29 <!-- ==================================================================== -->
30 <!-- <modulefilelist> -->
31 <!-- Builds the rewrite map -->
32 <!-- ==================================================================== -->
33 <xsl:template match="modulefilelist">
34 <xsl:text># GENERATED FROM XML -- DO NOT EDIT</xsl:text>&lf;
35 <xsl:text>#</xsl:text>&lf;
36 <xsl:text># Below is the up-to-date list of existing directives. The list is formatted</xsl:text>&lf;
37 <xsl:text># in order to be ready to use for the JS used in prettify.js</xsl:text>&lf;
39 <xsl:text># The next line has to be copy/pasted into prettify.js around line 135</xsl:text>&lf;
40 <xsl:text># in place of the correponding CONFIG_KEYWORDS array.</xsl:text>&lf;
43 <xsl:variable name="directives"
44 select="document(modulefile)/modulesynopsis[status!='Obsolete']
45 /directivesynopsis[not(@location)]" />
47 <xsl:text> var CONFIG_KEYWORDS = ["</xsl:text>
48 <xsl:for-each select="$directives">
49 <!-- Sorting is useless here, but the output is nicer -->
50 <xsl:sort select="name" />
51 <xsl:call-template name="list_directive" />
53 <xsl:text>"];</xsl:text>
58 <xsl:text># The next line has to be copy/pasted into prettify.js around line 920</xsl:text>&lf;
59 <xsl:text># in place of the correponding PR_TAG array.</xsl:text>&lf;
62 <xsl:text> [PR_TAG, /^\b(</xsl:text>
63 <xsl:for-each select="$directives[@type='section']">
64 <!-- Sorting is useless here, but the output is nicer -->
65 <xsl:sort select="name" />
66 <xsl:call-template name="list_section" />
68 <xsl:text>)\b/, null],</xsl:text>
71 <!-- /modulefilelist -->
73 <!-- ==================================================================== -->
74 <!-- <list_directive> -->
75 <!-- ==================================================================== -->
76 <xsl:template name="list_directive">
78 <xsl:if test="position()!=1">
79 <xsl:text>,</xsl:text>
82 <xsl:if test="@type = 'section'"><xsl:text><</xsl:text></xsl:if>
83 <xsl:value-of select="name" />
84 <xsl:if test="@type = 'section'"><xsl:text>></xsl:text></xsl:if>
87 <!-- /list_directive -->
89 <!-- ==================================================================== -->
90 <!-- <list_section> -->
91 <!-- ==================================================================== -->
92 <xsl:template name="list_section">
94 <xsl:if test="position()!=1">
95 <xsl:text>|</xsl:text>
98 <xsl:value-of select="name" />
101 <!-- /list_section -->