SLING-7024 - Sightly doesn't allow to emit style or on event attributes for data-sly-attribute

* improved logging message for the AttributePlugin

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1803633 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
index 6243821..c2316d3 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
@@ -62,7 +62,9 @@
     public PluginInvoke invoke(Expression expression, PluginCallInfo callInfo, CompilerContext compilerContext) {
         String attributeName = decodeAttributeName(callInfo);
         if (attributeName != null && MarkupUtils.isSensitiveAttribute(attributeName)) {
-            String warningMessage = String.format("Refusing to generate attribute '%s' for security reasons.", attributeName);
+            String warningMessage = String.format("Sensible attribute (%s) detected: event attributes (on*) and the style attribute " +
+                    "cannot be generated with the data-sly-attribute block element; if you need to output a dynamic value for " +
+                    "this attribute then use an expression with an appropriate context.", attributeName);
             compilerContext.getPushStream().warn(new PushStream.StreamMessage(warningMessage, expression.getRawText()));
             return new DefaultPluginInvoke(); //no-op invocation
         }