xmllint whereis shell command adds non existant html wrapper
Given an HTML fragment like
<div>
<div>text</div>
</div>
whereis
shell command adds non existing /html/body
even if --nowrap
is used
echo "whereis //div" | xmllint --shell --html --nowrap test.html
/ > whereis //div
/html/body/div
/html/body/div/div
Expected result
/div
/div/div
xml2xpath project uses that shell command among others.
xmllint: using libxml version 20914
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Schemas Schematron Modules Debug Zlib Lzma
rpm -qi libxml2-tools
Name : libxml2-tools
Version : 2.9.14
Release : 150400.5.10.1
Architecture: x86_64
Install Date: Fri 21 Oct 2022 09:47:54 PM -03
Group : Unspecified
Size : 96401
License : MIT
Signature : RSA/SHA256, Mon 17 Oct 2022 12:01:58 PM -03, Key ID 70af9e8139db7c82
Source RPM : libxml2-2.9.14-150400.5.10.1.src.rpm
Build Date : Mon 17 Oct 2022 12:01:17 PM -03
Build Host : sheep09
Relocations : (not relocatable)
Packager : https://www.suse.com/
Vendor : SUSE LLC <https://www.suse.com/>
URL : https://gitlab.gnome.org/GNOME/libxml2
Summary : Tools using libxml
Description :
This package contains xmllint, a very useful tool proving libxml's power.