Listing elements and filtering the output by unique lines (via -u) works like a charm. Once one tries to display attributes, while again filtering output by unique lines, xmlstarlet complains. Could this mode of operation be added to xmlstarlet? Test file config.xml attached.
skayser @ ray1 ~/tmp$ xmlstarlet el -u config.xml
UserScriptConfig
UserScriptConfig/Script
UserScriptConfig/Script/Exclude
UserScriptConfig/Script/Include
$ xmlstarlet el -a -u config.xml
I/O warning : failed to load external entity "-u"
Test file, taken from http://www.mozdev.org/pipermail/greasemonkey/2005-December/006978.html
Initial bug report was for 1.0.2. Tested again with 1.1.0. Output is different, but not for the better ;)
$ xmlstarlet el -a -u config.xml
$
No output.
I added an error message for nonexistant file in commit e6ae150fa2ca3f86b0ae5f61589a069035f2fd0e,
As for actually implementing this, it certainly could be done, but since you can just pipe into sort -u, I don't see it as very high priority. Moving to feature requests.