-
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
Validation succeeds despite undefined entity #539
Comments
Update: The error always appears when the missing entity is used in an XML file that is not the MAIN file. So, with my example document (doc-kit -> docbook5-book, then apply patch via
Notes:
|
@tomschr I can still reproduce the issue with the develop branch of DAPS, unfortunately. |
@sknorr Thanks for the feedback. That's a bit strange. It works for Frank and me. Are you sure you used the right environment? I'm curious, what do you get with the following call:
|
I used |
Also:
|
Thanks. I suspect, that is caused by DocBook 4 DTD somehow... |
Ok, this is weird. I've used your doc-kit, applied the mentioned patch. So everything looks ok, including the I used function ddaps () {
echo "****** DAPS Developer Version ******"
local D=/local/doc/daps
$D/bin/daps --dapsroot $D $@
} With
So the error code is 1. I've tried it to uncomment Hmn... 🤔 |
Toms and I sat together for a bit and it appears the issue is:
It seems reasonable working around the limitations though [to me, not speaking for toms]. |
I've went through the lxml Changelog. One item looks promising (4.2.0, 2018-03-13):
|
Closing this. Current distributions should no longer have the faulty lxml lib. |
This is still an issue with our new Leap 15.2 runners on GitHub Actions:
We're using LXML 4.4.2 there. (And the mention of LXML 4.33 looks to be a typo'd version of 4.3.3, because the newest version is 4.6.3 only.) |
Did a little debugging (python-lxml 4.6.3):
Since the error message looks the same in all three cases (run the first one without However, I can see why this is not considered an error upstream--it does not seem to affect parsing and building, so a warning seems appropriate. |
@tomschr Can we disambiguate between entity issues and profiling issues in daps-xmlwellformed? |
I did a little debugging too. When I run
The return code clearly shows there was something wrong. I'm not sure why this is isn't caught by make. This is the snippet where the script is used: # file make/setfiles.mk
CHECK_WELLFORMED := $(shell PYTHONWARNINGS="ignore" $(LIBEXEC_DIR)/daps-xmlwellformed --xinclude $(MAIN) 2>&1 )
ifdef CHECK_WELLFORMED
$(error Fatal error:$(\n)$(CHECK_WELLFORMED))
endif
The script does resolve XIncludes only (if requested). It doesn't do any profiling step. |
We don't rely on the XSLT stylesheet anymore. It turned out that it wasn't reporting entity errors etc. reliably. The script now uses tree.xinclude() (built-in) and parses log messages to categorize them as warnings or errors. This also differentiating between entity and XInclude errors. Requires lxml=>4.4.2 now. Co-authored-by: Frank Sundermeyer <fs@suse.de> Co-authored-by: Stefan Knorr <sknorr@suse.de>
This test is better suited to a bash script and doing the check early does not hurt.
* Remove file permission change to a no longer existant file in makefile.am * Remove dbcentx entities in entity-decl.ent.in Fixup for openSUSE#539 Co-authored-by: Stefan Knorr <sknorr@suse.de>
We don't rely on the XSLT stylesheet anymore. It turned out that it wasn't reporting entity errors etc. reliably. The script now uses tree.xinclude() (built-in) and parses log messages to categorize them as warnings or errors. This also differentiating between entity and XInclude errors. Requires lxml=>4.4.2 now. Co-authored-by: Frank Sundermeyer <fs@suse.de> Co-authored-by: Stefan Knorr <sknorr@suse.de>
This test is better suited to a bash script and doing the check early does not hurt.
When running validation on DC-SLES-all in SUSE/doc-sle@305012007, the output is this:
-> There is a validation error but DAPS declares the document valid anyway and exits with code 0.
Frank remarks that in [daps-repo]/make/setfiles.mk:42, the CHECK_WELLFORMED variable appears to be empty in our error case.
--
Notably, this error somehow is specific to this revision of the doc-sle repo, I could not reproduce it by creating a fresh example document with doc-kit and then adding an undefined entity to it. It errored out correctly:[outdated example removed]
EDIT: removed outdated information.
The text was updated successfully, but these errors were encountered: