|RE: [emf-dev] Tip for using the new 'galileo' flag for Eclipse EMF/MDTPlan Queries|
I’ve applied similar changes to the draft plans for BPMN2 and IMM. Note that I’ve moved my theme designations from the short description field to the whiteboard field; this is more desirable, I think, because the resulting plan won’t show the theme redundantly as part of the description for each plan item.
Unfortunately, though, couldn’t get my plan items to render properly, even with your changes to url-encode.xsl (note that I think your snippets include an extra comma character). Any ideas? Were other changes perhaps required?
As soon as I learned that Denis had bestowed on us a new 'galileo' flag (bug 247191 ), naturally I ran off to bugzilla immediately to apply it to my Plan Queries for OCL.
Well, I had some trouble getting queries to work that search for 'galileo+' (for committed or proposed items). The 'galileo-' flag for deferred items was not a problem. I did overcome, though ... read on.
The problem wasn't in testing queries in a browser. Just paste this into your browser to see that it works:
The problem was in trying to get Dave Carver's XSL transformation (see his excellent blog posting ) to execute the query. Naturally, the ampersands need to be escaped as & in the XML. That's OK. The problem was in encoding the '+' modifier on the flag. On my first attempt, doing this in the XML didn't return any results:
Substituting a literal '+' in the XML didn't help, because then Bugzilla just ended up looking for a space instead of a '+' (the '+' is a URL encoding for a space).
The problem was, that the ingenious url-encode.xsl helper stylesheet re-encoded the '%' symbol. Just adding the '%' to the 'safe' variable declaration in the url-encode.xsl file fixed that:
The next problem was that the square brackets ('[' and ']') in my search condition for the theme-in-summary scheme wouldn't work after making this change, because the HTTP request sent by the XSLT ended up converting them to the square brackets, which aren't valid characters in a URL query string. At least, I think that's what happened. I definitely got an error from the XSLT processor saying that the '[' was invalid.
The solution to this was to remove the '[' and ']' characters from the 'safe' variable, so that finally I had:
and the HTML resulting from my queries is now just what I need.
Questions for Dave C.:
For a complete example of using the 'galileo' flag in your plan.xml, see my OCL plan file in CVS:
Thanks, Dave, for this extremely helpful tooling that you developed!