"xml processing instruction not at start of external entity"

I’ll spare my readers the head-bashing that finding this involved and spell it out: My perfectly valid XUL file was failing to load once I added the XML directory to use a stylesheet. The error message suggested some error parsing the XML (“xml processing instruction not at start of external entity”).

In fact, the problem had nothing to do with the XML’s validity. That’s Firefox’s helpful way of telling me “I can’t find this CSS file, go fish.”

I had botched the install.rdf entries for the skin directory and Firefox was unable to find the .css file.

It is important to use the element “em:skin” when telling Firefox about skin-related files (e.g. CSS and images) in your extension’s .jar file. Not “em:package”.

Curiously enough, none of the hits for “not at start of external entity” on Google even suggested that the problem might be in Firefox’s inability to find the CSS file. Perhaps some day this entry will fill that gap.