# PaCkAgE DaTaStReAm
xmlto 1 488
# end of header
0707010000493b000081a40000000000000000000000015334e7c2000001010000011200010050ffffffffffffffff0000000e00000000xmlto/pkginfo RSTATES=S s 1 2 3
ISTATES=S s 1 2 3
BASEDIR=/
CLASSES=none
CATEGORY=utility
ARCH=i386
DESC=XML file converter
EMAIL=https://fedorahosted.org/xmlto/
VENDOR=Ondrej Vasik
PSTAMP=26th March 2014
VERSION=0.0.25
NAME=xmlto 0.0.25 i86pc 64bit Solaris 11
PKG=xmlto
0707010000493a000081a40000000000000000000000015334e7c200000f090000011200010050ffffffffffffffff0000000d00000000xmlto/pkgmap : 1 488
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/xmlif 0755 root root 46184 65361 1395976097
1 f none /usr/local/bin/xmlto 0755 root root 16610 44572 1395976097
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/xmlif.1 0644 root root 4004 9300 1395976097
1 f none /usr/local/share/man/man1/xmlto.1 0644 root root 9819 54879 1395976097
1 d none /usr/local/share/xmlto 0755 root root
1 d none /usr/local/share/xmlto/format 0755 root root
1 d none /usr/local/share/xmlto/format/docbook 0755 root root
1 f none /usr/local/share/xmlto/format/docbook/awt 0644 root root 380 28371 1395976097
1 f none /usr/local/share/xmlto/format/docbook/dvi 0644 root root 766 55009 1395976097
1 f none /usr/local/share/xmlto/format/docbook/epub 0644 root root 731 54810 1395976097
1 f none /usr/local/share/xmlto/format/docbook/fo 0644 root root 297 22550 1395976097
1 f none /usr/local/share/xmlto/format/docbook/html 0644 root root 255 19649 1395976097
1 f none /usr/local/share/xmlto/format/docbook/html-nochunks 0644 root root 311 23884 1395976097
1 f none /usr/local/share/xmlto/format/docbook/htmlhelp 0644 root root 252 19711 1395976097
1 f none /usr/local/share/xmlto/format/docbook/javahelp 0644 root root 274 21306 1395976097
1 f none /usr/local/share/xmlto/format/docbook/man 0644 root root 311 23566 1395976097
1 f none /usr/local/share/xmlto/format/docbook/mif 0644 root root 380 28371 1395976097
1 f none /usr/local/share/xmlto/format/docbook/pcl 0644 root root 381 28426 1395976097
1 f none /usr/local/share/xmlto/format/docbook/pdf 0644 root root 860 60965 1395976097
1 f none /usr/local/share/xmlto/format/docbook/ps 0644 root root 860 60965 1395976097
1 f none /usr/local/share/xmlto/format/docbook/svg 0644 root root 381 28426 1395976097
1 f none /usr/local/share/xmlto/format/docbook/txt 0644 root root 1506 43202 1395976097
1 f none /usr/local/share/xmlto/format/docbook/xhtml 0644 root root 263 20316 1395976097
1 f none /usr/local/share/xmlto/format/docbook/xhtml-nochunks 0644 root root 311 24024 1395976097
1 d none /usr/local/share/xmlto/format/fo 0755 root root
1 f none /usr/local/share/xmlto/format/fo/awt 0644 root root 521 39395 1395976097
1 f none /usr/local/share/xmlto/format/fo/dvi 0644 root root 1418 40300 1395976097
1 f none /usr/local/share/xmlto/format/fo/mif 0644 root root 580 43483 1395976097
1 f none /usr/local/share/xmlto/format/fo/pcl 0644 root root 581 43535 1395976097
1 f none /usr/local/share/xmlto/format/fo/pdf 0644 root root 1939 8468 1395976097
1 f none /usr/local/share/xmlto/format/fo/ps 0644 root root 1849 2363 1395976097
1 f none /usr/local/share/xmlto/format/fo/svg 0644 root root 581 43569 1395976097
1 f none /usr/local/share/xmlto/format/fo/txt 0644 root root 582 43629 1395976097
1 d none /usr/local/share/xmlto/format/xhtml1 0755 root root
1 f none /usr/local/share/xmlto/format/xhtml1/awt 0644 root root 383 28598 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/dvi 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/fo 0644 root root 302 22972 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/mif 0644 root root 383 28598 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/pcl 0644 root root 384 28653 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/pdf 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/ps 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/svg 0644 root root 384 28653 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/txt 0644 root root 1334 30074 1395976097
1 f none /usr/local/share/xmlto/xmlto.mak 0644 root root 306 22829 1395976097
1 i checkinstall 784 2295 1395976130
1 i pkginfo 257 19572 1395976130
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!! 0707010000493b000081a40000000000000000000000015334e7c2000001010000011200010050ffffffffffffffff0000000800000000pkginfo RSTATES=S s 1 2 3
ISTATES=S s 1 2 3
BASEDIR=/
CLASSES=none
CATEGORY=utility
ARCH=i386
DESC=XML file converter
EMAIL=https://fedorahosted.org/xmlto/
VENDOR=Ondrej Vasik
PSTAMP=26th March 2014
VERSION=0.0.25
NAME=xmlto 0.0.25 i86pc 64bit Solaris 11
PKG=xmlto
0707010000493a000081a40000000000000000000000015334e7c200000f090000011200010050ffffffffffffffff0000000700000000pkgmap : 1 488
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/xmlif 0755 root root 46184 65361 1395976097
1 f none /usr/local/bin/xmlto 0755 root root 16610 44572 1395976097
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/xmlif.1 0644 root root 4004 9300 1395976097
1 f none /usr/local/share/man/man1/xmlto.1 0644 root root 9819 54879 1395976097
1 d none /usr/local/share/xmlto 0755 root root
1 d none /usr/local/share/xmlto/format 0755 root root
1 d none /usr/local/share/xmlto/format/docbook 0755 root root
1 f none /usr/local/share/xmlto/format/docbook/awt 0644 root root 380 28371 1395976097
1 f none /usr/local/share/xmlto/format/docbook/dvi 0644 root root 766 55009 1395976097
1 f none /usr/local/share/xmlto/format/docbook/epub 0644 root root 731 54810 1395976097
1 f none /usr/local/share/xmlto/format/docbook/fo 0644 root root 297 22550 1395976097
1 f none /usr/local/share/xmlto/format/docbook/html 0644 root root 255 19649 1395976097
1 f none /usr/local/share/xmlto/format/docbook/html-nochunks 0644 root root 311 23884 1395976097
1 f none /usr/local/share/xmlto/format/docbook/htmlhelp 0644 root root 252 19711 1395976097
1 f none /usr/local/share/xmlto/format/docbook/javahelp 0644 root root 274 21306 1395976097
1 f none /usr/local/share/xmlto/format/docbook/man 0644 root root 311 23566 1395976097
1 f none /usr/local/share/xmlto/format/docbook/mif 0644 root root 380 28371 1395976097
1 f none /usr/local/share/xmlto/format/docbook/pcl 0644 root root 381 28426 1395976097
1 f none /usr/local/share/xmlto/format/docbook/pdf 0644 root root 860 60965 1395976097
1 f none /usr/local/share/xmlto/format/docbook/ps 0644 root root 860 60965 1395976097
1 f none /usr/local/share/xmlto/format/docbook/svg 0644 root root 381 28426 1395976097
1 f none /usr/local/share/xmlto/format/docbook/txt 0644 root root 1506 43202 1395976097
1 f none /usr/local/share/xmlto/format/docbook/xhtml 0644 root root 263 20316 1395976097
1 f none /usr/local/share/xmlto/format/docbook/xhtml-nochunks 0644 root root 311 24024 1395976097
1 d none /usr/local/share/xmlto/format/fo 0755 root root
1 f none /usr/local/share/xmlto/format/fo/awt 0644 root root 521 39395 1395976097
1 f none /usr/local/share/xmlto/format/fo/dvi 0644 root root 1418 40300 1395976097
1 f none /usr/local/share/xmlto/format/fo/mif 0644 root root 580 43483 1395976097
1 f none /usr/local/share/xmlto/format/fo/pcl 0644 root root 581 43535 1395976097
1 f none /usr/local/share/xmlto/format/fo/pdf 0644 root root 1939 8468 1395976097
1 f none /usr/local/share/xmlto/format/fo/ps 0644 root root 1849 2363 1395976097
1 f none /usr/local/share/xmlto/format/fo/svg 0644 root root 581 43569 1395976097
1 f none /usr/local/share/xmlto/format/fo/txt 0644 root root 582 43629 1395976097
1 d none /usr/local/share/xmlto/format/xhtml1 0755 root root
1 f none /usr/local/share/xmlto/format/xhtml1/awt 0644 root root 383 28598 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/dvi 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/fo 0644 root root 302 22972 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/mif 0644 root root 383 28598 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/pcl 0644 root root 384 28653 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/pdf 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/ps 0644 root root 769 55236 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/svg 0644 root root 384 28653 1395976097
1 f none /usr/local/share/xmlto/format/xhtml1/txt 0644 root root 1334 30074 1395976097
1 f none /usr/local/share/xmlto/xmlto.mak 0644 root root 306 22829 1395976097
1 i checkinstall 784 2295 1395976130
1 i pkginfo 257 19572 1395976130
0707010000496f000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000000800000000install 07070100004970000081ed0000000000000000000000015334e7c2000003100000011200010050ffffffffffffffff0000001500000000install/checkinstall #!/bin/sh
#
expected_bits="64"
expected_release="5.11"
expected_platform="i386"
#
release=`uname -r`
platform=`uname -p`
bits=`isainfo -b`
#
if [ ${platform} != ${expected_platform} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${release} != ${expected_release} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${bits} != ${expected_bits} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n"
echo "\tYour machine is running a ${bits} bit O.S. currently\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
exit 0
0707010000493c000041ed0000000000000000000000035334e7c2000000000000011200010050ffffffffffffffff0000000500000000root 0707010000493d000041ed0000000000000000000000035334e7c2000000000000011200010050ffffffffffffffff0000000900000000root/usr 0707010000493e000041ed0000000000000000000000045334e7c2000000000000011200010050ffffffffffffffff0000000f00000000root/usr/local 07070100004942000041ed0000000000000000000000045334e7c2000000000000011200010050ffffffffffffffff0000001500000000root/usr/local/share 07070100004947000041ed0000000000000000000000035334e7c2000000000000011200010050ffffffffffffffff0000001b00000000root/usr/local/share/xmlto 0707010000496e000081a40000000000000000000000015334e7a1000001320000011200010050ffffffffffffffff0000002500000000root/usr/local/share/xmlto/xmlto.mak # Makefile rules for using xmlto
%.pdf %.dvi %.ps %.epub %.txt %.fo: %.xml
xmlto $(XMLTOFLAGS) $(subst .,,$(suffix $@)) $<
%.pdf %.dvi %.ps: %.fo
xmlto $(XMLTOFLAGS) $(subst .,,$(suffix $@)) $<
%.html: %.xml
xmlto $(XMLTOFLAGS) html-nochunks $<
%.xhtml: %.xml
xmlto $(XMLTOFLAGS) xhtml-nochunks $<
07070100004948000041ed0000000000000000000000055334e7c2000000000000011200010050ffffffffffffffff0000002200000000root/usr/local/share/xmlto/format 07070100004949000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000002a00000000root/usr/local/share/xmlto/format/docbook 07070100004954000081a40000000000000000000000015334e7a10000017d0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/pcl case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
07070100004951000081a40000000000000000000000015334e7a1000001120000011200010050ffffffffffffffff0000003300000000root/usr/local/share/xmlto/format/docbook/javahelp case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to javahelp"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/javahelp/javahelp.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- *.htm* *.hs *.xml *.jhm "$OUTPUT_DIR"
;;
esac
07070100004952000081a40000000000000000000000015334e7a1000001370000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/man case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to troff"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
;;
post-process)
[ -e "$XSLT_PROCESSED" ] && rm "$XSLT_PROCESSED"
${GCP_PATH:-cp} -R -p -- * "$OUTPUT_DIR" 2>/dev/null
;;
esac
0707010000494d000081a40000000000000000000000015334e7a1000001290000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/docbook/fo case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- "$XSLT_PROCESSED" "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").fo"
;;
esac
07070100004950000081a40000000000000000000000015334e7a1000000fc0000011200010050ffffffffffffffff0000003300000000root/usr/local/share/xmlto/format/docbook/htmlhelp case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to htmlhelp"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- * "$OUTPUT_DIR"
;;
esac
07070100004955000081a40000000000000000000000015334e7a10000035c0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/pdf case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
07070100004957000081a40000000000000000000000015334e7a10000017d0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/svg case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
0707010000494f000081a40000000000000000000000015334e7a1000001370000011200010050ffffffffffffffff0000003800000000root/usr/local/share/xmlto/format/docbook/html-nochunks case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to HTML (no chunks)"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- "$XSLT_PROCESSED" "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").html"
;;
esac
0707010000494b000081a40000000000000000000000015334e7a1000002fe0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/dvi case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/$(basename "$0")" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
07070100004959000081a40000000000000000000000015334e7a1000001070000011200010050ffffffffffffffff0000003000000000root/usr/local/share/xmlto/format/docbook/xhtml case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XHTML (with chunks)"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- *.*htm* "$OUTPUT_DIR"
;;
esac
0707010000494a000081a40000000000000000000000015334e7a10000017c0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/awt case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
07070100004956000081a40000000000000000000000015334e7a10000035c0000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/docbook/ps case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
0707010000494c000081a40000000000000000000000015334e7a1000002db0000011200010050ffffffffffffffff0000002f00000000root/usr/local/share/xmlto/format/docbook/epub if [ -z "`type -t $ZIP_PATH`" ]
then
echo >&2 "Missing zip utility at $ZIP_PATH, conversion to epub not possible."
echo >&2 "Exiting !"
exit 3
fi
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Converting Docbook to epub"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl"
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Creating epub file"
fi
echo "application/epub+zip" > mimetype
EPUB_NAME=$(basename "${XSLT_PROCESSED%.*}").epub
[ -e "$XSLT_PROCESSED" ] && rm "$XSLT_PROCESSED"
${ZIP_PATH} -0Xq $EPUB_NAME mimetype
${ZIP_PATH} -Xr9D $EPUB_NAME *
${GCP_PATH:-cp} -R -p -- $EPUB_NAME "$OUTPUT_DIR" 2>/dev/null
;;
esac
0707010000494e000081a40000000000000000000000015334e7a1000000ff0000011200010050ffffffffffffffff0000002f00000000root/usr/local/share/xmlto/format/docbook/html case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to HTML (with chunks)"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- * "$OUTPUT_DIR"
;;
esac
0707010000495a000081a40000000000000000000000015334e7a1000001370000011200010050ffffffffffffffff0000003900000000root/usr/local/share/xmlto/format/docbook/xhtml-nochunks case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XHTML (no chunks)"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- "$XSLT_PROCESSED" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).html"
;;
esac
07070100004958000081a40000000000000000000000015334e7a1000005e20000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/txt case "$USE_BACKEND" in
DEFAULT|DBLATEX)
if [ -n "`type -t $W3M_PATH`" ]
then
CONVERT="$W3M_PATH"
ARGS="-T text/html -dump"
elif [ -n "`type -t $LYNX_PATH`" ]
then
CONVERT="$LYNX_PATH"
ARGS="-force_html -dump -nolist -width=72"
elif [ -n "`type -t $LINKS_PATH`" ]
then
CONVERT="$LINKS_PATH"
ARGS="-dump"
else
echo >&2 "No way to convert HTML to text found."
echo >&2 "Try either installing text web browser(lynx/w3m/links) or use option --with-fop"
exit 3
fi
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to HTML (no chunks)"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert HTML to ASCII"
BASENAMEFILE="`basename ${XSLT_PROCESSED%.}`"
echo >&2 "Using : \"${CONVERT} ${ARGS} ${POSTARGS} ${XSLT_PROCESSED} > $OUTPUT_DIR/${BASENAMEFILE}.txt\""
fi
${CONVERT} ${ARGS} ${POSTARGS} "${XSLT_PROCESSED}" > \
"$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").txt"
;;
esac
;;
FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
;;
esac
07070100004953000081a40000000000000000000000015334e7a10000017c0000011200010050ffffffffffffffff0000002e00000000root/usr/local/share/xmlto/format/docbook/mif case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
bash "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
07070100004964000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/xhtml1 07070100004969000081a40000000000000000000000015334e7a1000001800000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/pcl case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
0707010000496a000081a40000000000000000000000015334e7a1000003010000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/pdf case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/$(basename "$0")" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
0707010000496b000081a40000000000000000000000015334e7a1000003010000011200010050ffffffffffffffff0000002c00000000root/usr/local/share/xmlto/format/xhtml1/ps case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/$(basename "$0")" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
0707010000496c000081a40000000000000000000000015334e7a1000001800000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/svg case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
07070100004966000081a40000000000000000000000015334e7a1000003010000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/dvi case "$USE_BACKEND" in
DEFAULT|FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/$(basename "$0")" "$1"
;;
esac
;;
DBLATEX)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
POSTARGS="${POSTARGS} --verbose"
fi
"$DBLATEX_PATH" ${POSTARGS} -P doc.collab.show=0 -P latex.output.revhistory=0 "${XSLT_PROCESSED}" --"${EXT}" --output="$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
;;
esac
;;
esac
07070100004965000081a40000000000000000000000015334e7a10000017f0000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/awt case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
07070100004967000081a40000000000000000000000015334e7a10000012e0000011200010050ffffffffffffffff0000002c00000000root/usr/local/share/xmlto/format/xhtml1/fo case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
${GCP_PATH:-cp} -R -p -- "$XSLT_PROCESSED" "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").fo"
;;
esac
0707010000496d000081a40000000000000000000000015334e7a1000005360000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/txt case "$USE_BACKEND" in
DEFAULT|DBLATEX)
if [ -n "`type -t $W3M_PATH`" ]
then
CONVERT="$W3M_PATH"
ARGS="-T text/html -dump"
elif [ -n "`type -t $LYNX_PATH`" ]
then
CONVERT="$LYNX_PATH"
ARGS="-force_html -dump -nolist -width=72"
elif [ -n "`type -t $LINKS_PATH`" ]
then
CONVERT="$LINKS_PATH"
ARGS="-dump"
else
echo >&2 "No way to convert HTML to text found."
echo >&2 "Try either installing text webbrowser(lynx/w3m/links) or use option --with-fop"
exit 3
fi
case "$1" in
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert HTML to ASCII"
BASENAMEFILE="`basename ${XSLT_PROCESSED%.}`"
echo >&2 "Using : \"${CONVERT} ${ARGS} ${POSTARGS} ${XSLT_PROCESSED} > $OUTPUT_DIR/${BASENAMEFILE}.txt\""
fi
${CONVERT} ${ARGS} ${POSTARGS} ${XSLT_PROCESSED} > \
"$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).txt"
;;
esac
;;
FOP)
case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
;;
esac
07070100004968000081a40000000000000000000000015334e7a10000017f0000011200010050ffffffffffffffff0000002d00000000root/usr/local/share/xmlto/format/xhtml1/mif case "$1" in
stylesheet)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to XSL-FO"
fi
echo "http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl"
;;
post-process)
EXT=$(basename "$0")
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Convert to ${EXT}"
fi
# Get the FO format script to do the rest
sh "$(dirname "$0")/../fo/${EXT}" "$1"
;;
esac
0707010000495b000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000002500000000root/usr/local/share/xmlto/format/fo 07070100004963000081a40000000000000000000000015334e7a1000002460000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/txt case "$USE_BACKEND" in
DEFAULT | DBLATEX)
echo "Sorry, no way to convert to txt , use --with-fop option for that."
echo "You need to install fop package for using that option."
exit 3
;;
FOP)
EXT=$(basename $0)
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to TXT"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
0707010000495c000081a40000000000000000000000015334e7a1000002090000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/awt case "$USE_BACKEND" in
DEFAULT|DBLATEX)
echo "Sorry, no way to convert to awt, use --with-fop option for that."
echo "You need to install fop package for using that option."
exit 3
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Rendering XSL-FO to screen"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}"
cd -
esac
;;
esac
0707010000495e000081a40000000000000000000000015334e7a1000002440000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/mif case "$USE_BACKEND" in
DEFAULT|DBLATEX)
echo "Sorry, no way to convert to mif, use --with-fop option for that"
echo "You need to install fop package for using that option."
exit 3
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to MIF"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
07070100004960000081a40000000000000000000000015334e7a1000007930000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/pdf case "$USE_BACKEND" in
DEFAULT|DBLATEX)
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to PDF"
fi
if [ -z "`type -t $PDFXMLTEX_PATH`" ]
then
echo >&2 "Can't process, pdfxmltex tool not found at $PDFXMLTEX_PATH."
exit 3
fi
# Work around stupid tetex bug with '_' in filenames
# Also work around stupid tetex limitation with long lines
# (rhbz #101055) and workaround passivetex limitation for chapter
# titles starting with L (rhbz #526273)
sed -e "s,/>,/>\n,g" \
-e "s,block>,&\n,g" "$XSLT_PROCESSED" >tmp.fo
OUT=output
TEXINPUTS="$(dirname "$INPUT_FILE")::$SEARCHPATH"
export TEXINPUTS
"$PDFXMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "First pass complete"
# If there were undefined references we need to re-run pdfxmltex.
if egrep '^LaTeX Warning: There were undefined references.$' $OUT \
>/dev/null 2>&1 \
|| egrep '^LaTeX Warning: Label.s. may have changed\.' $OUT \
>/dev/null 2>&1
then
"$PDFXMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Second pass complete"
"$PDFXMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Third pass complete"
[ "$VERBOSE" -ge 3 ] && cat $OUT
fi
fi
${GCP_PATH:-cp} -R -p -- *.pdf "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").pdf"
;;
esac
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to PDF"
fi
#we need to change dir to handle external data objects correctly
cd "$OUTPUT_DIR"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
0707010000495f000081a40000000000000000000000015334e7a1000002450000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/pcl case "$USE_BACKEND" in
DEFAULT|DBLATEX)
echo "Sorry, no way to convert to pcl, use --with-fop option for that."
echo "You need to install fop package for using that option."
exit 3
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to PCL"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
07070100004962000081a40000000000000000000000015334e7a1000002450000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/svg case "$USE_BACKEND" in
DEFAULT|DBLATEX)
echo "Sorry, no way to convert to svg, use --with-fop option for that."
echo "You need to install fop package for using that option."
exit 3
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to SVG"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
07070100004961000081a40000000000000000000000015334e7a1000007390000011200010050ffffffffffffffff0000002800000000root/usr/local/share/xmlto/format/fo/ps case "$USE_BACKEND" in
DEFAULT|DBLATEX)
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to DVI"
fi
# Work around stupid tetex bug with '_' in filenames
# Also work around stupid tetex limitation with long lines
# (rhbz #101055) and workaround passivetex limitation for chapter
# titles starting with L (rhbz #526273)
sed -e "s,/>,/>\n,g" \
-e "s,block>,&\n,g" "$XSLT_PROCESSED" >tmp.fo
OUT=output
TEXINPUTS="$(dirname "$INPUT_FILE")::$SEARCHPATH"
export TEXINPUTS
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "First pass complete"
# If there were undefined references we need to re-run xmltex.
if egrep '^LaTeX Warning: There were undefined references.$' $OUT \
>/dev/null 2>&1 \
|| egrep '^LaTeX Warning: Label.s. may have changed\.' $OUT \
>/dev/null 2>&1
then
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Second pass complete"
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Third pass complete"
[ "$VERBOSE" -ge 3 ] && cat $OUT
fi
fi
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process DVI to PS"
fi
dvips -R -q ${POSTPOSTARGS} -o "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").ps" *.dvi
;;
esac
;;
FOP)
EXT=$(basename "$0")
case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to PS"
fi
#we need to change dir to handle external data objects correctly
cd "${OUTPUT_DIR}"
"$FOP_PATH" ${POSTARGS} -fo "${XSLT_PROCESSED}" -"${EXT}" "$OUTPUT_DIR/$(basename ${XSLT_PROCESSED%.*}).${EXT}"
cd -
;;
esac
;;
esac
0707010000495d000081a40000000000000000000000015334e7a10000058a0000011200010050ffffffffffffffff0000002900000000root/usr/local/share/xmlto/format/fo/dvi case "$1" in
stylesheet)
;;
post-process)
if [ "$VERBOSE" -ge 1 ]
then
echo >&2 "Post-process XSL-FO to DVI"
fi
if [ -z "`type -t $XMLTEX_PATH`" ]
then
echo >&2 "Can't process, xmltex tool not found at $XMLTEX_PATH."
exit 3
fi
# Work around stupid tetex bug with '_' in filenames
# Also work around stupid tetex limitation with long lines (rhbz #101055)
# and workaround passivetex limitation for chapter titles starting with L
# (rhbz #526273)
sed -e "s,/>,/>\n,g" \
-e "s,block>,&\n,g" "$XSLT_PROCESSED" >tmp.fo
OUT=output
TEXINPUTS="$(dirname "$INPUT_FILE")::$SEARCHPATH"
export TEXINPUTS
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "First pass complete"
# If there were undefined references we need to re-run xmltex.
if egrep '^LaTeX Warning: There were undefined references.$' $OUT \
>/dev/null 2>&1 \
|| egrep '^LaTeX Warning: Label.s. may have changed\.' $OUT \
>/dev/null 2>&1
then
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Second pass complete"
"$XMLTEX_PATH" ${POSTARGS} tmp.fo >$OUT &2 "Third pass complete"
[ "$VERBOSE" -ge 3 ] && cat $OUT
fi
fi
${GCP_PATH:-cp} -R -p -- *.dvi "$OUTPUT_DIR/$(basename "${XSLT_PROCESSED%.*}").dvi"
;;
esac
07070100004943000041ed0000000000000000000000035334e7c2000000000000011200010050ffffffffffffffff0000001900000000root/usr/local/share/man 07070100004944000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000001e00000000root/usr/local/share/man/man1 07070100004946000081a40000000000000000000000015334e7a10000265b0000011200010050ffffffffffffffff0000002600000000root/usr/local/share/man/man1/xmlto.1 '\" t
.\" Title: xmlto
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.76.1
.\" Date: November 2011
.\" Manual: Reference
.\" Source: xmlto 0.0.25
.\" Language: English
.\"
.TH "XMLTO" "1" "November 2011" "xmlto 0.0.25" "Reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
xmlto \- apply an XSL stylesheet to an XML document
.SH "SYNOPSIS"
.HP \w'\fBxmlto\fR\ 'u
\fBxmlto\fR [\fB\-o\fR\ \fIoutput_dir\fR] [\fB\-x\fR\ \fIcustom_xsl\fR] [\fB\-m\fR\ \fIxsl_fragment\fR] [\fB\-v\fR] [\fB\-p\fR\ \fIpostprocessor_opts\fR] [\fB\-\-extensions\fR] [\fB\-\-searchpath\fR\ \fIpath\fR] [\fB\-\-skip\-validation\fR] [\fB\-\-stringparam\fR\ \fIparamname\fR=\fIparamvalue\fR] [\fB\-\-noclean\fR] [\fB\-\-noautosize\fR] [\fB\-\-noextensions\fR] [\fB\-\-with\-fop\fR] [\fB\-\-with\-dblatex\fR] {\fIformat\fR} {\fIfile\fR}
.HP \w'\fBxmlto\fR\ 'u
\fBxmlto\fR {[\-\-help] | [\-\-version]}
.SH "DESCRIPTION"
.PP
The purpose of
\fBxmlto\fR
is to convert an XML
\fIfile\fR
to the desired
\fIformat\fR
using whatever means necessary\&. This may involve two steps:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
The application of an appropriate XSL stylesheet using an XSL\-T processor\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
Further processing with other tools\&. This step may not be necessary\&.
.RE
.PP
To decide which stylesheet to use and what, if any, needs to be done to post\-process the output,
\fBxmlto\fR
makes use of
format scripts, which are simple shell scripts that
\fBxmlto\fR
calls during the conversion\&.
.PP
The appropriate format script is selected based on the type of XML file and the desired output format\&.
\fBxmlto\fR
comes with some format scripts for converting DocBook XML files to a variety of formats\&. You may specify your own format script by using an absolute filename for
\fIformat\fR
on the command line\&.
.PP
Firstly, if
\fBxmlto\fR
has not been told explicitly which stylesheet to use (with the
\fB\-x\fR
option), the format script will be called with
\fB$1\fR
set to
stylesheet\&. The environment variable
\fBXSLT_PROCESSOR\fR
contains the base name of the executable that will be used to perform the XSL\-T transformation (for example
xsltproc)\&. The format script should write the name of the stylesheet to use to standard output and exit successfully, or exit with a non\-zero return code if there is no appropriate stylesheet to use (for example, if the only available stylesheet is known not to work with the XSL\-T processor that will be used)\&. If nothing is written to standard output but the script exits successfully, no XSL\-T transformation will be performed\&.
.PP
Secondly, after an XSL\-T processor has been run using the stylesheet, the format script will be called again, this time with
\fB$1\fR
set to
post\-process\&. The format script should perform any necessary steps to translate the XSL\-T processed output into the desired output format, including copying the output to the desired output directory\&. For post\-processing, the format script is run in a temporary directory containing just the processed output (whose name is stored in
\fBXSLT_PROCESSED\fR
and whose basename is that of the original XML file with any filename extension replaced with
\&.proc)\&.
\fBINPUT_FILE\fR
is set to the name of the original XML file,
\fBOUTPUT_DIR\fR
is set to the name of the directory that the output (and only the output) must end up in, and
\fBSEARCHPATH\fR
is set to a colon\-separate list of fallback directories in which to look for input (for images, for example)\&. If this step is unsuccessful the format script should exit with a non\-zero return code\&.
.SH "OPTIONS"
.PP
\fB\-v\fR
.RS 4
Be verbose (\fB\-vv\fR
for very verbose)\&.
.RE
.PP
\fB\-x\fR \fIstylesheet\fR
.RS 4
Use
\fIstylesheet\fR
instead of asking the format script to choose one\&.
.RE
.PP
\fB\-m\fR \fIfragment\fR
.RS 4
Use the provided XSL
\fIfragment\fR
to modify the stylesheet\&.
.RE
.PP
\fB\-o\fR \fIdirectory\fR
.RS 4
Put output in the specified
\fIdirectory\fR
instead of the current working directory\&.
.RE
.PP
\fB\-p\fR \fIpostprocessor_opts\fR
.RS 4
Pass
\fIpostprocessor_opts\fR
to processing stages after stylesheet application (e\&.g\&.
lynx
or
links
when going through HTML to text, or
xmltex
when going from through TeX to DVI)\&. If
\fB\-p\fR
is specified a second time, the options specified will be passed to second\-stage postprocessing; presently this is only applicable when going through
xmltex
and
dvips
to PostScript\&.
.RE
.PP
\fB\-\-extensions\fR
.RS 4
Turn on stylesheet extensions for the tool chain in use (\fIuse\&.extensions\fR
is turned on)\&. The variables turned on are the ones used by Norman Walsh\*(Aqs DocBook XSL stylesheets\&.
.RE
.PP
\fB\-\-searchpath\fR \fIpath\fR
.RS 4
Add the colon\-separated list of directories in
\fIpath\fR
as fallback directories for including input\&.
.RE
.PP
\fB\-\-skip\-validation\fR
.RS 4
Skip the validation step that is normally performed\&.
.RE
.PP
\fB\-\-stringparam\fR \fIparamname\fR=\fIparamvalue\fR
.RS 4
Pass a named parameter
\fIparamname\fR
with value
\fIparamvalue\fR
to stylesheet from the command line\&.
.RE
.PP
\fB\-\-noclean\fR
.RS 4
Temporary files are not deleted(their names are shown and kept in tmp directory)\&. It could help with analyzing problems\&.
.RE
.PP
\fB\-\-noautosize\fR
.RS 4
By default, some XSL variables are overriden by autodetection (\fIpage\&.width\fR
and
\fIpage\&.height\fR
for
paperconf
(libpaper) use,
\fIpaper\&.type\fR
for locale\-based (\fBLC_PAPER\fR) selection)\&. With this option,
\fBxmlto\fR
doesn\(cqt use this autodetection and user is able to modify defaults himself (either via default
param\&.xsl
modification or by user\-defined XSL fragment)\&.
.RE
.PP
\fB\-\-noextensions\fR
.RS 4
By default,
\fBxmlto\fR
enables XSL params
\fIpassivetex\&.extensions\fR
for
passivetex
backend and
\fIfop\&.extensions\fR
and
\fIfop1\&.extensions\fR
for
fop
backend\&. This usually produces better results\&. If you for some reason don\*(Aqt want to use these parameters, just disable them using this option\&.
.RE
.PP
\fB\-\-with\-fop\fR
.RS 4
Use
fop
for formatting\&. It is an experimental option, expects
fop
in specific location(detected at configured time), could be changed manually in
\fBxmlto\fR
script by modification of
\fIFOP_PATH\fR
.RE
.PP
\fB\-\-with\-dblatex\fR
.RS 4
Use
dblatex
for formatting\&. It is an experimental option, expects
dblatex
in specific location(detected at configured time), could be changed manually in
\fBxmlto\fR
script by modification of
\fIDBLATEX_PATH\fR
.RE
.PP
\fB\-\-help\fR
.RS 4
Display a short usage message\&. It will describe xmlto\*(Aqs options, and the available output formats\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Display the version number of xmlto\&.
.RE
.SH "ENVIRONMENT"
.PP
\fBXSLT_PROCESSOR\fR
.RS 4
Base name of the executable that will be used to perform the XSL\-T transformation (default:
\fBxsltproc\fR(1))\&.
.RE
.PP
\fBTMPDIR\fR
.RS 4
Directory, where to create temporary stylesheets (default:
/tmp)\&.
.RE
.SH "DIAGNOSTICS"
.PP
\fB0\fR
.RS 4
Everything went fine\&. This is the expected exit code\&.
.RE
.PP
\fB1\fR
.RS 4
\fBxmlto\fR
was called with insufficient arguments\&.
.RE
.PP
\fB2\fR
.RS 4
\fBmktemp\fR(1)
failed to create a file/directory\&. Make sure
/tmp
or
\fBTMPDIR\fR
is writable\&.
.RE
.PP
\fB3\fR
.RS 4
\fBxmlto\fR
failed to find some binary on configured location\&. Make sure that all required packages are installed and paths in
xmlto
script are set properly\&.
.RE
.PP
\fB10+(Validation non\-zero error code)\fR
.RS 4
\fBxmlto\fR
tried to validate a xml document, but validation failed\&. For better diagnostic, validation output and
xmllint
exit code is provided\&. Consider either fixing your document or using
\fB\-\-skip\-validation\fR\&.
.RE
.SH "EXAMPLES"
.PP
To convert a DocBook XML document to PDF, use:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBxmlto pdf mydoc\&.xml\fR
.fi
.if n \{\
.RE
.\}
.PP
To convert a DocBook XML document to HTML and store the resulting HTML files in a separate directory use:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBxmlto \-o html\-dir html mydoc\&.xml\fR
.fi
.if n \{\
.RE
.\}
.PP
To convert a DocBook XML document to a single HTML file use:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBxmlto html\-nochunks mydoc\&.xml\fR
.fi
.if n \{\
.RE
.\}
.PP
To modify the output using an XSL fragment use:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBxmlto \-m ulink\&.xsl pdf mydoc\&.xml\fR
.fi
.if n \{\
.RE
.\}
.PP
To specify which stylesheet to use (overriding the one that the format script would choose) use:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBxmlto \-x mystylesheet\&.xsl pdf mydoc\&.xml\fR
.fi
.if n \{\
.RE
.\}
.SH "AUTHORS"
.PP
\fBTim Waugh\fR <\&twaugh@redhat.com\&>
.RS 4
Original author, maintainer until 0.0.18
.RE
.PP
\fBOndřej Va\(vs\('ik\fR <\&ovasik@redhat.com\&>
.RS 4
Maintainer since 0.0.19
.RE
.SH "COPYRIGHT"
.br
07070100004945000081a40000000000000000000000015334e7a100000fa40000011200010050ffffffffffffffff0000002600000000root/usr/local/share/man/man1/xmlif.1 '\" t
.\" Title: xmlif
.\" Author: Eric S. Raymond
.\" Generator: DocBook XSL Stylesheets v1.76.1
.\" Date: April 2009
.\" Manual: xmlif
.\" Source: Linux
.\" Language: English
.\"
.TH "XMLIF" "1" "April 2009" "Linux" "xmlif"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
xmlif \- conditional processing instructions for XML
.SH "SYNOPSIS"
.HP \w'\fBxmlif\fR\ 'u
\fBxmlif\fR [attrib=value...]
.SH "DESCRIPTION"
.PP
xmlif
filters XML according to conditionalizing markup\&. This can be useful for formatting one of several versions of an XML document depending on conditions passed to the command\&.
.PP
Attribute/value pairs from the command line are matched against the attributes associated with certain processing instructions in the document\&. The instructions are
and its inverse
,
and its inverse
,
, and
\&.
.PP
Argument/value pairs given on the command line are checked against the value of corresponding attributes in the conditional processing instructions\&. An `attribute match\*(Aq happens if an attribute occurs in both the command\-line arguments and the tag, and the values match\&. An `attribute mismatch\*(Aq happens if an attribute occurs in both the command\-line arguments and the tag, but the values do not match\&.
.PP
Spans between
or
and the next conditional processing instruction at the same nesting level are passed through unaltered if there is at least one attribute match and no attribute mismatch; spans between
and
and the next conditional processing instruction are passed otherwise\&. Spans between
and the next conditional\-processing tag are passed through only if no previous span at the same level has been passed through\&.
and
(and their `not\*(Aq variants) change the current nesting level;
and
do not\&.
.PP
All these processing instructions will be removed from the output produced\&. Aside from the conditionalization, all other input is passed through untouched; in particular, entity references are not resolved\&.
.PP
Value matching is by string equality, except that "|" in an attribute value is interpreted as an alternation character\&. Thus, saying foo=\*(Aqred|blue\*(Aq on the command line enables conditions red and blue\&. Saying color=\*(Aqblack|white\*(Aq in a tag matches command\-line conditions color=\*(Aqblack\*(Aq and color=\*(Aqwhite\*(Aq\&.
.PP
Here is an example:
.sp
.if n \{\
.RS 4
.\}
.nf
Always issue this text\&.
Issue this text if \*(Aqcondition=html\*(Aq is given on the command line\&.
Issue this text if \*(Aqcondition=pdf\*(Aq or \*(Aqcondition=ps\*(Aq
is given on the command line\&.
Otherwise issue this text\&.
Always issue this text\&.
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.PP
\fBEric S\&. Raymond\fR <\&esr@snark\&.thyrsus\&.com\&>
.RS 4
Author of xmlif program
.RE
0707010000493f000041ed0000000000000000000000025334e7c2000000000000011200010050ffffffffffffffff0000001300000000root/usr/local/bin 07070100004941000081ed0000000000000000000000015334e7a1000040e20000011200010050ffffffffffffffff0000001900000000root/usr/local/bin/xmlto #!/usr/local/bin/bash
#
# xmlto - apply an XSL stylesheet to an XML document
# Copyright (C) 2001, 2002, 2003 Tim Waugh
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
# Utilities that we need that aren't everywhere
FIND=find # This must be GNU find (need -maxdepth)
MKTEMP=/usr/local/bin/mktemp # See http://www.mktemp.org if missing on your system
BASH=/usr/local/bin/bash # GNU bash, for running the format scripts
GETOPT=/usr/local/bin/getopt # a getopt that supports --longoptions
TAIL=/bin/tail # a tail that supports -n (posix)
GREP=/bin/grep # GNU grep, for searching patterns
version () {
echo "xmlto version 0.0.25"
}
usage () {
cat << EOF
usage: xmlto [OPTION]... FORMAT XML
OPTIONs are:
-v verbose output (-vv for very verbose)
-x stylesheet use the specified stylesheet instead of choosing one
-m fragment use the XSL fragment to customize the stylesheet
-o directory put output in the specified directory instead of
the current working directory
-p postprocopts pass option to postprocessor
--extensions turn on stylesheet extensions for this tool chain
--noautosize do not autodetect paper size via locales or paperconf
--noclean temp files are not deleted automatically
(good for diagnostics)
--noextensions do not use passivetex/fop extensions
--searchpath colon-separated list of fallback directories
--skip-validation
do not attempt to validate the input before processing
--stringparam paramname=paramvalue
pass a named parameter to the stylesheet from the
command line
--with-fop use fop for formatting (if fop available)
--with-dblatex use dblatex for formatting (if dblatex available)
Available FORMATs depend on the type of the XML file (which is
determined automatically).
EOF
if [ -d "$FORMAT_DIR" ]
then
for source in $(${FIND} "$FORMAT_DIR" -maxdepth 1 -type d)
do
if [ "$source" = "$FORMAT_DIR" ]; then continue; fi
cat << EOF
For documents of type "$(basename "$source")":
EOF
ls "$source"
done
fi
}
# make_temp [-d] filenametag varname [message upon failure]
#
# Wrapper for 'varname=$(mktemp /tmp/xmlto-$filenametag.XXXXXX)'.
# * Remembers the temporary file's name so it can be deleted on exit
# * If the failure message is empty or missing, exits on failure
make_temp () {
local dirflag="" prefix="xmlto"
[ "$1" = "-d" ] && { dirflag="-d"; shift; }
[ -n "$1" ] && prefix="xmlto-$1"
if eval $2='$(${MKTEMP} $dirflag "${TMPDIR:-/tmp}/${prefix}.XXXXXX")'
then
eval 'CLEANFILES[$CLEANFILE_COUNT]="${'$2'}"'
CLEANFILE_COUNT=$(($CLEANFILE_COUNT + 1))
return 0
elif [ -z "$3" ]
then
echo >&2 "mktemp failed!"
exit 2
else
echo >&2 "mktemp failed. $3"
return 2
fi
}
# Allow FORMAT_DIR to be over-ridden, so that we can be
# run from the build directory.
prefix=/usr/local
: ${FORMAT_DIR=${prefix}/share/xmlto/format}
# This can be over-ridden, but really we should detect the source
# document type without needing any help.
: ${SOURCE_FORMAT=docbook}
# Get absolute pathnames for FORMAT_DIR and OUTPUT_DIR.
WD="$(pwd)"
if [ "x${FORMAT_DIR##/*}" != "x" ]
then
FORMAT_DIR="${PWD}/${FORMAT_DIR}"
fi
OUTPUT_DIR="$WD"
# This is an array of XSL fragments specified by the user.
declare -a XSL_MODS
XSL_MOD_COUNT=0
# List of files to remove after exit
declare -a CLEANFILES
CLEANFILE_COUNT=0
trap -- 'cd /; [ -z "${CLEANFILES[*]}" ] || rm -rf "${CLEANFILES[@]}"' EXIT
XSLTOPTS=
SEARCHPATH=
PAPERCONF_PATH=paperconf
LOCALE_PATH=/bin/locale
XMLLINT_PATH=/usr/local/bin/xmllint
XSLTPROC_PATH=/usr/local/bin/xsltproc
# Try to setup papersize using libpaper first ...
if [ -n "`type -t $PAPERCONF_PATH`" ]
then
papername=`"$PAPERCONF_PATH" -n`
paperheight=`"$PAPERCONF_PATH" -mh | sed 's/ //g'`
paperwidth=`"$PAPERCONF_PATH" -mw | sed 's/ //g'`
if [ -n "$paperheight" -a -n "$paperwidth" ]
then
make_temp xsl papersizemod "Using default paper type." &&
cat << EOF > "$papersizemod"
$paperheight
$paperwidth
Making
pages on $papername paper (
x
)
EOF
fi
# ... or use magic paper size, based on LC_PAPER
elif [ -n "`type -t $LOCALE_PATH`" ]
then
# For paper sizes we know about, specify them.
h=$("$LOCALE_PATH" LC_PAPER 2>/dev/null | head -n 1)
if [ "$h" = "297" ]
then
papertype=A4
fi
if [ -n "$papertype" ]
then
make_temp xsl papersizemod "Using default paper type." &&
cat << EOF > "$papersizemod"
EOF
fi
fi
# Magic encoding, based on locale
if [ -n "`type -t $LOCALE_PATH`" ]
then
charmap=$("$LOCALE_PATH" charmap 2>/dev/null)
if [ -n "$charmap" ]
then
if make_temp xsl encodingmod "Using default output encoding."
then
cat << EOF > "$encodingmod"
EOF
XSL_MODS[$XSL_MOD_COUNT]="$encodingmod"
XSL_MOD_COUNT=$(($XSL_MOD_COUNT + 1))
fi
fi
fi
# Make verbosity level uniformly available to called scripts
VERBOSE=0
export VERBOSE
# Disable network entities
XSLTOPTS="$XSLTOPTS --nonet"
# The names parameter for the XSLT stylesheet
XSLTPARAMS=""
# Enable XInclude
XSLTOPTS="$XSLTOPTS --xinclude"
SKIP_VALIDATION=0
BACKEND_EXTENSIONS=1
NO_AUTOSIZE=0
#actual possibilities DEFAULT(XSL-FO/passivetex), FOP and DBLATEX
USE_BACKEND=DEFAULT
FOP_PATH=/usr/local/bin/fop
DBLATEX_PATH=dblatex
XMLTEX_PATH=xmltex
PDFXMLTEX_PATH=pdfxmltex
#check if we could use fop/dblatex backend as default(if not, use passivetex)
if [ x"$USE_BACKEND" = xFOP ] && [ -z "`type -t $FOP_PATH`" ]
then
echo >&2 "xmlto: Warning: fop not found or not executable."
echo >&2 "xmlto: Using default backend..."
USE_BACKEND=DEFAULT
else
# we should enable fop.extensions for fop 0_17,0_18 and 0_20*,
# fop1.extensions for the rest
if [ x`$FOP_PATH -v 2>/dev/null | $GREP 0_[12]` = x ]; then
FOPVERSION="fop1"
else
FOPVERSION="fop"
fi
fi
if [ x"$USE_BACKEND" = xDBLATEX ] && \
[ -z "`type -t $DBLATEX_PATH`" ]
then
echo >&2 "xmlto: Warning: dblatex not found or not executable."
echo >&2 "xmlto: Using default backend..."
USE_BACKEND=DEFAULT
fi
LINKS_PATH=links
W3M_PATH=w3m
LYNX_PATH=lynx
GCP_PATH=/bin/cp
ZIP_PATH=/bin/zip
# Process any options
ARGS=$(${GETOPT} \
--longoptions=help,version,extensions,searchpath:,skip-validation,stringparam:,noclean,noautosize,with-fop,with-dblatex \
-n xmlto -- x:m:o:p:v "$@")
[ $? != 0 ] && { usage; exit 1; }
eval set -- "$ARGS"
while [ "$#" -gt "0" ]; do
case "$1" in
--help)
usage
exit 0
;;
--version)
version
exit 0
;;
-x)
case "$2" in
-) make_temp stdin-xsl TMP_STYLESHEET
cat /dev/stdin > ${TMP_STYLESHEET}
STYLESHEET=${TMP_STYLESHEET} ;;
/*) STYLESHEET="$2" ;;
*) STYLESHEET="$PWD/$2" ;;
esac
shift 2
;;
-m)
case "$2" in
/* | *:/*) XSL_MODS[$XSL_MOD_COUNT]="$2" ;;
*) XSL_MODS[$XSL_MOD_COUNT]="$PWD/$2" ;;
esac
XSL_MOD_COUNT=$(($XSL_MOD_COUNT + 1))
shift 2
;;
-o)
case "$2" in
/*) OUTPUT_DIR="$2" ;;
*) OUTPUT_DIR="$WD/$2" ;;
esac
shift 2
;;
-p)
case $POSTARGS in
"") POSTARGS="$2" ;;
*) POSTPOSTARGS="$2" ;;
esac
shift 2
;;
--extensions)
XSLTOPTS="$XSLTOPTS --param use.extensions '1'"
shift
;;
--noextensions)
BACKEND_EXTENSIONS=0
shift
;;
-v)
: ${VERBOSE:-0}
VERBOSE=$((${VERBOSE}+1))
shift
;;
--searchpath)
oldIFS="${IFS}"
IFS=":"
for asearchpath in "$2"; do
# wrangle relative paths into absolute ones so that the user
# isn't surprised if he does ``--searchpath .''
case "${asearchpath}" in
/*) ;;
*) asearchpath="${PWD}/${asearchpath}" ;;
esac
SEARCHPATH="${SEARCHPATH}${XML_SEARCHPATH_SEPARATOR}${asearchpath}"
# we only need a colon if more than one path is in the searchpath
# and only after the first iteration.
XML_SEARCHPATH_SEPARATOR=":"
done
IFS="${oldIFS}"
# This is the cleanest method I can think of, but requires calls to
# xmllint and xsltproc to be run through eval --ohnobinki
[ -n "${SEARCHPATH}" ] && SEARCHPATH_FORMATTED="--path \"${SEARCHPATH}\""
shift 2
;;
--skip-validation)
SKIP_VALIDATION=1
shift
;;
--stringparam)
MYPARAM="$2"
XSLTPARAMS="$XSLTPARAMS --stringparam ${MYPARAM%=*}"
XSLTPARAMS="$XSLTPARAMS ${MYPARAM#*=}"
shift 2
;;
--noclean)
trap -- 'cd /; [ -z "${CLEANFILES[*]}" ] || echo "${CLEANFILES[@]}"' EXIT
shift
;;
--noautosize)
NO_AUTOSIZE=1
shift
;;
--with-fop)
##use fop instead of passivetex where possible
if [ -z "`type -t $FOP_PATH`" ]
then
echo >&2 Warning: fop not found or not executable.
echo >&2 Using default backend...
else
USE_BACKEND="FOP"
fi
shift
;;
--with-dblatex)
##use dblatex instead of passivetex where possible
if [ -z "`type -t $DBLATEX_PATH`" ]
then
echo >&2 Warning: dblatex not found or not executable.
echo >&2 Using default backend...
else
USE_BACKEND="DBLATEX"
fi
shift
;;
--)
shift
break
;;
esac
done
if [ "$BACKEND_EXTENSIONS" -eq 1 ]
then
case "$USE_BACKEND" in
FOP)
XSLTOPTS="$XSLTOPTS --param $FOPVERSION.extensions '1'" ;;
DBLATEX)
;;
DEFAULT)
XSLTOPTS="$XSLTOPTS --param passivetex.extensions '1'" ;;
esac
fi
if [ "$#" != "2" ]
then
usage
exit 1
fi
DEST_FORMAT="$1"
case "$2" in
/*) INPUT_FILE="$2" ;;
*) INPUT_FILE="$PWD/$2" ;;
esac
if [ -z "$DEST_FORMAT" -o -z "$INPUT_FILE" ]
then
usage
exit 1
fi
[ ! -e "$INPUT_FILE" ] && echo >&2 Input file "$INPUT_FILE" not found && \
exit 1
# Since we know DEST_FORMAT, we know whether or not to use $papersizemod.
case "$DEST_FORMAT" in
fo | pdf | ps | dvi)
if [ "$NO_AUTOSIZE" -eq 0 ] && [ -n "$papersizemod" ]
then
XSL_MODS[$XSL_MOD_COUNT]="$papersizemod"
XSL_MOD_COUNT=$(($XSL_MOD_COUNT + 1))
fi
;;
esac
# Decide what source format this is. Default to DocBook.
#rootel=$(head -n 4 "$INPUT_FILE" | tr -d '\n' | \
# sed -e 's/^[^?>]*?>//g' -e 's/^]*>//g' -e 's/^<\([^ ]*\).*$/\1/')
# Seems reasonable fix the file command and teach it to identify the DTD/Schema but this is faster to write:
rootel=$(echo "xpath *" | "$XMLLINT_PATH" --shell "$INPUT_FILE" 2> /dev/null | head -n 3 |$TAIL -1 | cut -f 4 -d " " )
case $(echo $rootel) in
fo:root)
SOURCE_FORMAT="fo"
;;
html)
SOURCE_FORMAT="xhtml1"
;;
esac
[ "$VERBOSE" -ge 1 ] && \
echo >&2 "Source format: ${SOURCE_FORMAT} / root element: ${rootel} "
# If the destination format is an absolute pathname then it's a
# user-defined format script. Otherwise it's one of ours.
case "$DEST_FORMAT" in
/*) FORMAT="$DEST_FORMAT" ;;
*) FORMAT="${FORMAT_DIR}/${SOURCE_FORMAT}/${DEST_FORMAT}" ;;
esac
[ "$VERBOSE" -ge 1 ] && echo >&2 "Format script: ${FORMAT}"
if [ ! -e "$FORMAT" ]
then
echo >&2 "I don't know how to convert ${SOURCE_FORMAT} into ${DEST_FORMAT}."
exit 1
fi
# Ask the format script what stylesheet to use.
XSLT_PROCESSOR="$XSLTPROC_PATH" # We only know about xsltproc right now.
export XSLT_PROCESSOR
export ZIP_PATH
export W3M_PATH
export GCP_PATH
export LINKS_PATH
export LYNX_PATH
export FOP_PATH
export DBLATEX_PATH
export XMLTEX_PATH
export PDFXMLTEX_PATH
export USE_BACKEND
if [ -z "$STYLESHEET" ]
then
STYLESHEET="$(${BASH} "$FORMAT" stylesheet)" || exit 1
fi
# We might need to create a temporary stylesheet if there are
# XSL fragments that need adding.
if [ "$XSL_MOD_COUNT" -gt "0" -a -n "$STYLESHEET" ]
then
REAL_STYLESHEET="$STYLESHEET"
[ "$VERBOSE" -ge 1 ] && echo >&2 "Real stylesheet: ${REAL_STYLESHEET}"
make_temp xsl STYLESHEET
cat << EOF > "$STYLESHEET"
EOF
i=0
while [ "$i" -lt "$XSL_MOD_COUNT" ]
do
cat << EOF >> "$STYLESHEET"
EOF
i=$(($i + 1))
done
cat << EOF >> "$STYLESHEET"
EOF
fi
make_temp -d "" XSLT_PROCESSED_DIR
cd "$XSLT_PROCESSED_DIR"
# Validate the input
if [ "$SKIP_VALIDATION" -eq 0 ] && [ "$SOURCE_FORMAT" != "fo" ]
then
#do we have xmllint validation tool?
if [ -z "`type -t $XMLLINT_PATH`" ]
then
echo >&2 "xmlto: xmllint validation tool not found or not executable."
echo >&2 "xmlto: Skipping validation... " \
"Please make sure xmllint is installed."
else
VALIDATION="${XSLT_PROCESSED_DIR}/validation-errors"
[ "$VERBOSE" -ge 1 ] && \
echo >&2 \
"\"${XMLLINT_PATH}\" --noout --nonet --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\""
# eval is for SEARCHPATH_FORMATTED's proper expansion
# make sure expansions are protected from eval
eval "\"${XMLLINT_PATH}\" --noout --nonet --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\"" 2>"${VALIDATION}"
xmllint_status=$?
if [ $xmllint_status -ne 0 ]
then
echo >&2 "xmlto: $INPUT_FILE does not validate (status ${xmllint_status})"
echo >&2 "xmlto: Fix document syntax or use --skip-validation option"
cat >&2 "${VALIDATION}"
exit $(($xmllint_status + 10))
fi
rm -f "${VALIDATION}"
fi
fi
if [ -z "${STYLESHEET}" ]
then
# No stylesheet: no XSL-T processing to do.
XSLT_PROCESSED="$INPUT_FILE"
else
#do we have xsltproc tool?
if [ -z "`type -t $XSLTPROC_PATH`" ]
then
echo >&2 "xmlto: Can't continue, xsltproc tool not found or not executable."
exit 3
fi
[ "$VERBOSE" -ge 1 ] && echo >&2 "Stylesheet: ${STYLESHEET}"
XSLT_PROCESSED="$XSLT_PROCESSED_DIR/$(basename "${INPUT_FILE%.*}").proc"
if [ "$VERBOSE" -gt 2 ]
then
XSLTOPTS="$XSLTOPTS -v"
fi
XSLTOPTS="${XSLTPARAMS} ${XSLTOPTS}"
[ "${VERBOSE}" -ge 1 ] && \
echo -e >&2 "${XSLTPROC_PATH} ${XSLTOPTS} ${SEARCHPATH_FORMATTED} \\\\\n -o \"${XSLT_PROCESSED}\" \\\\\n \"${STYLESHEET}\" \\\\\n \"${INPUT_FILE}\""
# eval is for SEARCHPATH_FORMATTED's proper expansion
eval "\"${XSLTPROC_PATH}\" ${XSLTOPTS} ${SEARCHPATH_FORMATTED} -o \"${XSLT_PROCESSED}\" \"${STYLESHEET}\" \"${INPUT_FILE}\""
#xsltproc may return no file on empty input, touch it to have it for sure
touch "$XSLT_PROCESSED"
if [ $? == 4 ]
then
XSLTOPTS="${XSLTOPTS} --catalogs"
if [ "$VERBOSE" -ge 1 ]; then
echo >&2 "No XML Catalogs? Trying again with --catalogs:"
echo -e >&2 "${XSLTPROC_PATH} ${XSLTOPTS} ${SEARCHPATH_FORMATTED}\\\\\n -o \"${XSLT_PROCESSED}\" \\\\\n \"${STYLESHEET}\" \\\\\n \"${INPUT_FILE}\""
fi
eval "\"${XSLTPROC_PATH}\"" ${XSLTOPTS} ${SEARCHPATH_FORMATTED} -o "\"${XSLT_PROCESSED}\"" "\"${STYLESHEET}\"" "\"${INPUT_FILE}\""
fi
xsltproc_status=$?
[ ${xsltproc_status} -gt 0 ] && exit ${xsltproc_status}
fi
if [ ! -d "$OUTPUT_DIR" ]
then
[ "$VERBOSE" -ge 1 ] && echo >&2 "Creating output directory ${OUTPUT_DIR}"
mkdir -p "$OUTPUT_DIR"
fi
# Run the format script in post-process mode to finish off.
export OUTPUT_DIR
export POSTARGS
export POSTPOSTARGS
export XSLT_PROCESSED
export INPUT_FILE
export SEARCHPATH
if [ "$VERBOSE" -gt 2 ]
then
# Extremely verbose
BASH="${BASH} -x"
fi
${BASH} "$FORMAT" post-process || exit 1
07070100004940000081ed0000000000000000000000015334e7a10000b4680000011200010050ffffffffffffffff0000001900000000root/usr/local/bin/xmlif ELF > @ @ h @ 8 @ @ @ @ @ o @ @ N N P PA D A Pdd @ t t /usr/lib/amd64/ld.so.1 ;t - @! ! ! " @$ 8 `% X % x % - `4 p5 P6 8 8 : X p; x <