Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 195162 - XML start tags flagging errors
Summary: XML start tags flagging errors
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: moshe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 13:11 EDT by Eric Caron CLA
Modified: 2020-05-14 11:17 EDT (History)
0 users

See Also:


Attachments
screenshot (10.90 KB, image/png)
2007-07-24 08:58 EDT, Toshihiro Izumi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Caron CLA 2007-07-02 13:11:29 EDT
Steps to Reproduce:
1. Create a anything.tpl file
2. Enter '<?xml version="1.0" encoding="UTF-8"?>'

More Information:
Yes, I know this is related to bug 185017. But for any non-PHP file being handled by the PHP editor (such as .tpl) or by PHP files when short tags is off, there should be a fix/workaround for avoiding this warning.
Comment 1 moshe CLA 2007-07-23 07:44:00 EDT
workaround for avoiding this warning
use '<<??>?xml version="1.0" encoding="UTF-8"?>'
instead of '<?xml version="1.0" encoding="UTF-8"?>'
Comment 2 Eric Caron CLA 2007-07-24 01:46:51 EDT
I'm sorry, moshe, but your fix doesn't work on machines where short tags are off.

I make this argument, because in the PHP manual (http://devzone.zend.com/manual/language.basic-syntax.html)...
***
Note:  Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.
***
While I do understand the inherent complexity in this bug, it seems to me that the countless situations where developers would desire to use this code would warrant taking the time to fix the bug, rather than post a non-obvious workaround that obfuscates the code.
Comment 3 moshe CLA 2007-07-24 03:19:35 EDT
Your code '<?xml version="1.0" encoding="UTF-8"?>'
cause parsing error when running it as PHP script.
"Parse error: syntax error, unexpected T_STRING in C:\Zend\runtime-New_configuration\Test\test.php on line 1".
if you not used short tags use the following:
'<<?php?>?xml version="1.0" encoding="UTF-8"?>'.
PHP editor should support php interperter. 
Comment 4 Toshihiro Izumi CLA 2007-07-24 08:58:36 EDT
Created attachment 74452 [details]
screenshot

PHP doesn't report any errors if you set 'short_open_tag = Off' in php.ini.
I cannot understand why pdt developers reject this functionality.
#166764
Comment 5 Eric Caron CLA 2007-07-24 09:33:29 EDT
Not to mention that the original bug is for .tpl files, which aren't natively parsed directly by PHP anyway!
Comment 6 moshe CLA 2007-07-25 03:24:14 EDT
There open enh for .tpl 152451 means different editor for .tpl files.
Comment 7 Gadi Goldbarg CLA 2007-08-12 10:15:44 EDT
won't be fix