Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326193

Summary: [parser]Empty end tag is ignored in xml comment text if there is a jsp expression in the tag's attribute value
Product: [WebTools] WTP Source Editing Reporter: Sarika Sinha <sarika.sinha>
Component: jst.jspAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: thatnitind
Version: 3.2.2Flags: nsand.dev: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to correct the jsp translation inside xml comment
none
Patch to parse tags in xml comments nsand.dev: iplog+

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.