fgnass/domino — pull request #9 by saebekassebil (2012-08-21 20:11:51+00:00)
Title: Various fixes (Needed for MusicJSON npm package)

Hey fgnass and thanks a lot for doing this!

I've been having troubles with JSDom, and when I found out that dom.js had been forked and made available for Node.js I exulted!

There's however a few (quite annoying) bugs in the code, probably due to the massive restructuring work you must have done - which ends up being pretty annoying.

Fx a MusicXML document uses the same `id` attribute several times in a document for reference. When `domino` parses this XML document, it warns (in the console): "Duplicate element id ' + id". This is a show-stopper for me, since that leaves it impossible to write a command line tool, that can output to stdout (the TTY).

Furthermore, it was impossible to use the method `DOMImplementation#createDocumentType` as `xmlnames.js` hadn't been included in the document.

The two last changes are about the serializing of a document. A `ProcessingInstruction` should to my understanding end with `... ?>` and not just `... >`. And furthermore the DOCTYPE element didn't write out its public and system ID.

I hope that you'll take in these fixes, or else comment on what's wrong with them.

Thanks a lot again for doing this great job!