In my custom search options, I have specified a transform-results element.
<options xmlns="http://marklogic.com/appservices/search">
<transform-results apply="highlighted-person-summary-snippet" ns="http://ir.abbvie.com/people-db/person-query"
at="/ext/lib/person-query.xqy">
</transform-results>
</options>
Is there anyway that the XQuery function that implements the custom snippet can have access to what the accept headers are in the search request and be able to leverage that? I would rather not have two separate options XML files defined with the only difference being that one returns XML while the other one returns JSON.