Runar Ovesen Hjerpbakk

Science-based software development

Debugging XSLT in Visual Studio

tl;dr: Check that your XSDs listed under XML -> Schemas... actually exists at their specified locations.

I sometimes dabble in the magical realms of XSLT using Visual Studio to debug and step through the transformation process. I was looking forward to a fun morning of XSLT debugging when the following message appeared in the status bar:

Waiting for parse to complete

And wait I did.

A lot.

The XSLT I was trying to debug had a couple of namespace declarations, and some of them had blue squiggles below. Maybe Visual Studio was trying to tell me something.

I looked under XML -> Schemas... and found the namespaces specified in the XSLT.

XML Schemas

The schemas with warnings in the editor had file locations where no XSD could be found. After removing the offending XSDs and adding them back from their correct locations, the waiting part in Waiting for parse to complete shortened considerably.

Not the most informative message, but the blue squiggles helped me look in the right direction. Still, when the message shows in the status bar, the parser already knows what it is waiting for...