From 45fa654c6f794f0bc2ddf5e7c72adfd7cb5a437c Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Thu, 18 Jul 2019 06:35:16 +0200 Subject: [PATCH] Added charset declaration for HTML Started a test framework --- ChangeLog | 10 +- Makefile.am | 2 +- Makefile.in | 75 ++-- configure | 214 ++++++----- configure.ac | 2 +- doc/Makefile.in | 14 +- html.xsl | 4 + latex.xsl | 2 +- test-driver | 148 ++++++++ test/Makefile.am | 4 + test/Makefile.in | 807 ++++++++++++++++++++++++++++++++++++++++ test/basic | 5 + test/basic.html.exp | 110 ++++++ test/basic.tex.exp | 15 + test/basic.xml | 14 + test/check | 22 ++ test/main.css | 79 ++++ test/paragraph | 5 + test/paragraph.html.exp | 126 +++++++ test/paragraph.tex.exp | 53 +++ test/paragraph.xml | 39 ++ test/sections | 5 + test/sections.html.exp | 138 +++++++ test/sections.tex.exp | 83 +++++ test/sections.xml | 55 +++ test/title | 5 + test/title.html.exp | 112 ++++++ test/title.tex.exp | 27 ++ test/title.xml | 18 + test/titlepage | 5 + test/titlepage.html.exp | 117 ++++++ test/titlepage.tex.exp | 48 +++ test/titlepage.xml | 23 ++ test/toc | 5 + test/toc.html.exp | 140 +++++++ test/toc.tex.exp | 88 +++++ test/toc.toc | 12 + test/toc.xml | 57 +++ 38 files changed, 2533 insertions(+), 155 deletions(-) create mode 100755 test-driver create mode 100644 test/Makefile.am create mode 100644 test/Makefile.in create mode 100755 test/basic create mode 100644 test/basic.html.exp create mode 100644 test/basic.tex.exp create mode 100644 test/basic.xml create mode 100755 test/check create mode 100644 test/main.css create mode 100755 test/paragraph create mode 100644 test/paragraph.html.exp create mode 100644 test/paragraph.tex.exp create mode 100644 test/paragraph.xml create mode 100755 test/sections create mode 100644 test/sections.html.exp create mode 100644 test/sections.tex.exp create mode 100644 test/sections.xml create mode 100755 test/title create mode 100644 test/title.html.exp create mode 100644 test/title.tex.exp create mode 100644 test/title.xml create mode 100755 test/titlepage create mode 100644 test/titlepage.html.exp create mode 100644 test/titlepage.tex.exp create mode 100644 test/titlepage.xml create mode 100755 test/toc create mode 100644 test/toc.html.exp create mode 100644 test/toc.tex.exp create mode 100644 test/toc.toc create mode 100644 test/toc.xml diff --git a/ChangeLog b/ChangeLog index 09817c7..3ed2fb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -Version 0.7 - Apr 04, 2012 +Version 0.8 - Jul 26, 2019 +=========================================================== + +o Correction of namespeaces +o Use $prefix in the path for stylesheets +o Added charset declaration for HTML +o Started a test framework + +Version 0.7 - Apr 26, 2012 =========================================================== o Added depcomp to the distribution diff --git a/Makefile.am b/Makefile.am index 4a73b40..2834498 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to create Makefile.in -SUBDIRS = . doc +SUBDIRS = . doc test xsltdir = $(prefix)/xslt diff --git a/Makefile.in b/Makefile.in index 7b22289..f99c5a8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -149,8 +149,7 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/xp.Po +am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -187,7 +186,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir distdir-am dist dist-all distcheck + cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -335,6 +334,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -343,7 +343,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = . doc +SUBDIRS = . doc test xsltdir = $(prefix)/xslt bin_SCRIPTS = xml2html xml2latex xml2text xml2wiki EXTRA_DIST = xml2html.in xml2latex.in xml2text.in xml2wiki.in @@ -374,8 +374,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -482,13 +482,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xp.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -631,10 +625,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -699,7 +690,7 @@ distdir-am: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -725,7 +716,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -743,7 +734,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -753,7 +744,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -866,7 +857,7 @@ clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/xp.Po + -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -914,7 +905,7 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/xp.Po + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -936,23 +927,23 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--depfiles am--refresh check check-am clean \ - clean-binPROGRAMS clean-cscope clean-generic cscope \ - cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-binSCRIPTS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip install-xsltDATA \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-xsltDATA + am--refresh check check-am clean clean-binPROGRAMS \ + clean-cscope clean-generic cscope cscopelist-am ctags ctags-am \ + dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-xsltDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-xsltDATA .PRECIOUS: Makefile diff --git a/configure b/configure index 605e394..8d0cd93 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#! /data/data/com.termux/files/usr/bin/sh +#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for xmldoc 0.8. # @@ -276,7 +276,7 @@ $0: have one." fi fi fi -SHELL=${CONFIG_SHELL-/data/data/com.termux/files/usr/bin/sh} +SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= @@ -636,6 +636,7 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE +am__quote am__include DEPDIR OBJEXT @@ -691,6 +692,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -709,8 +711,7 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL -am__quote' +SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -764,6 +765,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1016,6 +1018,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1153,7 +1164,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1306,6 +1317,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2073,7 +2085,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.16' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2495,7 +2507,7 @@ if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF -SHELL = /data/data/com.termux/files/usr/bin/sh +SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF @@ -2618,8 +2630,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2670,7 +2682,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3533,45 +3545,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' + +am_make=${MAKE-make} +cat > confinc << 'END' am__doit: - @echo this is the am__doit target >confinc.out + @echo this is the am__doit target .PHONY: am__doit END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -4523,7 +4535,7 @@ fi -ac_config_files="$ac_config_files Makefile doc/Makefile xml2html xml2latex xml2text xml2wiki" +ac_config_files="$ac_config_files Makefile doc/Makefile test/Makefile xml2html xml2latex xml2text xml2wiki" cat >confcache <<\_ACEOF @@ -5257,7 +5269,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF @@ -5270,6 +5282,7 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "xml2html") CONFIG_FILES="$CONFIG_FILES xml2html" ;; "xml2latex") CONFIG_FILES="$CONFIG_FILES xml2latex" ;; "xml2text") CONFIG_FILES="$CONFIG_FILES xml2text" ;; @@ -5707,35 +5720,29 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf + for mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -5753,48 +5760,53 @@ $as_echo X"$am_mf" | q } s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } - /^X\/\(\/\/\)$/{ + /^X\(\/\/\)[^/].*/{ s//\1/ q } - /^X\/\(\/\).*/{ + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk } ;; diff --git a/configure.ac b/configure.ac index 3dc2db9..8bf717f 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,6 @@ AC_C_CONST dnl Checks for library functions. -AC_CONFIG_FILES([Makefile doc/Makefile xml2html xml2latex xml2text xml2wiki]) +AC_CONFIG_FILES([Makefile doc/Makefile test/Makefile xml2html xml2latex xml2text xml2wiki]) AC_OUTPUT diff --git a/doc/Makefile.in b/doc/Makefile.in index 59ca836..c5333d7 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -196,6 +196,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -230,8 +231,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -249,10 +250,7 @@ ctags CTAGS: cscope cscopelist: -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ diff --git a/html.xsl b/html.xsl index ec13895..ac20845 100644 --- a/html.xsl +++ b/html.xsl @@ -9,12 +9,16 @@ + stylesheet text/css + <xsl:if test='not(*/titlepage/title)'> + - + </xsl:if> <xsl:value-of select="*/titlepage/title"/> + + + +

1 The only chapter

+ +
+ diff --git a/test/basic.tex.exp b/test/basic.tex.exp new file mode 100644 index 0000000..f81846e --- /dev/null +++ b/test/basic.tex.exp @@ -0,0 +1,15 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \chapter{The only chapter} + + + +\end{document} diff --git a/test/basic.xml b/test/basic.xml new file mode 100644 index 0000000..3d45b6d --- /dev/null +++ b/test/basic.xml @@ -0,0 +1,14 @@ + + + + + + + + The only chapter + + + + + + diff --git a/test/check b/test/check new file mode 100755 index 0000000..190d0a0 --- /dev/null +++ b/test/check @@ -0,0 +1,22 @@ +#!/bin/bash + +FILE=$1 +STATUS=0 + +../xp ../html.xsl $FILE.xml >$FILE.html +diff $FILE.html.exp $FILE.html +RESULT=$? +if [ $STATUS == 0 ] +then + STATUS=$RESULT +fi + +../xp --latex ../latex.xsl $FILE.xml >$FILE.tex +diff $FILE.tex.exp $FILE.tex +RESULT=$? +if [ $STATUS == 0 ] +then + STATUS=$RESULT +fi + +exit $STATUS diff --git a/test/main.css b/test/main.css new file mode 100644 index 0000000..bf4e975 --- /dev/null +++ b/test/main.css @@ -0,0 +1,79 @@ + +body +{ + background : white; + color : black; +} + +h1 +{ + color : blue; + font-family : sans-serif ; + font-size : 150%; +} + +h1.titlepage +{ + color : black; + font-family : sans-serif ; + font-size : 150%; + text-align : center ; +} + +h2.titlepage +{ + color : black; + font-family : sans-serif ; + font-size : 120%; + text-align : center ; +} + +h2 +{ + color : green; +} + +div.titlepage +{ + background : rgb(204, 204, 255) ; + border: solid; + border-width: thin; + padding : 1em; + margin : 5% ; + width: 90%; + text-align : center ; +} + +p +{ + font-size : 100%; +} + +pre.example +{ + background : lightblue ; + width : 90% ; + margin-left: 5% ; +} + +span.remark +{ + font-size : 90%; + background : yellow ; + color : rgb(0, 0, 150); +} + +table +{ + width : 80% ; + border-width : medium ; + border-style : solid ; + border-collapse : collapse; + padding : 1px ; +} + +dt +{ + font-weight : bold ; + top-margin : 1ex; +} diff --git a/test/paragraph b/test/paragraph new file mode 100755 index 0000000..1fb40a1 --- /dev/null +++ b/test/paragraph @@ -0,0 +1,5 @@ +#!/bin/bash + +./check paragraph + +exit $? diff --git a/test/paragraph.html.exp b/test/paragraph.html.exp new file mode 100644 index 0000000..e323c1e --- /dev/null +++ b/test/paragraph.html.exp @@ -0,0 +1,126 @@ + + + + + + + xmldoc paragraph check + + + + +
+

xmldoc paragraph check

+
+ +

1 The only chapter

+ This testcase test paragraphs and related block level content. +

+ This paragraph is printed in a quote environment. +

+      A verbatim element prints text with
+              spaces   and
+              linebreaks
+        preserved.
+      
+      An example is like verbatim
+
+         but puts the text
+         in a box.
+      
+ +
+ diff --git a/test/paragraph.tex.exp b/test/paragraph.tex.exp new file mode 100644 index 0000000..6abecad --- /dev/null +++ b/test/paragraph.tex.exp @@ -0,0 +1,53 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \begin{titlepage} + + + \begin{center} + \sffamily\bfseries\LARGE{xmldoc paragraph check} + \end{center} + + + \end{titlepage} + + + + \chapter{The only chapter} + + This testcase test paragraphs and related block level content. + +\begin{quote} + + This paragraph is printed in a quote environment. + +\end{quote} + +\begin{verbatim} + + A verbatim element prints text with + spaces and + linebreaks + preserved. + +\end{verbatim} + +\begin{verbatim} + + An example is like verbatim + + but puts the text + in a box. + +\end{verbatim} + + + +\end{document} diff --git a/test/paragraph.xml b/test/paragraph.xml new file mode 100644 index 0000000..4891783 --- /dev/null +++ b/test/paragraph.xml @@ -0,0 +1,39 @@ + + + + + + + + xmldoc paragraph check + + + + The only chapter + + This testcase test paragraphs and related block level content. + + + + This paragraph is printed in a quote environment. + + + + A verbatim element prints text with + spaces and + linebreaks + preserved. + + + + An example is like verbatim + + but puts the text + in a box. + + + + + + + diff --git a/test/sections b/test/sections new file mode 100755 index 0000000..f890321 --- /dev/null +++ b/test/sections @@ -0,0 +1,5 @@ +#!/bin/bash + +./check sections + +exit $? diff --git a/test/sections.html.exp b/test/sections.html.exp new file mode 100644 index 0000000..b7f5aa5 --- /dev/null +++ b/test/sections.html.exp @@ -0,0 +1,138 @@ + + + + + + + xmldoc sectioning check + + + + +
+

xmldoc sectioning check

+ Arjen Baart <arjen@andromeda.nl>
+

July 15, 2019

+
+ +

1 The first chapter

1.1 The first section

+

1.1.1 The first subsection

+ +

1.1.1.1 The first subsubsection

+ +

1.1.1.1.1 The first paragraph

+ +

1.1.1.1.1.1 The first subparagraph

+ + + + + +

2 The second chapter

2.1 The second section

+

2.1.1 The second subsection

+ +

2.1.1.1 The second subsubsection

+ +

2.1.1.1.1 The second paragraph

+ +

2.1.1.1.1.1 The second subparagraph

+ + + + + +
+ diff --git a/test/sections.tex.exp b/test/sections.tex.exp new file mode 100644 index 0000000..e8e7bed --- /dev/null +++ b/test/sections.tex.exp @@ -0,0 +1,83 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \begin{titlepage} + + + \begin{center} + \sffamily\bfseries\LARGE{xmldoc sectioning check} + \end{center} + + + \begin{center} + \sffamily{Arjen Baart \verb+<+arjen@andromeda.nl\verb+>+} + \end{center} + + + \begin{center} + \sffamily{July 15, 2019} + \end{center} + + + \end{titlepage} + + + + \chapter{The first chapter} + + \section{The first section} + + + \subsection{The first subsection} + + + + \subsubsection{The first subsubsection} + + + + \paragraph{The first paragraph} + + + + \subparagraph{The first subparagraph} + + + + + + + + \chapter{The second chapter} + + \section{The second section} + + + \subsection{The second subsection} + + + + \subsubsection{The second subsubsection} + + + + \paragraph{The second paragraph} + + + + \subparagraph{The second subparagraph} + + + + + + + +\end{document} diff --git a/test/sections.xml b/test/sections.xml new file mode 100644 index 0000000..50e079a --- /dev/null +++ b/test/sections.xml @@ -0,0 +1,55 @@ + + + + + + + + xmldoc sectioning check + Arjen Baart <arjen@andromeda.nl> + July 15, 2019 + + + + The first chapter +
+ The first section + + The first subsection + + The first subsubsection + + The first paragraph + + The first subparagraph + + + + +
+ +
+ + + The second chapter +
+ The second section + + The second subsection + + The second subsubsection + + The second paragraph + + The second subparagraph + + + + +
+ +
+ +
+ +
diff --git a/test/title b/test/title new file mode 100755 index 0000000..7ebc819 --- /dev/null +++ b/test/title @@ -0,0 +1,5 @@ +#!/bin/bash + +./check title + +exit $? diff --git a/test/title.html.exp b/test/title.html.exp new file mode 100644 index 0000000..a828035 --- /dev/null +++ b/test/title.html.exp @@ -0,0 +1,112 @@ + + + + + + + xmldoc title check + + + + +
+

xmldoc title check

+
+ +

1 The only chapter

+ +
+ diff --git a/test/title.tex.exp b/test/title.tex.exp new file mode 100644 index 0000000..4c4c413 --- /dev/null +++ b/test/title.tex.exp @@ -0,0 +1,27 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \begin{titlepage} + + + \begin{center} + \sffamily\bfseries\LARGE{xmldoc title check} + \end{center} + + + \end{titlepage} + + + + \chapter{The only chapter} + + + +\end{document} diff --git a/test/title.xml b/test/title.xml new file mode 100644 index 0000000..3bbc36a --- /dev/null +++ b/test/title.xml @@ -0,0 +1,18 @@ + + + + + + + + xmldoc title check + + + + The only chapter + + + + + + diff --git a/test/titlepage b/test/titlepage new file mode 100755 index 0000000..17bd3a7 --- /dev/null +++ b/test/titlepage @@ -0,0 +1,5 @@ +#!/bin/bash + +./check titlepage + +exit $? diff --git a/test/titlepage.html.exp b/test/titlepage.html.exp new file mode 100644 index 0000000..26fa1a6 --- /dev/null +++ b/test/titlepage.html.exp @@ -0,0 +1,117 @@ + + + + + + + xmldoc titlepage check + + + + +
+

xmldoc titlepage check

+ Arjen Baart <arjen@andromeda.nl>
+

July 13, 2019

+

Abstract:

+ XMLdoc test suite for regression testing +

+
+ +

1 The only chapter

+ +
+ diff --git a/test/titlepage.tex.exp b/test/titlepage.tex.exp new file mode 100644 index 0000000..47cce90 --- /dev/null +++ b/test/titlepage.tex.exp @@ -0,0 +1,48 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \begin{titlepage} + + + \begin{center} + \sffamily\bfseries\LARGE{xmldoc titlepage check} + \end{center} + + + \begin{center} + \sffamily{Arjen Baart \verb+<+arjen@andromeda.nl\verb+>+} + \end{center} + + + \begin{center} + \sffamily{July 13, 2019} + \end{center} + + + + \vspace{0.5cm} + \begin{bfseries}Abstract:\end{bfseries} + + \begin{quote} + + XMLdoc test suite for regression testing + + \end{quote} + + + \end{titlepage} + + + + \chapter{The only chapter} + + + +\end{document} diff --git a/test/titlepage.xml b/test/titlepage.xml new file mode 100644 index 0000000..f99c6f0 --- /dev/null +++ b/test/titlepage.xml @@ -0,0 +1,23 @@ + + + + + + + + xmldoc titlepage check + Arjen Baart <arjen@andromeda.nl> + July 13, 2019 + + XMLdoc test suite for regression testing + + + + + The only chapter + + + + + + diff --git a/test/toc b/test/toc new file mode 100755 index 0000000..4dc3782 --- /dev/null +++ b/test/toc @@ -0,0 +1,5 @@ +#!/bin/bash + +./check toc + +exit $? diff --git a/test/toc.html.exp b/test/toc.html.exp new file mode 100644 index 0000000..d7f4c61 --- /dev/null +++ b/test/toc.html.exp @@ -0,0 +1,140 @@ + + + + + + + xmldoc table of contents check + + + + +
+

xmldoc table of contents check

+ Arjen Baart <arjen@andromeda.nl>
+

July 15, 2019

+
+ +

Table Of Contents

1 The first chapter

1.1 The first section

2 The second chapter

2.1 The second section


+ +

1 The first chapter

1.1 The first section

+

1.1.1 The first subsection

+ +

1.1.1.1 The first subsubsection

+ +

1.1.1.1.1 The first paragraph

+ +

1.1.1.1.1.1 The first subparagraph

+ + + + + +

2 The second chapter

2.1 The second section

+

2.1.1 The second subsection

+ +

2.1.1.1 The second subsubsection

+ +

2.1.1.1.1 The second paragraph

+ +

2.1.1.1.1.1 The second subparagraph

+ + + + + +
+ diff --git a/test/toc.tex.exp b/test/toc.tex.exp new file mode 100644 index 0000000..3b06e9b --- /dev/null +++ b/test/toc.tex.exp @@ -0,0 +1,88 @@ + +\documentclass[a4paper]{book} +\usepackage{xcolor} +\usepackage{graphics} +\usepackage{latexsym} +\usepackage{marvosym} +\begin{document} + + + + \begin{titlepage} + + + \begin{center} + \sffamily\bfseries\LARGE{xmldoc table of contents check} + \end{center} + + + \begin{center} + \sffamily{Arjen Baart \verb+<+arjen@andromeda.nl\verb+>+} + \end{center} + + + \begin{center} + \sffamily{July 15, 2019} + \end{center} + + + \end{titlepage} + + + +\tableofcontents +\newpage + + + + \chapter{The first chapter} + + \section{The first section} + + + \subsection{The first subsection} + + + + \subsubsection{The first subsubsection} + + + + \paragraph{The first paragraph} + + + + \subparagraph{The first subparagraph} + + + + + + + + \chapter{The second chapter} + + \section{The second section} + + + \subsection{The second subsection} + + + + \subsubsection{The second subsubsection} + + + + \paragraph{The second paragraph} + + + + \subparagraph{The second subparagraph} + + + + + + + +\end{document} diff --git a/test/toc.toc b/test/toc.toc new file mode 100644 index 0000000..e4a5c98 --- /dev/null +++ b/test/toc.toc @@ -0,0 +1,12 @@ +\contentsline {chapter}{\numberline {1}The first chapter}{5} +\contentsline {section}{\numberline {1.1}The first section}{5} +\contentsline {subsection}{\numberline {1.1.1}The first subsection}{5} +\contentsline {subsubsection}{The first subsubsection}{5} +\contentsline {paragraph}{The first paragraph}{5} +\contentsline {subparagraph}{The first subparagraph}{5} +\contentsline {chapter}{\numberline {2}The second chapter}{7} +\contentsline {section}{\numberline {2.1}The second section}{7} +\contentsline {subsection}{\numberline {2.1.1}The second subsection}{7} +\contentsline {subsubsection}{The second subsubsection}{7} +\contentsline {paragraph}{The second paragraph}{7} +\contentsline {subparagraph}{The second subparagraph}{7} diff --git a/test/toc.xml b/test/toc.xml new file mode 100644 index 0000000..c8d9966 --- /dev/null +++ b/test/toc.xml @@ -0,0 +1,57 @@ + + + + + + + + xmldoc table of contents check + Arjen Baart <arjen@andromeda.nl> + July 15, 2019 + + + + + + The first chapter +
+ The first section + + The first subsection + + The first subsubsection + + The first paragraph + + The first subparagraph + + + + +
+ +
+ + + The second chapter +
+ The second section + + The second subsection + + The second subsubsection + + The second paragraph + + The second subparagraph + + + + +
+ +
+ +
+ +
-- 2.20.1