]> Lady’s Gitweb - CGirls/blob - xslt/documentation.xslt
Drop `assert()´ check in subpath parsing
[CGirls] / xslt / documentation.xslt
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
5 -->
6 <!--
7 ⁌ C·Girls ∷ documentation.xslt
8
9 © 2025 Lady [@ Ladys Computer]
10
11 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
12 If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
13 -->
14 <!DOCTYPE transform [
15 <!ENTITY xhtml 'http://www.w3.org/1999/xhtml'>
16 ]>
17 <transform
18 xmlns="http://www.w3.org/1999/XSL/Transform"
19 xmlns:exsl="http://exslt.org/common"
20 xmlns:html="http://www.w3.org/1999/xhtml"
21 extension-element-prefixes="exsl"
22 version="1.0"
23 >
24 <param name="PROJECT_NAME"/>
25 <param name="TITLE"/>
26 <include href="../LesML/parser.xslt"/>
27 <template match="/">
28 <variable name="result-fragment">
29 <apply-templates/>
30 </variable>
31 <variable name="result" select="exsl:node-set($result-fragment)/*"/>
32 <element name="html" namespace="&xhtml;">
33 <attribute name="lang">
34 <text>en</text>
35 </attribute>
36 <attribute name="xml:lang">
37 <text>en</text>
38 </attribute>
39 <element name="head" namespace="&xhtml;">
40 <element name="title" namespace="&xhtml;">
41 <if test="$TITLE != ''">
42 <value-of select="$TITLE"/>
43 <text> | </text>
44 </if>
45 <value-of select="$PROJECT_NAME"/>
46 <text> Documentation</text>
47 </element>
48 <element name="style" namespace="&xhtml;">
49 <text><![CDATA[@charset "UTF-8";
50 @namespace "http://www.w3.org/1999/xhtml";
51 article{ Box-Sizing: Border-Box; Margin: Auto; Padding-Inline: 2REM; Inline-Size: Min-Content; Max-Inline-Size: 100%; Line-Height: 1.2 }
52 article::after{ Display: Block; Inline-Size: 31REM; Max-Inline-Size: 100%; Min-Inline-Size: 100%; Content: "" }
53 blockquote>pre{ Margin: Auto; Inline-Size: 71CH; Max-Inline-Size: 100%; White-Space: Pre-Wrap }
54 blockquote>pre+pre{ Margin-Top: 1LH }
55 h1,h2,h3{ Margin-Inline: -1REM; Border-Block-End: Thin Solid; Padding-Block: .25EM; Padding-Inline: 1REM; Font-Weight: Inherit }
56 h1{ Font-Size: XX-Large }
57 h2{ Font-Size: X-Large }
58 h3{ Font-Size: Large }
59 hr{ Margin-Inline: -1REM }
60 pre{ Line-Height: 1.8 }
61 code small{ Color: RGB(From CurrentColor R G B / .5); Font-Size: Inherit }
62 code u{ Text-Decoration-Style: Wavy; Text-Decoration-Skip-Ink: None; Text-Decoration-Color: RGB(From CurrentColor R G B / .5); Text-Decoration-Thickness: 1PX; Text-Underline-Position: Under }
63 ]]></text>
64 </element>
65 </element>
66 <element name="body" namespace="&xhtml;">
67 <element name="article" namespace="&xhtml;">
68 <apply-templates select="exsl:node-set($result)//html:div[@class='body']"/>
69 </element>
70 </element>
71 </element>
72 </template>
73 <template match="html:code/html:i[not(@lang)]">
74 <element name="html:var">
75 <apply-templates select="@*|node()"/>
76 </element>
77 </template>
78 <template match="@*|node()" priority="-1">
79 <copy>
80 <apply-templates select="@*|node()"/>
81 </copy>
82 </template>
83 </transform>
This page took 0.346036 seconds and 5 git commands to generate.