VirtualBox

source: vbox/trunk/doc/manual/refsect2_replace.xsl@ 99569

Last change on this file since 99569 was 98672, checked in by vboxsync, 22 months ago

Docs: bugref:10302. Splitting the xslt script as xref scope stuff should be a postprocssing coming after docbook2dita conversion.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1<!--
2 refsect2_replace.xsl:
3 - Replaces refsect2 elements with corresponding refsect1. It looks
4 like dita does not like nested refsect sections. So we flat them out.
5-->
6<!--
7 Copyright (C) 2006-2023 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<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
28 <xsl:output encoding="UTF-8" method="xml" omit-xml-declaration="no" indent="yes" />
29 <xsl:output doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"/>
30
31 <xsl:template match="refsect2">
32 <xsl:element name="refsect1">
33 <xsl:for-each select="@*">
34 <xsl:attribute name="{name()}">
35 <xsl:value-of select="." />
36 </xsl:attribute>
37 </xsl:for-each>
38 <xsl:copy-of select="node()"/>
39 </xsl:element>
40 </xsl:template>
41
42 <xsl:template match="node()|@*">
43 <xsl:copy>
44 <xsl:apply-templates select="node()|@*"/>
45 </xsl:copy>
46 </xsl:template>
47</xsl:stylesheet>
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