You can check conformance with the official Stardict-Editor, see the screenshot.
In python, you can sort your entries with
Code:
entries.sort(key=lambda x: (x.headword.encode("utf-8").lower(), x.headword))
it produces the same results as StarDict's own
KOReader's dictionary viewer can display images, just make sure to point to the filename and not to the full path.
Example for adding sound (or any data file) files.