VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xsl@ 96300

Last change on this file since 96300 was 96300, checked in by vboxsync, 2 years ago

doc: comment fixing

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
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<!--
33The 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> &lt;varlistentry&gt;
50 &lt;term&gt;</xsl:text><xsl:value-of select="concat(@value,' - ',@name)"/><xsl:text>&lt;/term&gt;
51 &lt;listitem&gt;&lt;para&gt;</xsl:text>
52 <xsl:apply-templates mode="emit"/>
53 <xsl:text>&lt;/para&gt;&lt;/listitem&gt;
54 &lt;/varlistentry&gt;</xsl:text>
55</xsl:template>
56
57<xsl:template match="/">
58 <xsl:text>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
59&lt;!--
60 Manually generated from src/VBox/Main/idl/VirtualBox.xidl by 'kmk dhcpoptions'.
61 DO NOT EDIT!
62--&gt;
63&lt;!--
64Copyright (C) 2019-2022 Oracle Corporation and/or its affiliates.
65
66This file is part of VirtualBox Open Source Edition (OSE), as
67available from https://www.virtualbox.org.
68
69This program is free software; you can redistribute it and/or
70modify it under the terms of the GNU General Public License
71as published by the Free Software Foundation, in version 3 of the
72License.
73
74This program is distributed in the hope that it will be useful, but
75WITHOUT ANY WARRANTY; without even the implied warranty of
76MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
77General Public License for more details.
78
79You should have received a copy of the GNU General Public License
80along with this program; if not, see &lt;https://www.gnu.org/licenses&gt;.
81--&gt;
82
83 &lt;variablelist&gt;
84</xsl:text>
85 <xsl:apply-templates/>
86 <xsl:text>
87 &lt;/variablelist&gt;
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
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette