The purpose of this DVWP is to display information returned from a
webservice. The problem was the web service returned an escaped XML
string which I have learned is a no-no and also seems to be the root
of much frustration to many people. Anyway, that can't be helped
because the data is coming from Microsoft. So my challenge to myself
was to do this all in the DVWP, no need to install a new webpart.
Seems like it could be easily repurposed for any web service.
My solution was to use to use a DVWP's XSL property to push down
three things to the client:
1) the returned SOAP payload from the web service defined in the
DVWP's DataQuery property,
2) a complete stylesheet (embedded in the DVWP's XSL property) for
the data returned by the web service, and
3) an HTML block containing three divs (hidden div for XSL, hidden
div for XML, displayed div for results of XSL transformation) and
javascript to process the XSL.
This works great for the first webpart, but when I try to use this
framework again, the id's for the javascript and divs are the
repeated so it doesn't work. Thus my attempt to build the WPQ into
the ID's.
The solution that you suggested doesnt work because the _WPQ_ is
being treated like a literal. (Unless I'm doing it wrong). The
workaround is easy (just change the XSL for each webpart as it is
imported)