Though I don't understand whole issue, I think that it is good challenge for XSLT (xsl transformation). The templates can match 'special' entities and present them proprietary processed. Aditionally, you can provide enumeration of inspectors as additional xml data or use some XIncludes...