Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pdf static dir handling #720

Open
wants to merge 34 commits into
base: 4.0.beta2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ef12b20
Error out when no assembly styleshaeet can be found
fsundermeyer Feb 23, 2023
b8c96d7
daps-xmlformat: version 1.9 is the new default
fsundermeyer Mar 14, 2023
80c4920
Get a file list from an assembly file
tomschr Mar 31, 2023
1348f83
Add hint
tomschr Mar 31, 2023
d3b71db
Fixing debug output for IMG_SRC_DIR
fsundermeyer Jun 14, 2023
0f4a4d8
Added topic as a valid root element for rootid builds
fsundermeyer Jun 30, 2023
cb8086e
Removing assembly from filenames in docs
fsundermeyer Sep 8, 2023
f143768
Update phrases-decl.ent
dariavladykina Sep 13, 2023
200c023
Minor url spelling fixes
dariavladykina Sep 13, 2023
f65a1eb
Update install on sle info
dariavladykina Sep 19, 2023
7758364
Initial conceptual overview refresh
dariavladykina Sep 21, 2023
c31062a
Add para on assemblies
dariavladykina Sep 22, 2023
4a9a45f
Initial refresh of editing xml chapter
dariavladykina Sep 26, 2023
2e2c480
Add info on vscode and extensions, provide links
dariavladykina Sep 27, 2023
80b40ca
Remove section id to fix validation error
dariavladykina Sep 27, 2023
e65ea3e
Update of editing xml chapter and docbook examples in conceptual chapter
dariavladykina Oct 3, 2023
c4d2c33
Show path to log file when running daps --debug
fsundermeyer Nov 6, 2023
b54d62a
Documentation for issue #356
fsundermeyer Nov 6, 2023
e36dd31
New subcommand "docinfo"
fsundermeyer Nov 6, 2023
176cf0e
A better docinfo implementation
fsundermeyer Nov 7, 2023
2a51f44
Added checks for availability of dia and ditaa
fsundermeyer Nov 8, 2023
701570c
Switching from "which" to "command -v"
fsundermeyer Nov 8, 2023
d392f98
Removed DocBook 4 examples and accompanying text
dariavladykina Nov 8, 2023
4afceb2
Added chapter on assemblies
dariavladykina Nov 9, 2023
55fbcd3
Fixed a few tests
fsundermeyer Nov 9, 2023
b680c10
Made poppler-tools an optional dependency
fsundermeyer Nov 9, 2023
57ce5a9
Added chapter on assemblies
dariavladykina Nov 10, 2023
7ede660
DC-file must not be a symlink
fsundermeyer Nov 10, 2023
5dbe65f
Review of DocBook 4.x examples, content edits
dariavladykina Nov 10, 2023
9691b58
Aligning content of etc/docbook-xmlformat-1.x.conf files
fsundermeyer Nov 10, 2023
198d0a0
Add missing checks for DocBook 5.2
tomschr Jan 17, 2023
22381d7
Build new configure file
fsundermeyer Nov 10, 2023
c76831e
Fixed pdf static dir handling
fsundermeyer Nov 13, 2023
a0767e5
Alo support <STYLEROOT>/<STYLEHTML>/images
fsundermeyer Nov 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 7 additions & 1 deletion bin/daps.in
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,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 +396,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 +639,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 +992,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
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
56 changes: 56 additions & 0 deletions daps-xslt/assembly/get-filelist-from-assembly.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Purpose:
Find all files references in an assembly

Input:
DocBook 5 assembly document

Output:
Text output

Parameters:
* seperator (string): separator between each file, default is space

Hint:
The stylesheets reports only those resources that are actually used
inside a <structure>.

Author:
Thomas Schraitle <toms@opensuse.org>

Copyright (C) 2023 SUSE Linux GmbH

-->
<xsl:stylesheet version="1.0"
xmlns:d="http://docbook.org/ns/docbook"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:strip-space elements="*"/>
<xsl:output method="text"/>

<xsl:key name="resources" match="d:resources/d:resource" use="@xml:id"/>

<!-- Parameter -->
<xsl:param name="seperator" select="' '"/>

<!-- Templates -->
<xsl:template match="text()"/>

<xsl:template match="d:structure">
<xsl:apply-templates select="*|@resourceref"/>
</xsl:template>

<xsl:template match="d:structure/@resourceref">
<xsl:variable name="href" select="."/>
<xsl:value-of select="concat(key('resources', $href)/@href, $seperator)"/>
</xsl:template>

<xsl:template match="d:module">
<xsl:variable name="href" select="@resourceref"/>
<xsl:value-of select="concat(key('resources', $href)/@href, $seperator)"/>
<xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>
Loading
Loading