I don't think it does. According to the spec an attribute value is CDATA by default, which means all internal white space should be normalized to a single space character, not removed. `xmllint` preserves both spaces: $ echo '<TEST LONG-NAME="this / that">my inner text</TEST>' >test.xml $ xmllint test.xml <?xml version="1.0"?> <TEST LONG-NAME="this / that">my inner text</TEST> Run