: At some point, it would be simpler to write a custom response handler : and generate the output in your desired XML format.
I think Walters got the right idea ... as a general rule, we want to make the XmlResponseWriter "bullet proof" so that no matter waht data you put into your index, it is garunteed to produce a well formed XML document that conforms to a specified DTD, or XSD (see SOLR-17 for one we already have but we haven't figured out what to do with yet) But I can certainly understand your use case: you know you have wellformed XML values in some fields, and want to be able ot apply a simple XSL transform on the whole response, and use XPath selectors to pull data out of your response fields. the best approach i can think of that should work for you out of the box is what you already said: two XSL trnasforms ... one can be applied on the Solr server using the qt=xslt response -- just create an XSL that generates XML and unescapes the fields you know will contain wellformed XML data -- then apply your second transform client side (or using a proxy) if you're interested in writing a bit of custom java code you could in fact write a new FieldType (which could easily subclass TextField) with a custom "write" method that just outputs the raw value directly, and then load your field type as a plugin... http://wiki.apache.org/solr/SolrPlugins -Hoss