1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 | Stylesheet that extracts the DHCP option descriptions from
|
---|
4 | VirtualBox.xidl for cut & paste into man_VBoxManage-dhcpserver.xml.
|
---|
5 | -->
|
---|
6 | <!--
|
---|
7 | Copyright (C) 2019-2024 Oracle and/or its affiliates.
|
---|
8 |
|
---|
9 | This file is part of VirtualBox base platform packages, as
|
---|
10 | available from https://www.virtualbox.org.
|
---|
11 |
|
---|
12 | This program is free software; you can redistribute it and/or
|
---|
13 | modify it under the terms of the GNU General Public License
|
---|
14 | as published by the Free Software Foundation, in version 3 of the
|
---|
15 | License.
|
---|
16 |
|
---|
17 | This program is distributed in the hope that it will be useful, but
|
---|
18 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | General Public License for more details.
|
---|
21 |
|
---|
22 | You should have received a copy of the GNU General Public License
|
---|
23 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 |
|
---|
25 | SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | -->
|
---|
27 |
|
---|
28 | <xsl:stylesheet
|
---|
29 | version="1.0"
|
---|
30 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
31 | >
|
---|
32 |
|
---|
33 | <xsl:output method="text" version="1.0" encoding="utf-8" indent="yes"/>
|
---|
34 | <xsl:strip-space elements="*"/>
|
---|
35 |
|
---|
36 |
|
---|
37 | <!-- Default operation is to suppress output -->
|
---|
38 | <xsl:template match="node()|@*">
|
---|
39 | <xsl:apply-templates/>
|
---|
40 | </xsl:template>
|
---|
41 |
|
---|
42 | <!--
|
---|
43 | The work.
|
---|
44 | -->
|
---|
45 | <xsl:template mode="emit" match="link[@to='IDHCPServer::networkMask']">
|
---|
46 | <xsl:text>the value of the --netmask option</xsl:text>
|
---|
47 | </xsl:template>
|
---|
48 |
|
---|
49 | <xsl:template mode="emit" match="link[@to='DHCPOptionEncoding::Hex']">
|
---|
50 | <xsl:text>--set-opt-hex</xsl:text>
|
---|
51 | </xsl:template>
|
---|
52 |
|
---|
53 | <xsl:template match="desc" mode="emit">
|
---|
54 | <xsl:apply-templates mode="emit"/>
|
---|
55 | </xsl:template>
|
---|
56 |
|
---|
57 | <xsl:template match="/idl/library/application/enum[@name='DHCPOption']/const">
|
---|
58 | <!-- <xsl:message><xsl:text>debug: </xsl:text><xsl:call-template name="get-node-path"/></xsl:message> -->
|
---|
59 | <xsl:text> <varlistentry>
|
---|
60 | <term></xsl:text><xsl:value-of select="concat(@value,' - ',@name)"/><xsl:text></term>
|
---|
61 | <listitem><para></xsl:text>
|
---|
62 | <xsl:apply-templates mode="emit"/>
|
---|
63 | <xsl:text></para></listitem>
|
---|
64 | </varlistentry></xsl:text>
|
---|
65 | </xsl:template>
|
---|
66 |
|
---|
67 | <xsl:template match="/">
|
---|
68 | <xsl:text><?xml version="1.0" encoding="UTF-8"?>
|
---|
69 | <!--
|
---|
70 | Manually generated from src/VBox/Main/idl/VirtualBox.xidl by 'kmk dhcpoptions'.
|
---|
71 | DO NOT EDIT!
|
---|
72 | -->
|
---|
73 | <!--
|
---|
74 | Copyright (C) 2019-2023 Oracle Corporation and/or its affiliates.
|
---|
75 |
|
---|
76 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
77 | available from https://www.virtualbox.org.
|
---|
78 |
|
---|
79 | This program is free software; you can redistribute it and/or
|
---|
80 | modify it under the terms of the GNU General Public License
|
---|
81 | as published by the Free Software Foundation, in version 3 of the
|
---|
82 | License.
|
---|
83 |
|
---|
84 | This program is distributed in the hope that it will be useful, but
|
---|
85 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
86 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
87 | General Public License for more details.
|
---|
88 |
|
---|
89 | You should have received a copy of the GNU General Public License
|
---|
90 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
91 | -->
|
---|
92 |
|
---|
93 | <variablelist>
|
---|
94 | </xsl:text>
|
---|
95 | <xsl:apply-templates/>
|
---|
96 | <xsl:text>
|
---|
97 | </variablelist>
|
---|
98 | </xsl:text>
|
---|
99 | </xsl:template>
|
---|
100 |
|
---|
101 |
|
---|
102 | <!--
|
---|
103 | Debug/Diagnostics: Return the path to the specified node (by default the current).
|
---|
104 | -->
|
---|
105 | <xsl:template name="get-node-path">
|
---|
106 | <xsl:param name="Node" select="."/>
|
---|
107 | <xsl:for-each select="$Node">
|
---|
108 | <xsl:for-each select="ancestor-or-self::node()">
|
---|
109 | <xsl:choose>
|
---|
110 | <xsl:when test="name(.) = ''">
|
---|
111 | <xsl:text>text()</xsl:text>
|
---|
112 | </xsl:when>
|
---|
113 | <xsl:otherwise>
|
---|
114 | <xsl:value-of select="concat('/', name(.))"/>
|
---|
115 | <xsl:choose>
|
---|
116 | <xsl:when test="@id">
|
---|
117 | <xsl:text>[@id=</xsl:text>
|
---|
118 | <xsl:value-of select="@id"/>
|
---|
119 | <xsl:text>]</xsl:text>
|
---|
120 | </xsl:when>
|
---|
121 | <xsl:when test="position() > 1">
|
---|
122 | <xsl:text>[</xsl:text><xsl:value-of select="position()"/><xsl:text>]</xsl:text>
|
---|
123 | </xsl:when>
|
---|
124 | </xsl:choose>
|
---|
125 | </xsl:otherwise>
|
---|
126 | </xsl:choose>
|
---|
127 | </xsl:for-each>
|
---|
128 | </xsl:for-each>
|
---|
129 | </xsl:template>
|
---|
130 |
|
---|
131 | </xsl:stylesheet>
|
---|
132 |
|
---|