If you want pass any content from your DCR to JavaScript then you can create JSON object inside XSLT to read the value from DCR and later consumed by JavaScript to show the result on your resultant ...
public static String postJsonObjectToServer(JSONObject jsonObject, String url) { final DefaultHttpClient client = new DefaultHttpClient(); HttpPost method=null; try ...
You can also create a JsonItem by newing an object of a JsonItem's subclass as following. // public JsonString(string value); // public JsonString(char value); JsonItem item1 = new JsonString("value1" ...