Should we create an extension to allow the producer on a per-URL basis to define which ampersand ('&' or '&') form to use when using consumer URL rewriting?
This allows for mixing XHtml with inline styles and scripts (in CDATA). Amendment Posted on Thursday, 8 January 2009: Should '&' or '&' Amendment Posted on Saturday, 10 January 2009: Sample: Output for XHTML markup, showing how the same document may need both simple-ampersands and amp-entities:
<script>
//simple ampersand
var url = 'http://consumer/resource?resourceId=1234&resourceState=xyz'
var request = new XMLHttpRequest();
request.open("GET", url, true);
request.send();
eval('{' + request.responseText + '}');
</script>
<!-- amp-entity -->
<href="http://consumer/portal/operation=getMarkup&portletHandle=abc">Click Me</href>
Amendment Posted on Tuesday, 13 January 2009: Problem statement:
Currently it is not possible for the producer (or portlets on it) to specify which ampersand form ('&' or '&') needed in a given URL. Rather, its is up to the consumer to decide on which form to use. This is especially problematic in XML based markup (like XHTML) where the producer may need to specify the ampersand form on a per-URL basis. (See the sample above).
Additionally, JSR-286 requires each URL have a specific ampersand form depending on the method used to generate its string.
* toString() : '&'
* write() : '&'
Currently it is not possible to support this requirement when using WSRP and URLs which contain more than 1 parameter.
|