You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Lars Trieloff (JIRA)" <ji...@apache.org> on 2007/12/19 19:32:43 UTC

[jira] Created: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Compact Syntax for ESP expressions in HTML attributes
-----------------------------------------------------

                 Key: SLING-142
                 URL: https://issues.apache.org/jira/browse/SLING-142
             Project: Sling
          Issue Type: Improvement
          Components: Scripting
            Reporter: Lars Trieloff


The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Lars Trieloff (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Trieloff closed SLING-142.
-------------------------------


Works fine, thanks.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reopened SLING-142:
-------------------------------------


This patch corrupted ESP parsing with respect to some character sequences, e.g. <%= %> expressions in single and double quotes are ignored and the equals sign (=) in template text as a=<%= expr %> is not printed (see SLING-253).

In fact the currently implemented compact syntax is only allowed within quoted text, which do not even need to be HTML attributes. TO align more with JSP EL, which allows this syntax just about everywhere, we should loosen the support such that the syntax ${...} is a direct drop-in replacement for <%= ... %>.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Lars Trieloff (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Trieloff updated SLING-142:
--------------------------------

    Attachment: esp-compact-syntax.patch

This patch adds support for the proposed compact syntax. Test cases are included.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>         Attachments: esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-142.
-------------------------------------

    Resolution: Fixed

Applied the patch in Rev. 605876.

Please verify, whether it is what you expected and close the issue. Thanks.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553618 ] 

Felix Meschberger commented on SLING-142:
-----------------------------------------

Thanks for updating the patch. Will apply it shortly.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-142:
---------------------------------------

    Assignee: Felix Meschberger

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Lars Trieloff (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Trieloff updated SLING-142:
--------------------------------

    Attachment: esp-compact-dollar-syntax.patch

This patch implements the ${expr} syntax. The simple {expr} syntax is ignored. Test cases included.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553605 ] 

Felix Meschberger commented on SLING-142:
-----------------------------------------

I basically agree with the proposed extension. But I suggest we adhere more to the EL standard notation ${...} instead of introducing our own syntax {...}.

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>         Attachments: esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-142:
------------------------------------

    Fix Version/s: 2.0.0

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-142) Compact Syntax for ESP expressions in HTML attributes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-142.
-----------------------------------

    Resolution: Fixed

Fixed in Rev. 635585 to allow ${...} as a drop-in replacement for <%=...%>

> Compact Syntax for ESP expressions in HTML attributes
> -----------------------------------------------------
>
>                 Key: SLING-142
>                 URL: https://issues.apache.org/jira/browse/SLING-142
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Assignee: Felix Meschberger
>         Attachments: esp-compact-dollar-syntax.patch, esp-compact-syntax.patch
>
>
> The current syntax for ESP expressions ( <%= value %>) parallels the JSP syntax, but is hard to read when it is used in HTML attributes (<a href="<%=link %>"><%=name %> </a>). I propose an syntax addition that allows inline ESP expressions in HTML in a more compact way and that is less intrusive to the XML structure. Basis for the syntax were JSP Expression language and XSLT. The above example would be rephrased in the new syntax as: (<a href="{link}"><%=name %> </a>).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.