Index: user/gabor/db5/Big5.xsl =================================================================== --- user/gabor/db5/Big5.xsl (nonexistent) +++ user/gabor/db5/Big5.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/Big5.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/GB2312.xsl =================================================================== --- user/gabor/db5/GB2312.xsl (nonexistent) +++ user/gabor/db5/GB2312.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/GB2312.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/ISO8859-1.xsl =================================================================== --- user/gabor/db5/ISO8859-1.xsl (nonexistent) +++ user/gabor/db5/ISO8859-1.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/ISO8859-1.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/ISO8859-15.xsl =================================================================== --- user/gabor/db5/ISO8859-15.xsl (nonexistent) +++ user/gabor/db5/ISO8859-15.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/ISO8859-15.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/ISO8859-2.xsl =================================================================== --- user/gabor/db5/ISO8859-2.xsl (nonexistent) +++ user/gabor/db5/ISO8859-2.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/ISO8859-2.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/ISO8859-7.xsl =================================================================== --- user/gabor/db5/ISO8859-7.xsl (nonexistent) +++ user/gabor/db5/ISO8859-7.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/ISO8859-7.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/ISO8859-9.xsl =================================================================== --- user/gabor/db5/ISO8859-9.xsl (nonexistent) +++ user/gabor/db5/ISO8859-9.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/ISO8859-9.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/KOI8-R.xsl =================================================================== --- user/gabor/db5/KOI8-R.xsl (nonexistent) +++ user/gabor/db5/KOI8-R.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/KOI8-R.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/README =================================================================== --- user/gabor/db5/README (nonexistent) +++ user/gabor/db5/README (revision 41989) @@ -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. Index: user/gabor/db5/UTF-8.xsl =================================================================== --- user/gabor/db5/UTF-8.xsl (nonexistent) +++ user/gabor/db5/UTF-8.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/UTF-8.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/db5-upgrade.xsl =================================================================== --- user/gabor/db5/db5-upgrade.xsl (nonexistent) +++ user/gabor/db5/db5-upgrade.xsl (revision 41989) @@ -0,0 +1,1328 @@ + + + + + + + + + + + + + + + + + + + UNKNOWN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Discarding title from refentryinfo! + + + + + + + + Discarding titleabbrev from refentryinfo! + + + + + + + + Discarding subtitle from refentryinfo! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convert equation without title to informal equation. + + + + + + + + + + + + + + + + + + + + + + + + Check conversion of srccredit + (othercredit="srccredit"). + + + + + ??? + + + + + + + + + + + + + + comment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Converting invpartnumber to biblioid otherclass="invpartnumber". + + + + + + + + + + + + + + Converting contractsponsor to othercredit="contractsponsor". + + + + + + + + + + + + + + + + + + + + + Converting contractnum to othercredit="contractnum". + + + + + ??? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Discarding modespec ( + + ). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Check conversion of contrib + (othercontrib="contrib"). + + + + ??? + + + + + + + + + + + + + + + + + + + + Converting ulink to link. + + + + + + + + + + + + + + Converting ulink to uri. + + + + + + + + + + + + + + + + + + Discarding linkmode on olink. + + + + + + + + + Converting olink targetdocent to targetdoc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -01- + + + + + -02- + + + + + -03- + + + + + -04- + + + + + -05- + + + + + -06- + + + + + -07- + + + + + -08- + + + + + -09- + + + + + -10- + + + + + -11- + + + + + -12- + + + + + + + + + + + + -01- + + + + + -02- + + + + + -03- + + + + + -04- + + + + + -05- + + + + + -06- + + + + + -07- + + + + + -08- + + + + + -09- + + + + + -10- + + + + + -11- + + + + + -12- + + + + + + + + + + + + + + + + + + Converted + + into + + for + + + + + + + + + + + + + + Unparseable date: + + in + + (Using default: + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + significance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + beginpage pagenum= + + + Replacing beginpage with comment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + this-value-never-matches + + + + + + + + + + + + Discarding moreinfo on + + + + + + + + + + + + + + + + + + + + + + Discarding float on + + + + + + + Adding floatstyle='normal' on + + + + + normal + + + + + + + Discarding float on + + + + + + + + Discarding float on + + + + + + + Adding floatstyle=' + + ' on + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Converting refmiscinfo@role=type to + @class=other,otherclass=type + + + other + type + + + + + + + + + + + + + + + + + + http://www.w3.org/1999/xlink + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( + + ) + + + + Property changes on: user/gabor/db5/db5-upgrade.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property Index: user/gabor/db5/db5upgrade.sh =================================================================== --- user/gabor/db5/db5upgrade.sh (nonexistent) +++ user/gabor/db5/db5upgrade.sh (revision 41989) @@ -0,0 +1,54 @@ +#!/bin/sh +# +# 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. +# + +PWD=`pwd` +for f in `find $PWD -type f | grep -e 'glossary.ent$' -e 'pmake/legalnotice.xml$' -e 'contrib\.[^/]*.xml$' -e 'glossary.xml$' -e 'article.xml$' -e 'book.xml$' -e 'chapter.xml$' -e 'preface.xml$' -e 'colophon.xml$' -e 'appendix.xml$' | grep -ve zh_TW.Big5/books/faq/book.xml -e ru_RU.KOI8-R/books/fdp-primer -e ru_RU.KOI8-R/books/arch-handbook -e ru_RU.KOI8-R/books/developers-handbook -e ja_JP.eucJP/books/fdp-primer -e no_NO.ISO8859-1 -e htdocs`; do + cd `dirname $f` + ENC=`echo $f | sed 's|.*/\([a-z][a-z]_[A-Z][A-Z]\.\)\([-a-zA-Z0-9]*\)/.*|\2|'` + if [ ! -f ${ENC}.xsl ]; then + XSLT=ISO8859-1.xsl + else + XSLT=${ENC}.xsl + fi + sed -e 's|&\([^;]*\);|{{{\1}}}|g' -e 's||CDATA-->|g' -e 's|+--- |%%%1%%%|g' $f > tmp.xml + xsltproc --novalid ${XSLT} tmp.xml > tmp2.xml + LNUM=`head -n 100 tmp.xml | grep -n -m 1 -e '^]>$' -e 'freebsd45.dtd">$' | grep -o '^[0-9]*'` + if [ -n "${LNUM}" ]; then + head -n ${LNUM} tmp.xml | sed -e "s|||g" -e 's|||g' > header.tmp + else + grep -e '^ header.tmp + fi + grep -e '^ tmp3.xml + sed -e 's|XLINKNS|xmlns:xlink|g' tmp2.xml >> tmp3.xml + env XML_CATALOG_FILES="catalog-cwd.xml ../../share/xml/catalog.xml ../../../share/xml/catalog.xml ../../../share/xml/catalog-common.xml /usr/local/share/xml/catalog" /usr/local/bin/xmllint --nsclean tmp3.xml >tmp4.xml + sed -e 's|{{{\([^\}]*\)}}}|\&\1;|g' -e 's||]]>|g' -e 's|%%%1%%%|+--- |g' tmp4.xml > tmp5.xml + sed -e 's|V4.5-Based|V5.0-Based|g' -e 's|freebsd45.dtd|freebsd50.dtd|g' header.tmp > $f + grep -v '^> $f + rm -f tmp[1-9].xml +done Property changes on: user/gabor/db5/db5upgrade.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: user/gabor/db5/eucJP.xsl =================================================================== --- user/gabor/db5/eucJP.xsl (nonexistent) +++ user/gabor/db5/eucJP.xsl (revision 41989) @@ -0,0 +1,32 @@ + + + + + + + Property changes on: user/gabor/db5/eucJP.xsl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/xslt+xml \ No newline at end of property