Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326193 - [parser]Empty end tag is ignored in xml comment text if there is a jsp expression in the tag's attribute value
Summary: [parser]Empty end tag is ignored in xml comment text if there is a jsp expres...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Sarika Sinha CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-24 15:15 EDT by Sarika Sinha CLA
Modified: 2010-11-17 13:43 EST (History)
1 user (show)

See Also:
nsand.dev: review+


Attachments
Patch to correct the jsp translation inside xml comment (8.28 KB, patch)
2010-10-08 03:00 EDT, Sarika Sinha CLA
no flags Details | Diff
Patch to parse tags in xml comments (15.47 KB, patch)
2010-10-21 02:57 EDT, Sarika Sinha CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2010-09-24 15:15:34 EDT
Build Identifier: M20100818-0800

Following code gives error for missing end tag for cTag:getString:
<script type="text/javascript">
		<!--
			if(confirm('<cTag:getString locale="${dayCellBean.locale}" key="INVOKE_CONFIRM_MSG" argument="<%= daycellBean.getDate() %>" />')) {
					}
			}

			
		//-->
</script>




Reproducible: Always
Comment 1 Sarika Sinha CLA 2010-10-08 03:00:54 EDT
Created attachment 180472 [details]
Patch to correct the jsp translation inside xml comment

Tried lots of options to correct the empty end tag issue , then found that it happens only when the code is inside xml comment in script region. So corrected the jsp translation of xml comment. Added a junit for the same scenario.
Comment 2 Nick Sandonato CLA 2010-10-08 14:04:48 EDT
Sarika, this patch is causing unit test failures in jsp.ui's test suite. Furthermore, it causes HTML-commented regions lose the ability to have content assist in scriptlets. Example:

<html>
<head>
</head>
<body>
<!-- <% | %> -->
</body>
</html> 

Content assist and syntax highlighting are lost there. I think you're close though.
Comment 3 Sarika Sinha CLA 2010-10-21 02:57:14 EDT
Created attachment 181360 [details]
Patch to parse tags in xml comments

As XML comeents allows dynamic data to be parsed which can be part of xml tags, this patch parses xml tags inside xml comment. This enables the parsing of empty end tags and parses jsp expression correctly inside attribute value.
Comment 4 Nick Sandonato CLA 2010-11-17 13:43:20 EST
Patch looks good. Thanks, Sarika.