[ 
https://issues.apache.org/jira/browse/SLING-5945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439154#comment-15439154
 ] 

Konrad Windszus edited comment on SLING-5945 at 8/26/16 2:34 PM:
-----------------------------------------------------------------

Ok, now I do understand. Actually I had to come up with such a weird expression 
only because of issue SLING-5944.

I would suggest to come up with a short introduction paragraph in 
https://sling.apache.org/documentation/bundles/scripting/scripting-sightly.html 
stating that the Sightly parser is triggered after regular HTML parsing. That 
means that Sightly scripts always have to be valid HTML. Since that is a 
fundamental difference to JSP (and most people are used to JSP) it is worth 
mentioning that.

Probably it should be mentioned even in the HTL Spec at 
https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md.


was (Author: kwin):
Ok, now I do understand. Actually I had to come up with such a weird expression 
only because of issue SLING-5944.

I would suggest to come up with a short introduction paragraph in 
https://sling.apache.org/documentation/bundles/scripting/scripting-sightly.html 
stating that the Sightly parser is triggered after HTML parsing. Since that is 
a fundamental difference to JSP (and most people are used to JSP) it is worth 
mentioning that.

> Using opening angle brackets twice in expression language leads to token 
> recognition error
> ------------------------------------------------------------------------------------------
>
>                 Key: SLING-5945
>                 URL: https://issues.apache.org/jira/browse/SLING-5945
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Sightly Engine 1.0.18
>            Reporter: Konrad Windszus
>            Assignee: Radu Cotescu
>             Fix For: Scripting Sightly Engine 1.0.20
>
>
> The following Sightly expression leads to an exception when used inside a 
> block element's content
> {code}
>  ${'<{0}> </{0}>' @ format=['myelement'], context='unsafe'}
> {code}.
> The error is 
> {code}
> token recognition error at: ''<{0}>' for expression ${'<{0}>
>       at 
> org.apache.sling.scripting.sightly.impl.engine.UnitLoader.getSourceCodeForScript(UnitLoader.java:135)
> {code}
> On the other hand
> {code}
>  ${'<{0} /> ' @ format=['myelement'], context='unsafe'}
> {code}
> works without any issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to