Skip to content

Commit

Permalink
Merge branch '4.0.beta2' into assemble-without-xmlbase
Browse files Browse the repository at this point in the history
  • Loading branch information
fsundermeyer authored Jul 1, 2024
2 parents 7e233a4 + 9ea694c commit 45e5cce
Show file tree
Hide file tree
Showing 106 changed files with 1,599 additions and 2,063 deletions.
54 changes: 54 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
-------------------------------------------------------------------
Mo Jul 01 10:45:17 UTC 2023 - [email protected]

Beta release DAPS 4.0.beta2:

* New features:
-new command line switch for the "validation" subcommand:
"--extended-validation=<VALUE>"
Comma-separated list of extended validation checks
Possible values:
all|ALL: shortcut for all checks listed below
ids: checks for IDs that are not SEO friendly
images: checks for missing and duplicated images
inlines: checks for empty inline elements
tables: checks for invalid tables
Example: --extended-validation="ids,tables"
Default: unset
- new subcommand "docinfo"
Shows the following information (if available)
Title:
Subtitle:
Product Name:
Product Version:
Authors:
Language:
Type:
Root ID:
(https://github.com/openSUSE/daps/issues/414)
* Improvements
- debug/verbose output now also shows values for STYLEASSEMBLY
STRUCTID for DocBook assembly sources
- DAPS ships a customization layer of the assembly staylsheet
which prevents writing of xml:base attributes to avoid
problems with image paths in fo/pdf. To re-enable xml:base,
use the sring parameter
- "list-src-files" should work much more relaibly for ASCIIDOC
sources now
- Documentation has been completely reviewed and anhanced, some
4.0 updates are still missing, though
* Bug fixes:
- Path to log file is shown when in debug mode
(https://github.com/openSUSE/daps/issues/154)
- proper error message is shown when processing dia or ditaa
images but the respective packages are not installed
(https://github.com/openSUSE/daps/issues/642)
- RPM packaging: made poppler-tools an optional dependency
(https://github.com/openSUSE/daps/issues/716)
- Assemblies: DAPS ships a customization for the assembly
stylesheet that removes adding xml:base to the bigfile that
is created. With the xml:base entries image paths in fo/pdf
are wrong.
* Removed features:
- DC-file must not be a link anymore

-------------------------------------------------------------------
Tue Feb 21 11:02:00 UTC 2023 - [email protected]

Expand Down
14 changes: 7 additions & 7 deletions INSTALL.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,16 @@ will output detailed information about the support status on your system.
|docbook5-xsl-stylesheets |docbook-xsl-ns |docbook5-style-xsl
|ImageMagick |imagemagick |ImageMagick
|inkscape |inkscape |inkscape
|libxml2-tools |libxml2-utils |libxml2
|libxml2 |libxml2-utils |libxml2
|-- |libxml-commons-external-java|--
|-- |libxmlgraphics-commons-java |--
|libxslt-tools |-- |libxslt
|jing |jing |jing
|make |make |make
|poppler-tools |poppler-utils |poppler-utils
|python-xml |python3-libxml2 |python3-libxml2
|python-lxml |python3-lxml |python3-lxml
|python3-lxml |python3-lxml |python3-lxml
|sgml-skel |sgml-base |sgml-common
|svg-dtd |sgml-data |?
|w3m |w3m |w3m
|xml-commons-jaxp-1.3-apis| -- |xml-commons-apis
|svg-schema |sgml-data |?
|xml-apis | -- |xml-commons-apis
|xmlgraphics-fop^2^ |fop^2^ |fop^2^
|xmlstarlet |xmlstarlet |xmlstarlet
|-- |xsltproc |--
Expand All @@ -103,14 +100,17 @@ installed.
|====
|SUSE |Debian/Ubuntu |Fedora
|aspell |aspell |aspell
|calibre |calibre |calibre
|ditaa |ditaa |ditaa
|epubcheck |epubcheck |?
|libreoffice-draw |libreoffice-draw |libreoffice-draw
|optipng |optipng |optipng
|perl-checkbot |checkbot |?
|poppler-tools |poppler-utils |poppler-utils
|remake |remake |n/a^4^
|saxon6 |libsaxon-java |?
|saxon6-scripts |-- |?
|w3m |w3m |w3m
|xmlformat |xmlformat-perl |?
|====

Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ all-local: $(USERGUIDE) $(QUICKSTART) $(dist_man1_MANS) $(DAPS_CATALOG)

INSTALLDIRS = $(DESTDIR)$(docdir)/html $(DESTDIR)$(pkgdatadir) \
$(DESTDIR)$(datadir)/xml/$(PACKAGE)/schema/ \
$(DESTDIR)$(templatedir)
$(DESTDIR)$(templatedir) $(DESTDIR)$(bindir)


install-data-local: $(INSTALLDIRS) autobuild/daps-autobuild
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ dist_man1_MANS = $(addprefix $(MAN_BUILD_PATH), $(MAN_PAGES))
#---------------------------Local INSTALLATION--------------------------------
INSTALLDIRS = $(DESTDIR)$(docdir)/html $(DESTDIR)$(pkgdatadir) \
$(DESTDIR)$(datadir)/xml/$(PACKAGE)/schema/ \
$(DESTDIR)$(templatedir)
$(DESTDIR)$(templatedir) $(DESTDIR)$(bindir)

all: all-recursive

Expand Down
2 changes: 1 addition & 1 deletion bin/daps-xmlformat.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function exit_on_error {
# take the first one that exists
#
for _BINARY in xmlformat xmlformat.pl xmlformat.rb; do
XMLFORMAT_CMD="$(which --skip-alias --skip-functions "$_BINARY" 2>/dev/null)" && break
XMLFORMAT_CMD="$(which "$_BINARY" 2>/dev/null)" && break
done

_XMLF_VERSION=$($XMLFORMAT_CMD --version 2>/dev/null | head -n1 | cut -d' ' -f2)
Expand Down
24 changes: 17 additions & 7 deletions bin/daps.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ export prefix=@prefix@
# need to be added here!!
#






declare -a VARLIST
VARLIST=(
ADOC_ATTRIBUTES
Expand All @@ -67,6 +62,7 @@ VARLIST=(
DEBUG
DAPSROOT
DAPSROOT_DEFAULT
DC_FILE
DEF_FILE
DIA_OPTIONS
DOCBOOK4_PROFILE_URN
Expand Down Expand Up @@ -157,6 +153,7 @@ VARLIST=(
XML_CATALOG_FILES
XMLFORMAT_CONFIG_FILE
XML_MAIN_CATALOG
XMLSTARLET
XML_USER_CATALOGS
XSLTPARAM
XSLTPROC
Expand Down Expand Up @@ -194,6 +191,13 @@ UNSETLIST=(
)
unset "${UNSETLIST[@]}"

# check for xmlstarlet binary
for _binary in xmlstarlet xml; do
XMLSTARLET=$(which $_binary 2>/dev/null)
[[ 0 -eq $? ]] && break
done
[[ -z $XMLSTARLET ]] && exit_on_error "Required package \"xmlstarlet\" is not installed"

# PATHLIST contains all variables holding a path. Relative paths need to be
# made absolute and we need this list in order to know which variables hold
# path information
Expand Down Expand Up @@ -311,6 +315,9 @@ HELP_SUBCOMMAND[dist-webhelp]="Creates a distributable tar archive of a webhelp
SUBCOMMANDS[dist-webhelp-name]="show_names"
HELP_SUBCOMMAND[dist-webhelp-name]="Print the file name that would result when building a distributable tar archive\nof a webhelp document."

SUBCOMMANDS[docinfo]="build_generic"
HELP_SUBCOMMAND[docinfo]="Print information such as title, language, etc on a book or article."

SUBCOMMANDS[epub]="build_epub"
HELP_SUBCOMMAND[epub]="Build an eBook from the XML sources."

Expand Down Expand Up @@ -393,7 +400,7 @@ SUBCOMMANDS[pdf-name]="show_names"
HELP_SUBCOMMAND[pdf-name]="Print the file name that would result when building a grayscale PDF document."

SUBCOMMANDS[productinfo]="build_generic"
HELP_SUBCOMMAND[productinfo]="Print the contents of the tags <productname> and <productnumber for the given ROOTID"
HELP_SUBCOMMAND[productinfo]="Print the contents of the tags <productname> and <productnumber for the given ROOTID."

SUBCOMMANDS[profile]="build_generic"
HELP_SUBCOMMAND[profile]="Create profiled souces from the original XML sources. If the MAIN-file does\nnot contain profiling instructions, link the files into the profile directory."
Expand Down Expand Up @@ -636,6 +643,8 @@ Subcommands:
errors that cannot be found otherwise.
dapsenv Print a list of the most important make variables
and their value.
docinfo Print information such as title, language, etc
on a book or article.
images Generates all images for the given DC-file or
rootid.
showvariable Print value of a given make variable:
Expand Down Expand Up @@ -987,6 +996,7 @@ while true ; do
;;
-d|--docconfig|-e|--envfile)
# make path absolute and strip trailing slash
[[ -h "$2" ]] && exit_on_error "The DC-file must not by a symbolic link."
sanitize_path "$2" "DOCCONF"
shift 2
;;
Expand Down Expand Up @@ -1658,7 +1668,7 @@ DOCBOOK_STYLES=${DOCBOOK_STYLES%/}
# ----------------------------------------------------------------------------
# Check whether we have an assembly by checking the root element from MAIN
#
IS_ASSEMBLY=$(xml sel -t -v "local-name(/*)" $MAIN 2>/dev/null)
IS_ASSEMBLY=$($XMLSTARLET sel -t -v "local-name(/*)" $MAIN 2>/dev/null)

# ----------------------------------------------------------------------------
# Now export all variables set by the config file
Expand Down
63 changes: 63 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4502,6 +4502,40 @@ if test -z "$HAVE_DOCBOOK_51"; then
printf "%s\n" "$as_me: WARNING: Seems you do not have DocBook 5.1 installed." >&2;}
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ===== Checking for DocBook 5.2..." >&5
printf "%s\n" "$as_me: ===== Checking for DocBook 5.2..." >&6;}
for XML_SCHEMA in "http://docbook.org/xml/5.2/rng/docbookxi.rng" \
"http://docbook.org/xml/5.2/rng/docbookxi.rnc" \
"http://docbook.org/xml/5.2/rng/docbook.rng" \
"http://docbook.org/xml/5.2/rng/docbook.rnc" \
"http://docbook.org/xml/5.2/rng/assembly.rng" \
"http://docbook.org/xml/5.2/rng/assembly.rnc" \
"http://docbook.org/xml/5.2/rng/dbits.rng" \
"http://docbook.org/xml/5.2/rng/dbits.rnc" ; do
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XML_SCHEMA" >&5
printf %s "checking for $XML_SCHEMA... " >&6; }
if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$XMLCATALOG --noout \"\$root_catalog\" \"\$XML_SCHEMA\" >&2"; } >&5
($XMLCATALOG --noout "$root_catalog" "$XML_SCHEMA" >&2) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
HAVE_DOCBOOK_52=1
db5_version="5.2"
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
done
if test -z "$HAVE_DOCBOOK_52"; then
HAVE_DOCBOOK_52=0
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Seems you do not have DocBook 5.2 installed." >&5
printf "%s\n" "$as_me: WARNING: Seems you do not have DocBook 5.2 installed." >&2;}
fi
# In case DocBook 5 is not installed, setting db5_version fails and the
# URI in etc/config is set to an invalid value. Therefore let's set
# 5.0 as a hopefully sane default
Expand Down Expand Up @@ -7103,6 +7137,35 @@ else
printf "%s\n" "DocBook 5.1 support | yes |" >&6; }
fi
if test 0 = "$HAVE_DOCBOOK_52"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: DocBook 5.2 support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
" >&5
printf "%s\n" "DocBook 5.2 support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: DocBook 5.2 support | yes |" >&5
printf "%s\n" "DocBook 5.2 support | yes |" >&6; }
fi
if test 0 = "$HAVE_DOCBOOK_52"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: DocBook Assembly support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
" >&5
printf "%s\n" "DocBook Assembly support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: DocBook Assembly support | yes |" >&5
printf "%s\n" "DocBook Assembly support | yes |" >&6; }
fi
if test 0 = "$ASCIIDOCTOR"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Support AsciiDoc sources | no | install asciidoctor
| | rubygem" >&5
Expand Down
45 changes: 45 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,32 @@ if test -z "$HAVE_DOCBOOK_51"; then
AC_MSG_WARN([Seems you do not have DocBook 5.1 installed.])
fi


dnl Docbook 5.2
AC_MSG_NOTICE([===== Checking for DocBook 5.2...])
for XML_SCHEMA in "http://docbook.org/xml/5.2/rng/docbookxi.rng" \
"http://docbook.org/xml/5.2/rng/docbookxi.rnc" \
"http://docbook.org/xml/5.2/rng/docbook.rng" \
"http://docbook.org/xml/5.2/rng/docbook.rnc" \
"http://docbook.org/xml/5.2/rng/assembly.rng" \
"http://docbook.org/xml/5.2/rng/assembly.rnc" \
"http://docbook.org/xml/5.2/rng/dbits.rng" \
"http://docbook.org/xml/5.2/rng/dbits.rnc" ; do
AC_MSG_CHECKING([for $XML_SCHEMA])
if AC_RUN_LOG([$XMLCATALOG --noout "$root_catalog" "$XML_SCHEMA" >&2]); then
AC_MSG_RESULT([yes])
HAVE_DOCBOOK_52=1
db5_version="5.2"
else
AC_MSG_RESULT([no])
fi
done
if test -z "$HAVE_DOCBOOK_52"; then
HAVE_DOCBOOK_52=0
AC_MSG_WARN([Seems you do not have DocBook 5.2 installed.])
fi


# In case DocBook 5 is not installed, setting db5_version fails and the
# URI in etc/config is set to an invalid value. Therefore let's set
# 5.0 as a hopefully sane default
Expand Down Expand Up @@ -468,6 +494,25 @@ else
AC_MSG_RESULT([DocBook 5.1 support | yes |])
fi

if test 0 = "$HAVE_DOCBOOK_52"; then
AC_MSG_RESULT([DocBook 5.2 support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
])
else
AC_MSG_RESULT([DocBook 5.2 support | yes |])
fi

if test 0 = "$HAVE_DOCBOOK_52"; then
AC_MSG_RESULT([DocBook Assembly support | no | install DocBook 5.2, the
| | DocBook 5 XSL stylesheets,
| | and jing
])
else
AC_MSG_RESULT([DocBook Assembly support | yes |])
fi


dnl AsciiDoc support
if test 0 = "$ASCIIDOCTOR"; then
AC_MSG_RESULT([Support AsciiDoc sources | no | install asciidoctor
Expand Down
Loading

0 comments on commit 45e5cce

Please sign in to comment.