-
Notifications
You must be signed in to change notification settings - Fork 19
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
When using same ID twice and this ID is ROOTID, DAPS message is unhelpful #390
Comments
I cannot reproduce this - in case an ID appears twice, it does not validate and DAPS correctly errors out:
|
Can still reproduce this. The following configuration:
(for good measure, i also removed the |
Looks like we could check for double IDs in the |
@fsundermeyer I can reproduce this behaviour that Stefan showed. Used the # vi +93 /usr/share/daps/make/setfiles.mk
# COUNT contains a number:
COUNT := $(shell $(XMLSTARLET) sel -t -v "count(//*[@id=$ROOTID])" $(SETFILES_TMP) 2>/dev/null)
# FIXME: Check if COUNT is < 2; not sure if this is the right expression:
ifeq $COUNT < 2
ROOTELEMENT := $(shell $(XMLSTARLET) sel -t -v "//div[@id='$(ROOTID)'][1]/@remap" $(SETFILES_TMP) 2>/dev/null)
ifneq "$(ROOTELEMENT)" "$(filter $(ROOTELEMENT),$(VALID_ROOTELEMENTS))"
$(error Fatal error: ROOTID belongs to an unsupported root element ($(ROOTELEMENT)). Must be one of $(VALID_ROOTELEMENTS) )
endif
else
$(error Fatal error: discovered one or more elements with the id=$ROOTID)
endif
|
When using same ID twice and this ID is ROOTID, DAPS message is unhelpful
Fixed with 6446e2a |
Stable release DAPS 2.4.0: * New Features: - added a dependency checker for DAPS (/usr/bin/daps-check-deps) that makes it easy to check for missing programs/packages - added a "--lean" parameter to PDF generation for creating PDFs with a reduced file size (by reducing the quality of included images); useful for sharing PDFs via e-mail - added a srylesheet for returning all IDs from an XML file (daps-xslt/common/get-all-xmlids.xsl) * Bugfixes: - #408: The list-file-* commands now work with ROOTIDs from all possible elements - #390: When an ID appears twice in the XML and this ID is used with --rootid, DAPS's error message is unhelpful - #365: Improved error messages on "File not found" errors (now tells whether the path was provided by command-line or config file) - #371: Make path to the xmlformat config file configurable - #372: Adjusted debian dependency list - #373: Check unpack-locdrop - #379: Output error of list-images-multisrc with pretty | wc option - #380: Proper error messages when binaries/packages are missing - #392: daps-xmlformat writes name of config file into output - SVGs were not included in ePUBs (https://bugzilla.suse.com/show_bug.cgi?id=1006204) - Setting a default value for db5_version in configure.ac otherwise the DB5 URN in etc/config will be set to an invalid value if DB5 is not installed when running make - fixed a few minor issues with the config file parser that was introduced with 2.3.0 (among them #387) - Increased Java stacksize for jing - Improved the DocBook5 -> DocBook 4 (-> NovDoc) conversion - compatibility: Debian's version of "which" does not support long parameters * Documentation: - Various updates to reflect changes in the code - #345: added documentatioon for the xmlformat subcommand - #362: added documentation for the --jobs option - #363: added documentation about building a bigfile from invalid sources - #364: added documentation for the --norefchecks option - #403: improved documentation about stylesheet customizing (also see #407) - #404: clarify doc about listing unused images - completely revised the doc (spelling, language and grammar) - doc is not yet 100% on par with the code, but we are getting closer * Compatibility: - successfully tested DAPS on Linux Mint 18.1
Stable release DAPS 2.4.0: * New Features: - added a dependency checker for DAPS (/usr/bin/daps-check-deps) that makes it easy to check for missing programs/packages - added a "--lean" parameter to PDF generation for creating PDFs with a reduced file size (by reducing the quality of included images); useful for sharing PDFs via e-mail - added a srylesheet for returning all IDs from an XML file (daps-xslt/common/get-all-xmlids.xsl) * Bugfixes: - #408: The list-file-* commands now work with ROOTIDs from all possible elements - #390: When an ID appears twice in the XML and this ID is used with --rootid, DAPS's error message is unhelpful - #365: Improved error messages on "File not found" errors (now tells whether the path was provided by command-line or config file) - #371: Make path to the xmlformat config file configurable - #372: Adjusted debian dependency list - #373: Check unpack-locdrop - #379: Output error of list-images-multisrc with pretty | wc option - #380: Proper error messages when binaries/packages are missing - #392: daps-xmlformat writes name of config file into output - SVGs were not included in ePUBs (https://bugzilla.suse.com/show_bug.cgi?id=1006204) - Setting a default value for db5_version in configure.ac otherwise the DB5 URN in etc/config will be set to an invalid value if DB5 is not installed when running make - fixed a few minor issues with the config file parser that was introduced with 2.3.0 (among them #387) - Increased Java stacksize for jing - Improved the DocBook5 -> DocBook 4 (-> NovDoc) conversion - compatibility: Debian's version of "which" does not support long parameters * Documentation: - Various updates to reflect changes in the code - #345: added documentatioon for the xmlformat subcommand - #362: added documentation for the --jobs option - #363: added documentation about building a bigfile from invalid sources - #364: added documentation for the --norefchecks option - #403: improved documentation about stylesheet customizing (also see #407) - #404: clarify doc about listing unused images - completely revised the doc (spelling, language and grammar) - doc is not yet 100% on par with the code, but we are getting closer * Compatibility: - successfully tested DAPS on Linux Mint 18.1
When the same ID exists twice & that ID is also set as the ROOTID, DAPS returns this:
It would be nice if DAPS could notice at this point that the ROOTID cannot be unique, as it gets two elements back.
The text was updated successfully, but these errors were encountered: