// Javadoc inherited.
protected int exprElementStart(
MarinerRequestContext context,
PAPIAttributes papiAttributes) throws PAPIException {
NoScriptAttributes attributes = (NoScriptAttributes) papiAttributes;
MarinerPageContext pageContext
= ContextInternals.getMarinerPageContext(context);
VolantisProtocol protocol = pageContext.getProtocol();
try {
// Check to see whether the protocol supports java script, if it
// does then check if we have a idRef to a script and if the script
// asset is invalid, if so then put out plain markup without
// <noscript></noscript> elements, but wrapped in span elements.
//
if (protocol.supportsJavaScript()) {
// Is there and idref attribute?
if (attributes.getIdref() != null) {
// Is the idref's asset valid?
if (pageContext.getIdValue(attributes.getIdref()) == null) {
// We need to skip the tags but still send the plain
// markup wrapped in a span element.
skipped = true;
SpanAttributes spanAttributes = new SpanAttributes();
spanAttributes.setStyles(pattributes.getStyles());
protocol.writeOpenSpan(spanAttributes);
return PROCESS_ELEMENT_BODY;
}
}
}
// All other cases should put out <noscript></noscript> elements.
pattributes.setTitle(attributes.getTitle());
pattributes.setId(attributes.getId());
// Initialise the general event attributes.
PAPIInternals.initialiseGeneralEventAttributes(pageContext,
attributes, pattributes);