Date: Thu, 20 Jun 2013 19:39:46 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-user@freebsd.org Subject: svn commit: r41989 - user/gabor/db5 Message-ID: <201306201939.r5KJdkpR048622@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gabor Date: Thu Jun 20 19:39:45 2013 New Revision: 41989 URL: http://svnweb.freebsd.org/changeset/doc/41989 Log: - Add the conversion script that can be used to convert the db5 branch to DocBook 5.0 Sponsored by: The FreeBSD Foundation Added: user/gabor/db5/ user/gabor/db5/Big5.xsl (contents, props changed) user/gabor/db5/GB2312.xsl (contents, props changed) user/gabor/db5/ISO8859-1.xsl (contents, props changed) user/gabor/db5/ISO8859-15.xsl (contents, props changed) user/gabor/db5/ISO8859-2.xsl (contents, props changed) user/gabor/db5/ISO8859-7.xsl (contents, props changed) user/gabor/db5/ISO8859-9.xsl (contents, props changed) user/gabor/db5/KOI8-R.xsl (contents, props changed) user/gabor/db5/README user/gabor/db5/UTF-8.xsl (contents, props changed) user/gabor/db5/db5-upgrade.xsl (contents, props changed) user/gabor/db5/db5upgrade.sh (contents, props changed) user/gabor/db5/eucJP.xsl (contents, props changed) Added: user/gabor/db5/Big5.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/Big5.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="big5" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/GB2312.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/GB2312.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="gb2312" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/ISO8859-1.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/ISO8859-1.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="iso-8859-1" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/ISO8859-15.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/ISO8859-15.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="iso-8859-15" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/ISO8859-2.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/ISO8859-2.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="iso-8859-2" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/ISO8859-7.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/ISO8859-7.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="iso-8859-7" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/ISO8859-9.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/ISO8859-9.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="iso-8859-9" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/KOI8-R.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/KOI8-R.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="koi8-r" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/README Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,14 @@ +This script and the XSLT stylesheets can be used to convert the FreeBSD +documentation set to DocBook 5.0. The main XSLT script is obtained from +the DocBook Project but is heavily customized for FreeBSD. When XSLT +is run on an XML document, entities have to be resolved and the output +will only contain the expanded text. This undesired since we want to keep +entities so some sed magic is used to transform them first. The same +applies to the CDATA sections. With this hack, the script only applies +the minimal changes necessary for the DocBook 5.0 upgrade and keeps +entities, CDATA sections, comments and whitespace. However, some changes +have to be applied manually and this has been done in the db5 branch. +The script can be applied to that branch directly. + +The development of this conversion solution has been sponsored by the +FreeBSD Foundation. Added: user/gabor/db5/UTF-8.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/UTF-8.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<!-- Copyright (c) 2013 The FreeBSD Foundation + All rights reserved. + + This software was developed by Gabor Kovesdan under sponsorship + from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:import href="db5-upgrade.xsl"/> +<xsl:output method="xml" encoding="utf-8" indent="no"/></xsl:stylesheet> Added: user/gabor/db5/db5-upgrade.xsl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/db5/db5-upgrade.xsl Thu Jun 20 19:39:45 2013 (r41989) @@ -0,0 +1,1328 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns:db = "http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + exclude-result-prefixes="exsl db" + version="1.0"> + +<!-- +# ====================================================================== +# This file is part of DocBook V5.0CR5 +# +# Copyright 2005 Norman Walsh, Sun Microsystems, Inc., and the +# Organization for the Advancement of Structured Information +# Standards (OASIS). +# Copyright (c) 2013 The FreeBSD Foundation +# All rights reserved. +# +# Portions of this software were developed by Gabor Kovesdan +# under sponsorship from the FreeBSD Foundation. +# +# Release: $Id: db4-upgrade.xsl 7660 2008-02-06 13:48:36Z nwalsh $ +# +# Permission to use, copy, modify and distribute this stylesheet +# and its accompanying documentation for any purpose and without fee +# is hereby granted in perpetuity, provided that the above copyright +# notice and this paragraph appear in all copies. The copyright +# holders make no representation about the suitability of the schema +# for any purpose. It is provided "as is" without expressed or implied +# warranty. +# +# Please direct all questions, bug reports, or suggestions for changes +# to the docbook@lists.oasis-open.org mailing list. For more +# information, see http://www.oasis-open.org/docbook/. +# +# ====================================================================== +--> + +<xsl:param name="db5.version" select="'5.0'"/> + +<xsl:variable name="version" select="'1.0'"/> + +<xsl:output method="xml" indent="no" omit-xml-declaration="yes"/> + +<xsl:preserve-space elements="*"/> +<xsl:param name="rootid"> + <xsl:choose> + <xsl:when test="/*/@id"> + <xsl:value-of select="/*/@id"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>UNKNOWN</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + +<xsl:param name="defaultDate" select="''"/> + +<xsl:template match="xi:include"> + <xsl:copy-of select="."/> +</xsl:template> + +<xsl:template match="comment()|processing-instruction()" mode="copy"> + <xsl:copy/> + <xsl:text>
</xsl:text> +</xsl:template> + +<xsl:template match="otheraddr|bibliomisc"> + <xsl:choose> + <xsl:when test="not(text()) and ulink"> + <xsl:copy> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="ulink/@url"/> + </xsl:attribute> + <xsl:value-of select="ulink/@url"/> + </xsl:copy> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="username"> + <systemitem class="username"><xsl:apply-templates/></systemitem> +</xsl:template> + +<xsl:template match="groupname"> + <systemitem class="groupname"><xsl:apply-templates/></systemitem> +</xsl:template> + +<xsl:template match="devicename"> + <filename><xsl:apply-templates mode="raw"/></filename> +</xsl:template> + +<!-- +<xsl:template match="username|groupname|hostid"> + <systemitem><xsl:apply-templates/></systemitem> +</xsl:template> +--> + +<xsl:template match="maketarget"> + <buildtarget><xsl:apply-templates/></buildtarget> +</xsl:template> + +<xsl:template match="makevar"> + <varname><xsl:apply-templates/></varname> +</xsl:template> + +<xsl:template match="svnref"> + <revnumber><xsl:apply-templates/></revnumber> +</xsl:template> + +<xsl:template match="filename"> + <xsl:choose> + <xsl:when test="@role = 'package'"> + <package><xsl:apply-templates/></package> + </xsl:when> + <xsl:when test="@role = 'port'"> + <package role="port"><xsl:apply-templates/></package> + </xsl:when> + + <xsl:otherwise> + <filename><xsl:apply-templates mode="raw"/></filename> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="literal|lineannotation|optional|command|userinput|application|systemitem"> + <xsl:copy><xsl:apply-templates mode="raw"/></xsl:copy> +</xsl:template> + +<xsl:template match="co" mode="raw"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="*" mode="raw"> + <xsl:apply-templates mode="raw"/> +</xsl:template> + +<xsl:template match="text()" mode="raw"> + <xsl:copy/> +</xsl:template> + +<xsl:template match="literal"> + <xsl:choose> + <xsl:when test="not(../cmdsynopsis)"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates mode="raw"/> + </xsl:copy> + </xsl:when> + <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="hostid"> + <xsl:choose> + <xsl:when test="@role = 'fqdn'"> + <systemitem class="fqdomainname"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:when test="@role = 'hostname'"> + <systemitem class="fqdomainname"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:when test="@role = 'domainname'"> + <systemitem class="fqdomainname"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:when test="@role = 'netmask'"> + <systemitem class="netmask"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:when test="@role = 'mac'"> + <systemitem class="etheraddress"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:when test="@role = 'ipaddr'"> + <systemitem class="ipaddress"><xsl:apply-templates/></systemitem> + </xsl:when> + <xsl:otherwise> + <systemitem><xsl:apply-templates/></systemitem> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- +<xsl:template match="preface|colophon|appendix"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> +--> + +<xsl:template match="*" mode="info"> + <xsl:apply-templates select="."/> +</xsl:template> + +<xsl:template match="title|titleabbrev|subtitle" mode="info"/> + +<xsl:template match="title|titleabbrev|subtitle"> + <xsl:if test="not(preceding-sibling::sect1info or preceding-sibling::sect2info or preceding-sibling::sect3info or preceding-sibling::sect4info or preceding-sibling::chapterinfo)"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </xsl:copy> + </xsl:if> +</xsl:template> + +<xsl:template match="/"> + <xsl:variable name="converted"> + <xsl:apply-templates/> + </xsl:variable> + <xsl:apply-templates select="/comment()"/> + <xsl:apply-templates select="exsl:node-set($converted)/*" mode="addNS"/> +</xsl:template> + +<xsl:template match="bookinfo|chapterinfo|articleinfo|artheader|appendixinfo + |blockinfo + |bibliographyinfo|glossaryinfo|indexinfo|setinfo + |setindexinfo + |sect1info|sect2info|sect3info|sect4info|sect5info + |sectioninfo + |refsect1info|refsect2info|refsect3info|refsectioninfo + |referenceinfo|partinfo + |objectinfo|prefaceinfo|refsynopsisdivinfo + |screeninfo|sidebarinfo" + priority="200"> + <info> + <xsl:if test="../title"> + <xsl:apply-templates select="../title"/> + </xsl:if> + <xsl:if test="../titleabbrev"> + <xsl:apply-templates select="../titleabbrev"/> + </xsl:if> + <xsl:if test="../subtitle"> + <xsl:apply-templates select="../subtitle"/> + </xsl:if> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates mode="info"/> + </info> +</xsl:template> + +<xsl:template match="refentryinfo" + priority="200"> + <info> + <xsl:call-template name="copy.attributes"/> + + <!-- titles can be inside or outside or both. fix that --> + <xsl:if test="title"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Discarding title from refentryinfo!</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="titleabbrev"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Discarding titleabbrev from refentryinfo!</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:if test="subtitle"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Discarding subtitle from refentryinfo!</xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:apply-templates/> + </info> +</xsl:template> + +<xsl:template match="refmiscinfo" + priority="200"> + <refmiscinfo> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'class'"/> + </xsl:call-template> + <xsl:if test="@class"> + <xsl:choose> + <xsl:when test="@class = 'source' + or @class = 'version' + or @class = 'manual' + or @class = 'sectdesc' + or @class = 'software'"> + <xsl:attribute name="class"> + <xsl:value-of select="@class"/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="class"> + <xsl:value-of select="'other'"/> + </xsl:attribute> + <xsl:attribute name="otherclass"> + <xsl:value-of select="@class"/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + <xsl:apply-templates/> + </refmiscinfo> +</xsl:template> + +<xsl:template match="corpauthor" priority="200"> + <author> + <xsl:call-template name="copy.attributes"/> + <orgname> + <xsl:apply-templates/> + </orgname> + </author> +</xsl:template> + +<xsl:template match="corpname" priority="200"> + <orgname> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </orgname> +</xsl:template> + +<xsl:template match="author[not(personname)]|editor[not(personname)]|othercredit[not(personname)]" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <personname> + <xsl:apply-templates select="honorific|firstname|surname|othername|lineage"/> + </personname> + <xsl:apply-templates select="*[not(self::honorific|self::firstname|self::surname + |self::othername|self::lineage)]"/> + </xsl:copy> +</xsl:template> + +<xsl:template match="address|programlisting|screen|funcsynopsisinfo + |classsynopsisinfo" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'format'"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<!-- Suppress attributes with default values (i.e., added implicitly by DTD) --> +<xsl:template match="productname" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress.default" select="'class=trade'"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="orderedlist" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress.default" select="'inheritnum=ignore continuation=restarts'"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="literallayout" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'format'"/><!-- Dropped entirely in DB5 --> + <xsl:with-param name="suppress.default" select="'class=normal'"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="equation" priority="200"> + <xsl:choose> + <xsl:when test="not(title)"> + <xsl:call-template name="emit-message"> + <xsl:with-param + name="message" + >Convert equation without title to informal equation.</xsl:with-param> + </xsl:call-template> + <informalequation> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </informalequation> + </xsl:when> + <xsl:otherwise> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </xsl:copy> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="imagedata|videodata|audiodata|textdata" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'srccredit'"/> + </xsl:call-template> + <xsl:if test="@srccredit"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Check conversion of srccredit </xsl:text> + <xsl:text>(othercredit="srccredit").</xsl:text> + </xsl:with-param> + </xsl:call-template> + <info> + <othercredit class="other" otherclass="srccredit"> + <orgname>???</orgname> + <contrib> + <xsl:value-of select="@srccredit"/> + </contrib> + </othercredit> + </info> + </xsl:if> + </xsl:copy> +</xsl:template> + +<xsl:template match="sgmltag" priority="200"> + <tag> + <xsl:call-template name="copy.attributes"/> + <xsl:if test="@class = 'sgmlcomment'"> + <xsl:attribute name="class">comment</xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </tag> +</xsl:template> + +<xsl:template match="inlinegraphic[@format='linespecific']" priority="210"> + <textobject> + <textdata> + <xsl:call-template name="copy.attributes"/> + </textdata> + </textobject> +</xsl:template> + +<xsl:template match="inlinegraphic" priority="200"> + <inlinemediaobject> + <imageobject> + <imagedata> + <xsl:call-template name="copy.attributes"/> + </imagedata> + </imageobject> + </inlinemediaobject> +</xsl:template> + +<xsl:template match="graphic[@format='linespecific']" priority="210"> + <mediaobject> + <textobject> + <textdata> + <xsl:call-template name="copy.attributes"/> + </textdata> + </textobject> + </mediaobject> +</xsl:template> + +<xsl:template match="graphic" priority="200"> + <mediaobject> + <imageobject> + <imagedata> + <xsl:call-template name="copy.attributes"/> + </imagedata> + </imageobject> + </mediaobject> +</xsl:template> + +<xsl:template match="pubsnumber" priority="200"> + <biblioid class="pubsnumber"> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </biblioid> +</xsl:template> + +<xsl:template match="invpartnumber" priority="200"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Converting invpartnumber to biblioid otherclass="invpartnumber".</xsl:text> + </xsl:with-param> + </xsl:call-template> + <biblioid class="other" otherclass="invpartnumber"> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </biblioid> +</xsl:template> + +<xsl:template match="contractsponsor" priority="200"> + <xsl:variable name="contractnum" + select="preceding-sibling::contractnum|following-sibling::contractnum"/> + + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Converting contractsponsor to othercredit="contractsponsor".</xsl:text> + </xsl:with-param> + </xsl:call-template> + + <othercredit class="other" otherclass="contractsponsor"> + <orgname> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </orgname> + <xsl:for-each select="$contractnum"> + <contrib role="contractnum"> + <xsl:apply-templates select="node()"/> + </contrib> + </xsl:for-each> + </othercredit> +</xsl:template> + +<xsl:template match="contractnum" priority="200"> + <xsl:if test="not(preceding-sibling::contractsponsor + |following-sibling::contractsponsor) + and not(preceding-sibling::contractnum)"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Converting contractnum to othercredit="contractnum".</xsl:text> + </xsl:with-param> + </xsl:call-template> + + <othercredit class="other" otherclass="contractnum"> + <orgname>???</orgname> + <xsl:for-each select="self::contractnum + |preceding-sibling::contractnum + |following-sibling::contractnum"> + <contrib> + <xsl:apply-templates select="node()"/> + </contrib> + </xsl:for-each> + </othercredit> + </xsl:if> +</xsl:template> + +<xsl:template match="isbn|issn" priority="200"> + <biblioid class="{local-name(.)}"> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </biblioid> +</xsl:template> + +<xsl:template match="biblioid[count(*) = 1 + and ulink + and normalize-space(text()) = '']" priority="200"> + <biblioid xlink:href="{ulink/@url}"> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates select="ulink/node()"/> + </biblioid> +</xsl:template> + +<xsl:template match="authorblurb" priority="200"> + <personblurb> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </personblurb> +</xsl:template> + +<xsl:template match="collab" priority="200"> + <othercredit class="translator"> + <xsl:call-template name="copy.attributes"/> + <xsl:value-of select="collabname"/> + </othercredit> +</xsl:template> + +<xsl:template match="modespec" priority="200"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Discarding modespec (</xsl:text> + <xsl:value-of select="."/> + <xsl:text>).</xsl:text> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<xsl:template match="mediaobjectco" priority="200"> + <mediaobject> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </mediaobject> +</xsl:template> + +<xsl:template match="biblioentry/title + |bibliomset/title + |biblioset/title + |bibliomixed/title" priority="400"> + <citetitle> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </citetitle> +</xsl:template> + +<xsl:template match="biblioentry/titleabbrev|biblioentry/subtitle + |bibliomset/titleabbrev|bibliomset/subtitle + |biblioset/titleabbrev|biblioset/subtitle + |bibliomixed/titleabbrev|bibliomixed/subtitle" + priority="400"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="biblioentry/contrib + |bibliomset/contrib + |bibliomixed/contrib" priority="200"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Check conversion of contrib </xsl:text> + <xsl:text>(othercontrib="contrib").</xsl:text> + </xsl:with-param> + </xsl:call-template> + <othercredit class="other" otherclass="contrib"> + <orgname>???</orgname> + <contrib> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </contrib> + </othercredit> +</xsl:template> + +<xsl:template match="link" priority="200"> + <xsl:copy> + <xsl:call-template name="copy.attributes"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +<xsl:template match="ulink" priority="200"> + <xsl:choose> + <xsl:when test="node()"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Converting ulink to link.</xsl:text> + </xsl:with-param> + </xsl:call-template> + + <link xlink:href="{@url}"> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'url'"/> + </xsl:call-template> + <xsl:apply-templates/> + </link> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> + <xsl:text>Converting ulink to uri.</xsl:text> + </xsl:with-param> + </xsl:call-template> + + <uri xlink:href="{@url}"> + <xsl:call-template name="copy.attributes"> + <xsl:with-param name="suppress" select="'url'"/> + </xsl:call-template> + <xsl:value-of select="@url"/> + </uri> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="olink" priority="200"> + <xsl:if test="@linkmode"> + <xsl:call-template name="emit-message"> + <xsl:with-param name="message"> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306201939.r5KJdkpR048622>