>Serializing the stylesheet to a file, and reparsing the stylesheet, all works fine. Anyone any idea?
Make sure you're using the DOM Level 2 createElementNS()/createAttributeNS () calls to build the DOM you're passing in, not createElement/createAttribute. We need the namespace fields set correctly.
