Web lists-archives.com

xmlstarlet ignores XML attributes


on a current Cygwin-installation, xmlstarlet fails to validate a valid
XML document against an XML schema (XSD). One gets error messages like

attribute 'date': '' is not a valid value of the atomic type 'xs:dateTime'.

on attributes, which are present. The behaviour can be reproduced using
the example files from the attached tar-archive via:

	xmlstarlet val -e -s minimal.xsd minimal.xml

On the versions installed on Debian Testing, for instance, the
validation works for the same documents.

I found a quite recent similar bug report for Debian, there seems to be
a problem with certain versions of libxml:

Additional information below.

*Failing on Cygwin:*

$ uname -a
CYGWIN_NT-10.0 goe-nb-ubk-w10 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64

$ xmlstarlet --version
compiled against libxml2 2.9.1, linked with 20904
compiled against libxslt 1.1.28, linked with 10129

$ ldd `which xmlstarlet.exe`
        ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffbcc5e0000)
        KERNEL32.DLL => /cygdrive/c/Windows/System32/KERNEL32.DLL
        KERNELBASE.dll => /cygdrive/c/Windows/System32/KERNELBASE.dll
        cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
        cygexslt-0.dll => /usr/bin/cygexslt-0.dll (0x3f35d0000)
        cygxml2-2.dll => /usr/bin/cygxml2-2.dll (0x3f3cf0000)
        cygxslt-1.dll => /usr/bin/cygxslt-1.dll (0x3e1240000)
        cyggcrypt-20.dll => /usr/bin/cyggcrypt-20.dll (0x3ee1b0000)
        cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3fa9c0000)
        cyglzma-5.dll => /usr/bin/cyglzma-5.dll (0x3f5af0000)
        cygz.dll => /usr/bin/cygz.dll (0x3f3c90000)
        cyggpg-error-0.dll => /usr/bin/cyggpg-error-0.dll (0x3eda70000)
        cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3fa890000)

*Here it worked (Debian Testing):*

$ xmlstarlet --version
compiled against libxml2 2.9.4, linked with 20904
compiled against libxslt 1.1.29, linked with 10129

Attachment: libxmlbug.txz
Description: Binary data

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple