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