-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
[BUG] typeswitch on CDATA logs error(s) "Unknown node type: 4" #4740
Comments
I create a gist for easier setup and testing https://gist.github.com/line-o/4896d177c5d9b429d08c81b24c3fda3c |
line-o
added a commit
to line-o/exist
that referenced
this issue
Feb 11, 2023
fixes eXist-db#4740 Do not log an error each time typeswitch is called on a CDATA section.
line-o
added a commit
to line-o/exist
that referenced
this issue
Feb 12, 2023
fixes eXist-db#4740 Do not log an error each time typeswitch is called on a CDATA section.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When traversing node-trees with CDATA the exist.log is littered with
Even though the node type
4
is known (it's a CDATA node).UPDATE
Turns out that this issue also causes an NPE when attempting to get the name of the CDATA section:
Expected behavior
The log not to be littered with false errors.
In memory CDATA section returns an empty string, that should happen for stored ones as well.
To Reproduce
With a simple main module that traverses a node-tree using
typeswitch
(traverse.xq).And an HTML file with a CDATA node (has-cdata.html).
/db/apps/test
NOTE: you cannot use eXide to store the HTML file because the CDATA node will be swallowed.
rest or XML-RPC (I used xst) will work though (as does when uploading it within a XAR).
(see [BUG] HTML is modified when saved eXide#593)
curl http://localhost:8080/exist/apps/test/traverse.xq
exist.log
it should now contain three consecutive error message withUnknown node type: 4
Context (please always complete the following information)
Build: eXist-6.2.0
Java: 1.8.0_362 (Azul Systems, Inc.)
OS: Mac OS X 12.6.3 (aarch64)
Additional context
conf.xml
? noneThe text was updated successfully, but these errors were encountered: