optimiser.setPageContext(getPageContext());
optimiser.startDocument(versionCode, publicIdCode, codec, stringTable,
strings);
// Send a href event to optimiser
AttributeStartFactory attributeStartFactory = new AttributeStartFactory();
TokenTable tokenTable = new WMLVersion1_1TokenTable();
tokenTable.registerAttrStarts(attributeStartFactory);
AttributeStartCode hrefStartCode
= attributeStartFactory.create("href", null);
optimiser.addAttribute(hrefStartCode);
// send url to optimiser
optimiser.addAttributeValue(new WBSAXString(codec,
"http://www.my.com/page.jsp;jsessionid=123?parm=value#ref"));
// Send a title event to optimiser
AttributeStartCode titleStartCode
= attributeStartFactory.create("title", null);
optimiser.addAttribute(titleStartCode);
// Send the value of the title to optimiser
optimiser.addAttributeValue(new WBSAXString(codec, "my title"));